Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resources:
options: --entrypoint=""

variables:
VcVersion : 1.13.7
VcVersion : 1.13.8
ROOT: $(Build.SourcesDirectory)
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
ENABLE_PRS_DELAYSIGN: 1
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pool:
vmImage: windows-latest

variables:
VcVersion : 1.13.7
VcVersion : 1.13.8
ROOT: $(Build.SourcesDirectory)
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
ENABLE_PRS_DELAYSIGN: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
3 Threads
1 Connections per thread
120 Seconds


ALL STATS
============================================================================================================================================================
Type Ops/sec Hits/sec Misses/sec Avg. Latency p50 Latency p90 Latency p95 Latency p99 Latency p99.9 Latency KB/sec
------------------------------------------------------------------------------------------------------------------------------------------------------------
Sets 39687.53 --- --- 1.44784 1.35900 2.46300 3.00700 4.57500 8.70300 50661.28
Gets 92604.15 92604.15 0.00 1.44246 1.35900 2.46300 2.99100 4.57500 8.70300 117368.48
Waits 0.00 --- --- --- --- --- --- --- --- ---
Totals 132291.67 92604.15 0.00 1.44408 1.35900 2.46300 2.99100 4.57500 8.70300 168029.76
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,48 @@ public void MemtierMetricsParserParsesTheExpectedMetricsFromRedisResultsCorrectl
MetricAssert.Exists(metrics, "SET_Latency-P99.9_Avg", 1.54300, MetricUnit.Milliseconds);
}

[Test]
public void MemtierMetricsParserParsesTheExpectedMetricsFromRedisResultsCorrectly_4()
{
List<string> resultsList = new List<string>();
string results = File.ReadAllText(Path.Combine(MockFixture.ExamplesDirectory, @"Memtier\RedisResults_4.txt"));
resultsList.Add(results);
var parser = new MemtierMetricsParser(false, resultsList);

IList<Metric> metrics = parser.Parse();

Assert.AreEqual(138, metrics.Count);

MetricAssert.Exists(metrics, "Throughput_Avg", 132291.67, MetricUnit.RequestsPerSec);
MetricAssert.Exists(metrics, "Bandwidth_Avg", 168029.76, MetricUnit.KilobytesPerSecond);
MetricAssert.Exists(metrics, "Hits/sec_Avg", 92604.15);
MetricAssert.Exists(metrics, "Misses/sec_Avg", 0);
MetricAssert.Exists(metrics, "Latency-Avg_Avg", 1.44408, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "Latency-P50_Avg", 1.359, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "Latency-P90_Avg", 2.463, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "Latency-P95_Avg", 2.991, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "Latency-P99_Avg", 4.575, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "Latency-P99.9_Avg", 8.703, MetricUnit.Milliseconds);

MetricAssert.Exists(metrics, "GET_Throughput_Avg", 92604.15, MetricUnit.RequestsPerSec);
MetricAssert.Exists(metrics, "GET_Bandwidth_Avg", 117368.48, MetricUnit.KilobytesPerSecond);
MetricAssert.Exists(metrics, "GET_Latency-Avg_Avg", 1.44246, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "GET_Latency-P50_Avg", 1.359, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "GET_Latency-P90_Avg", 2.463, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "GET_Latency-P95_Avg", 2.991, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "GET_Latency-P99_Avg", 4.575, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "GET_Latency-P99.9_Avg", 8.703, MetricUnit.Milliseconds);

MetricAssert.Exists(metrics, "SET_Throughput_Avg", 39687.53, MetricUnit.RequestsPerSec);
MetricAssert.Exists(metrics, "SET_Bandwidth_Avg", 50661.28, MetricUnit.KilobytesPerSecond);
MetricAssert.Exists(metrics, "SET_Latency-Avg_Avg", 1.44784, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "SET_Latency-P50_Avg", 1.359, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "SET_Latency-P90_Avg", 2.463, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "SET_Latency-P95_Avg", 3.007, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "SET_Latency-P99_Avg", 4.575, MetricUnit.Milliseconds);
MetricAssert.Exists(metrics, "SET_Latency-P99.9_Avg", 8.703, MetricUnit.Milliseconds);
}

