Add warning when running stress test with DEBUG build (#2436)

* Add warning when running stress test with DEBUG build

* Revert unexpected change
This commit is contained in:
Tom Tan 2021-09-30 16:20:10 -07:00 committed by GitHub
parent 124c12afdf
commit c0af496fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ public partial class Program
public static void Stress(int concurrency = 0)
{
#if DEBUG
Console.WriteLine("***WARNING*** The current build is DEBUG which may affect timing!\n");
#endif
if (concurrency < 0)
{
throw new ArgumentOutOfRangeException(nameof(concurrency), "concurrency level should be a non-negative number.");