Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executor and Parser for onboarding MongoDB #213

Closed
wants to merge 3 commits into from

Conversation

revathygs
Copy link

No description provided.

Copy link
Contributor

@yangpanMS yangpanMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry just saw this is only a draft, posted a few comments

@@ -0,0 +1,32 @@
namespace VirtualClient.Actions.MongoDB
{
using NUnit.Framework;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit test for the executor

"Parameters": {},
"Actions": [
{
"Type": "MongoDBExecutor",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mongo db is an important workload that we would like to run server/client scenario. Please add that

"Parameters": {
"Scenario": "InstallYCSBPackage",
"BlobContainer": "packages",
"BlobName": "ycsb-0.5.0.zip",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw these three benchmarking tool in MongoDB's own blog. https://www.mongodb.com/blog/post/performance-best-practices-benchmarking
image
Have you research the other 2?

@revathygs revathygs changed the title Executor and Parser fo onboarding MongoDB Executor and Parser for onboarding MongoDB Nov 19, 2023
Revathy Ganesh added 2 commits December 29, 2023 20:27
…t variable, unable to convert ycsb as an executable file

Parameterized the executor commands
[SetUp]
public void Setup()
{

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove extra whitespace

}

public string GetMongoProcessPath => base.MongoDBPackagePath;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, remove extra white space

[Test]
public void MongoDBMetricsParserParsesAsExpected()
{
this.testParser.Parse();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here please check each metrics individually

@revathygs revathygs marked this pull request as ready for review December 29, 2023 22:40
protected string MongoDBPackagePath { get; set; }

/// <summary>
/// The file path for YCSB workloads.
Copy link
Contributor

@nmalkapuram nmalkapuram Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the summary appropriately.


this.YcsbPackagePath = ycsbPackage.Path;

// string pathtobin = this.PlatformSpecifics.Combine(this.PackageDirectory, "bin");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Remove extra lines and unnecessary comments.


this.SetEnvironmentVariable(EnvironmentVariable.JAVA_HOME, javaExecutablePath, EnvironmentVariableTarget.Process);

await this.ExecuteCommandAsync("chmod", convertToExeArgument, ycsbExecutablePath, telemetryContext, cancellationToken).ConfigureAwait(false);
Copy link
Contributor

@nmalkapuram nmalkapuram Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a MakeFileExecutable function which does the same as part of systemManager. Reuse the same to avoid redundancy.
systemManager.MakeFileExecutableAsync()

/*./ycsb run mongodb -s -P /home/azureuser/vc/content/linux-x64/packages/ycsb/ycsb-0.5.0/workloads/workloada -p operationcount=1000000 -p recordcount=1000000 -threads 16
*/
DateTime runStartTime = DateTime.UtcNow;
var runOutput = await this.ExecuteCommandAsync($"{ycsbPath}", updateDataArgument, this.YcsbPackagePath, telemetryContext, cancellationToken)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load resembles creation of database and run resembles actual execution of transactions between client and server. In benchmarking MongoDB, do we collect information also from load function?

}

/// <summary>
/// Logic to parse and read metrics8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: spell

RegexOptions options = RegexOptions.None;
var regex = new Regex("[ ]{2,}", options);
this.PreprocessedText = regex.Replace(this.RawText, " ");
string pattern = @"(?=\[OVERALL\])"; // Pattern to find the position before the word "[OVERALL]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than having comment update the string name so that it's self readable and also update the rgx name below created from the pattern string


private static Dictionary<string, Tuple<string, double>> GetMetricsMap(string metrics)
{
char seperator = '\n';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Environment.NewLine to avoid issues on different platforms.

@@ -133,6 +133,7 @@
<LinuxProfiles Include="profiles\PERF-SQL-POSTGRESQL.json" />
<LinuxProfiles Include="profiles\PERF-MYSQL-SYSBENCH-OLTP.json" />
<LinuxProfiles Include="profiles\PERF-REDIS.json" />
Copy link
Contributor

@nmalkapuram nmalkapuram Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: indentation

@yangpanMS
Copy link
Contributor

Hey could you help update this? Do we still need this?

@revathygs
Copy link
Author

@yangpanMS - We need this. I am working on the client/server scenario. Will update once ready,

@revathygs revathygs marked this pull request as draft January 30, 2024 04:18
@yangpanMS
Copy link
Contributor

@revathygs hey any updates on this? Could we first onboard this to internal repo?

@revathygs
Copy link
Author

@yangpanMS I think the task to include client server scenarios for mongo db are picked up by someone else in VC team

@yangpanMS
Copy link
Contributor

Closing. Please reopen as needed.

@yangpanMS yangpanMS closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants