From 26b3c41398aa541b3a1c1fb4e890c63c6bf0cfa1 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Thu, 16 Mar 2023 12:10:05 +0300 Subject: [PATCH] Diff order for statistics as string (#128) --- .../Reporter/Statistics/StatisticsCounter.cs | 2 +- .../Reporter/Statistics/StatisticsFixture.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReportPortal.Shared/Reporter/Statistics/StatisticsCounter.cs b/src/ReportPortal.Shared/Reporter/Statistics/StatisticsCounter.cs index 6062ce04..50810dee 100644 --- a/src/ReportPortal.Shared/Reporter/Statistics/StatisticsCounter.cs +++ b/src/ReportPortal.Shared/Reporter/Statistics/StatisticsCounter.cs @@ -69,7 +69,7 @@ public void Measure(TimeSpan duration) /// A string that represents the statistics counter. public override string ToString() { - return $"{Count} cnt min/max/avg {Min.TotalMilliseconds:F0}/{Max.TotalMilliseconds:F0}/{Avg.TotalMilliseconds:F0} ms"; + return $"{Count} cnt min/avg/max {Min.TotalMilliseconds:F0}/{Avg.TotalMilliseconds:F0}/{Max.TotalMilliseconds:F0} ms"; } } } diff --git a/test/ReportPortal.Shared.Tests/Reporter/Statistics/StatisticsFixture.cs b/test/ReportPortal.Shared.Tests/Reporter/Statistics/StatisticsFixture.cs index 195f93ac..50f917d8 100644 --- a/test/ReportPortal.Shared.Tests/Reporter/Statistics/StatisticsFixture.cs +++ b/test/ReportPortal.Shared.Tests/Reporter/Statistics/StatisticsFixture.cs @@ -100,7 +100,7 @@ public void ShouldHaveStringRepresentation() counter.Measure(2.222.Seconds()); counter.Measure(3.333.Seconds()); - counter.ToString().Should().Be("3 cnt min/max/avg 1111/3333/2222 ms"); + counter.ToString().Should().Be("3 cnt min/avg/max 1111/2222/3333 ms"); } [Fact]