[Test]
public void MemtierMetricsParserParsesTheExpectedMetricsFromRedisForMoreThan1RedisServerInstancesResultsCorrectly_1()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class MemtierBenchmarkClientExecutor : MemcachedExecutor
private List<Metric> aggregatedMetrics;
private List<string> perProcessOutputList;
private List<string> perProcessCommandList;
private string commonAggregateMetricCommandArguments;
private int startingServerPort;

/// <summary>
Expand Down Expand Up @@ -347,6 +348,7 @@ private void CaptureMetrics(DateTime startTime, DateTime endTime, EventContext t

MemtierMetricsParser memtierMetricsAggregateParser = new MemtierMetricsParser(this.PerProcessMetric, this.perProcessOutputList, this.perProcessCommandList);
IList<Metric> metrics = memtierMetricsAggregateParser.Parse();

string commandline = "commandline";

foreach (Metric metric in metrics)
Expand All @@ -360,7 +362,7 @@ private void CaptureMetrics(DateTime startTime, DateTime endTime, EventContext t
metric.Value,
metric.Unit,
null,
metric.Metadata.ContainsKey(commandline) ? (string)metric.Metadata[commandline] : null,
metric.Metadata.ContainsKey(commandline) ? (string)metric.Metadata[commandline] : this.commonAggregateMetricCommandArguments,
this.Tags,
telemetryContext,
metric.Relativity);
Expand Down Expand Up @@ -429,11 +431,6 @@ private Task ExecuteWorkloadsAsync(IPAddress serverIPAddress, ServerState server

if (!this.WarmUp)
{
foreach (string output in this.perProcessOutputList)
{
Console.WriteLine($"output is : {output}");
}

this.CaptureMetrics(startTime, endTime, telemetryContext, cancellationToken);
}
}
Expand Down Expand Up @@ -473,7 +470,8 @@ private async Task ExecuteWorkloadAsync(int serverPort, string command, string c
if (!this.WarmUp)
{
string output = process.StandardOutput.ToString();
string parsedCommandArguments = this.ParseCommand(process.FullCommand(), serverPort);
this.commonAggregateMetricCommandArguments = this.ParseCommand(process.FullCommand());
string parsedCommandArguments = (this.commonAggregateMetricCommandArguments + @$" --VCpuID {serverPort - this.startingServerPort}").Trim();
this.perProcessOutputList.Add(output);
this.perProcessCommandList.Add(parsedCommandArguments);
}
Expand Down Expand Up @@ -522,7 +520,7 @@ private async Task<ServerState> GetServerStateAsync(IApiClient serverApiClient,
return state.Definition;
}

private string ParseCommand(string command, int serverPort)
private string ParseCommand(string command)
{
List<string> excludingRegexList = new List<string>
{
Expand All @@ -543,7 +541,6 @@ private string ParseCommand(string command, int serverPort)

command = Regex.Replace(command, @"\s+", " "); // Removes extra spaces

command += @$" --VCpuID {serverPort - this.startingServerPort}";
return command.Trim();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class MemtierMetricsParser : MetricsParser
// Totals 48271.29 43444.12 0.00 2.62213 2.75100 3.90300 4.41500 7.42300 29.31100 4053.46
private static readonly Regex GetsExpression = new Regex(@"(?<=Gets).*(?=\n)", RegexOptions.IgnoreCase);
private static readonly Regex SetsExpression = new Regex(@"(?<=Sets).*(?=\n)", RegexOptions.IgnoreCase);
private static readonly Regex TotalsExpression = new Regex(@"(?<=Totals).*(?=\n)", RegexOptions.IgnoreCase);
private static readonly Regex TotalsExpression = new Regex(@"(?<=Totals).*", RegexOptions.IgnoreCase);

private bool perProcessMetric = false;
private List<string> memtierCommandLines = new List<string>();
Expand All @@ -54,11 +54,9 @@ public override IList<Metric> Parse()
List<Metric> combinedMetrics = new List<Metric>();
List<string> rawTextList = this.RawText.Split(ProcessResultSectionDelimiter).Select(s => s.Trim()).ToList();

Console.WriteLine($"rawTextListLength: {rawTextList.Count}");
for (int i = 0; i < rawTextList.Count; i++)
{
string rawText = rawTextList[i];
Console.WriteLine($"rawText {i}: {rawText}");
// Example Format:
//
// ALL STATS
Expand Down