Skip to content

Commit

Permalink
Fix incorrect assertion in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon committed Jul 23, 2024
1 parent 58e2a81 commit bebcfaa
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static void AssertExceptions(IReadOnlyList<Measurement<long>> measurements, int
}
}

public static IEnumerable<object[]> LongMeasurements => new List<object[]>
public static IEnumerable<object[]> Measurements => new List<object[]>
{
new object[] { "dotnet.process.memory.working_set", s_longGreaterThanZero, null },
new object[] { "dotnet.assembly.count", s_longGreaterThanZero, null },
Expand All @@ -234,7 +234,7 @@ static void AssertExceptions(IReadOnlyList<Measurement<long>> measurements, int
new object[] { "dotnet.gc.pause.time", s_doubleGreaterThanOrEqualToZero, s_forceGc }, // may be zero if no GC has occurred
new object[] { "dotnet.jit.compiled_il.size", s_jitHasRun ? s_longGreaterThanZero : s_longGreaterThanOrEqualToZero, null },
new object[] { "dotnet.jit.compiled_methods", s_jitHasRun ? s_longGreaterThanZero : s_longGreaterThanOrEqualToZero, null },
new object[] { "dotnet.jit.compilation.time", s_jitHasRun ? s_longGreaterThanZero : s_longGreaterThanOrEqualToZero, null },
new object[] { "dotnet.jit.compilation.time", s_jitHasRun ? s_doubleGreaterThanZero : s_doubleGreaterThanOrEqualToZero, null },
new object[] { "dotnet.monitor.lock_contentions", s_longGreaterThanOrEqualToZero, null },
new object[] { "dotnet.thread_pool.thread.count", s_longGreaterThanZero, null },
new object[] { "dotnet.thread_pool.work_item.count", s_longGreaterThanOrEqualToZero, null },
Expand All @@ -243,7 +243,7 @@ static void AssertExceptions(IReadOnlyList<Measurement<long>> measurements, int
};

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
[MemberData(nameof(LongMeasurements))]
[MemberData(nameof(Measurements))]
public void ValidateMeasurements<T>(string metricName, Func<T, (bool, string?)>? valueAssertion, Func<bool>? beforeRecord)
where T : struct
{
Expand Down

0 comments on commit bebcfaa

Please sign in to comment.