From c7c8a62c5276935eeac9ec954c062e4d8ed4a528 Mon Sep 17 00:00:00 2001 From: Pratik Agarwal Date: Mon, 30 Oct 2023 11:28:03 -0300 Subject: [PATCH] chore: update loadgen to be more specific for numberOfConcurrentRequests caveat --- examples/MomentoLoadGen/Program.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/MomentoLoadGen/Program.cs b/examples/MomentoLoadGen/Program.cs index 0b443dce..6ac4e56d 100644 --- a/examples/MomentoLoadGen/Program.cs +++ b/examples/MomentoLoadGen/Program.cs @@ -126,8 +126,8 @@ public async Task Run() ) ); var statsPrinterTask = LaunchStatsPrinterTask( - context, - _options.showStatsInterval, + context, + _options.showStatsInterval, cancellationTokenSource.Token ); asyncTasks.Append(statsPrinterTask); @@ -138,7 +138,7 @@ public async Task Run() // tasks throws an uncaught exception. var firstResult = await Task.WhenAny(asyncTasks); await firstResult; - + await Task.WhenAll(asyncTasks); } _logger.LogInformation("Done"); @@ -412,7 +412,7 @@ static async Task Main(string[] args) /// /// Each time this amount of time has passed, statistics about throughput and latency /// will be printed. - /// + /// /// showStatsInterval: TimeSpan.FromSeconds(5), /// @@ -427,7 +427,8 @@ static async Task Main(string[] args) /// but it will also increase CPU consumption. As CPU usage increases and there /// is more contention between the concurrent function calls, client-side latencies /// may increase. - /// + /// Note: You are likely to see degraded performance if you increase this above 50 + /// and observe elevated client-side latencies. numberOfConcurrentRequests: 50, /// /// Sets an upper bound on how many requests per second will be sent to the server. @@ -441,10 +442,10 @@ static async Task Main(string[] args) /// howLongToRun: TimeSpan.FromMinutes(1) ); - + using (ILoggerFactory loggerFactory = InitializeLogging(loadGeneratorOptions.logLevel)) { - /// + /// /// This is the configuration that will be used for the Momento client. Choose from /// our pre-built configurations that are optimized for Laptop vs InRegion environments, /// or build your own.