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

Adding Lat_Rd_Mem support in LMBENCH #420

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ protected override async Task ExecuteAsync(EventContext telemetryContext, Cancel
await this.LogProcessDetailsAsync(executeBinary, telemetryContext);
executeBinary.ThrowIfErrored<WorkloadException>(ProcessProxy.DefaultSuccessCodes, errorReason: ErrorReason.WorkloadFailed);
LatMemRdMetricsParser latMemRdMetricsParser = new LatMemRdMetricsParser($"{executeBinary.StandardOutput.ToString()}{executeBinary.StandardError.ToString()}");
this.CaptureMetrics(executeBinary, latMemRdMetricsParser, telemetryContext);
this.CaptureMetrics(executeBinary, latMemRdMetricsParser, telemetryContext, this.BinaryName);
}
}
}
Expand Down Expand Up @@ -238,7 +238,7 @@ private Task BuildSourceCodeAsync(EventContext telemetryContext, CancellationTok
});
}

private void CaptureMetrics(IProcessProxy process, MetricsParser metricsParser, EventContext telemetryContext)
private void CaptureMetrics(IProcessProxy process, MetricsParser metricsParser, EventContext telemetryContext, string scenario)
Copy link
Contributor

Choose a reason for hiding this comment

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

telemetryContext at last parameter

{
this.MetadataContract.AddForScenario(
"LMbench",
Expand All @@ -251,7 +251,7 @@ private void CaptureMetrics(IProcessProxy process, MetricsParser metricsParser,

this.Logger.LogMetrics(
toolName: "LMbench",
scenarioName: "Memory Benchmark",
scenarioName: scenario,
process.StartTime,
process.ExitTime,
metrics,
Expand Down Expand Up @@ -326,7 +326,7 @@ private Task ExecuteWorkloadAsync(EventContext telemetryContext, CancellationTok
// The use of the original telemetry context created at the top
// is purposeful.
LMbenchMetricsParser lmbenchMetricsParser = new LMbenchMetricsParser(process.StandardOutput.ToString());
this.CaptureMetrics(process, lmbenchMetricsParser, relatedContext);
this.CaptureMetrics(process, lmbenchMetricsParser, relatedContext, "Memory Benchmark");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:Avoid spaces as much as we could, use an underscore

}
});
}
Expand Down