Skip to content

Commit

Permalink
chore: update loadgen to be more specific for numberOfConcurrentReque…
Browse files Browse the repository at this point in the history
…sts caveat
  • Loading branch information
pratik151192 committed Oct 30, 2023
1 parent 2900922 commit c7c8a62
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/MomentoLoadGen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public async Task Run()
)
);
var statsPrinterTask = LaunchStatsPrinterTask(
context,
_options.showStatsInterval,
context,
_options.showStatsInterval,
cancellationTokenSource.Token
);
asyncTasks.Append(statsPrinterTask);
Expand All @@ -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");
Expand Down Expand Up @@ -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),
///
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit c7c8a62

Please sign in to comment.