Skip to content

Commit

Permalink
Fix EventCounter regression test (dotnet/coreclr#25862)
Browse files Browse the repository at this point in the history
Commit migrated from dotnet/coreclr@310c190
  • Loading branch information
sywhang authored Jul 25, 2019
1 parent cb1f51d commit bda62b4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ public static int Main(string[] args)
// The number below is supposed to be 2 at maximum, but in debug builds, the calls to
// EventSource.Write() takes a lot longer than we thought, and the reflection in
// workingset counter also adds a huge amount of time, which makes the test fail in
// debug CIs. Setting the check to 3 to compensate for these.
if (myListener.MaxIncrement > 3)
// debug CIs.
// This gives us 2 + 1 (EventSource delay) + 1 (Reflection delay) = 4 maximum possible increments
// for the very first callback we get in EventListener. Setting the check to 4 to compensate for these.
if (myListener.MaxIncrement > 4)
{
Console.WriteLine($"Test Failed - Saw more than 3 exceptions / sec {myListener.MaxIncrement}");
return 1;
Expand All @@ -114,4 +116,4 @@ public static int Main(string[] args)
}
}
}
}
}

0 comments on commit bda62b4

Please sign in to comment.