Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyredondo committed Nov 24, 2024
1 parent 05f2703 commit ded34e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions src/TimeItSharp.Common/Exporters/ConsoleExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ public void Export(TimeitResult results)
"[dodgerblue1 bold]Mean[/]",
"[dodgerblue1 bold]StdDev[/]",
"[dodgerblue1 bold]StdErr[/]",
"[dodgerblue1 bold]Min[/]",
"[dodgerblue1 bold]Median[/]",
"[dodgerblue1 bold]Max[/]",
"[dodgerblue1 bold]CI 100%[/]",
"[dodgerblue1 bold]P95[/]",
"[dodgerblue1 bold]P90[/]",
"[dodgerblue1 bold]Outliers[/]"
Expand Down Expand Up @@ -147,9 +146,10 @@ public void Export(TimeitResult results)
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Mean), 3)}ms[/]",
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Stdev), 3)}ms[/]",
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.StdErr), 3)}ms[/]",
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Min), 3)}ms[/]",
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Median), 3)}ms[/]",
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Max), 3)}ms[/]",
Math.Abs(result.Min - result.Max) > 0.0001 ?
$"[aqua][[{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Min), 3)} - {Math.Round(Utils.FromNanosecondsToMilliseconds(result.Max), 3)}]] ms[/]" :
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Min), 3)}ms[/]",
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.P95), 3)}ms[/]",
$"[aqua]{Math.Round(Utils.FromNanosecondsToMilliseconds(result.P90), 3)}ms[/]",
$"[aqua]{outliersValue}[/]"
Expand Down Expand Up @@ -210,9 +210,10 @@ public void Export(TimeitResult results)
Math.Round(mMean, 3).ToString(CultureInfo.InvariantCulture),
Math.Round(mStdDev, 3).ToString(CultureInfo.InvariantCulture),
Math.Round(mStdErr, 3).ToString(CultureInfo.InvariantCulture),
Math.Round(mMin, 3).ToString(CultureInfo.InvariantCulture),
Math.Round(mMedian, 3).ToString(CultureInfo.InvariantCulture),
Math.Round(mMax, 3).ToString(CultureInfo.InvariantCulture),
Math.Abs(mMin - mMax) > 0.0001 ?
$"[[{Math.Round(mMin, 3).ToString(CultureInfo.InvariantCulture)} - {Math.Round(mMax, 3).ToString(CultureInfo.InvariantCulture)}]]" :
Math.Round(mMin, 3).ToString(CultureInfo.InvariantCulture),
Math.Round(mP95, 3).ToString(CultureInfo.InvariantCulture),
Math.Round(mP90, 3).ToString(CultureInfo.InvariantCulture),
(metricsOutliers.Count == 0 ? "0" : metricsOutliers.Count + " {" + Math.Round(metricsThreshold, 3) + "}"));
Expand All @@ -228,9 +229,10 @@ public void Export(TimeitResult results)
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Mean), 3)}ms",
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Stdev), 3)}ms",
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.StdErr), 3)}ms",
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Min), 3)}ms",
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Median), 3)}ms",
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Max), 3)}ms",
Math.Abs(result.Min - result.Max) > 0.0001 ?
$"[[{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Min), 3)} - {Math.Round(Utils.FromNanosecondsToMilliseconds(result.Max), 3)}]] ms" :
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.Min), 3)}ms",
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.P95), 3)}ms",
$"{Math.Round(Utils.FromNanosecondsToMilliseconds(result.P90), 3)}ms",
$"{outliersValue}"
Expand Down
6 changes: 3 additions & 3 deletions src/TimeItSharp.Common/ScenarioProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ await RunScenarioAsync(_configuration.WarmUpCount, index, scenario, TimeItPhase.
return null;
}

AnsiConsole.MarkupLine(" Duration: {0}s", watch.Elapsed);
AnsiConsole.MarkupLine(" Duration: {0}", watch.Elapsed);
}

AnsiConsole.Markup(" [green3]Run[/]");
Expand All @@ -240,7 +240,7 @@ await RunScenarioAsync(_configuration.WarmUpCount, index, scenario, TimeItPhase.
}

watch.Stop();
AnsiConsole.MarkupLine(" Duration: {0}s", watch.Elapsed);
AnsiConsole.MarkupLine(" Duration: {0}", watch.Elapsed);

foreach (var repeat in scenarioStartArgs.GetRepeats())
{
Expand All @@ -255,7 +255,7 @@ await RunScenarioAsync(repeat.Count, index, scenario, TimeItPhase.ExtraRun, fals
return null;
}

AnsiConsole.MarkupLine(" Duration: {0}s", watch.Elapsed);
AnsiConsole.MarkupLine(" Duration: {0}", watch.Elapsed);
}

scenario.ParentService = null;
Expand Down

0 comments on commit ded34e7

Please sign in to comment.