Skip to content

Commit

Permalink
Fix for consumer benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanayx committed Oct 1, 2023
1 parent 2e245a2 commit 992c323
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/CsharpExamples/Simple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ internal static async Task RunSimple()
// warmup
for (var i = 0; i < n / 10; i++)
{
await consumer.ReceiveAsync();
var message = await consumer.ReceiveAsync();
await consumer.AcknowledgeAsync(message.MessageId);
}

var sw = new Stopwatch();
sw.Start();
for (var i = 0; i < n / 10; i++)
for (var i = 0; i < n; i++)
{
var message = await consumer.ReceiveAsync();
await consumer.AcknowledgeAsync(message.MessageId);
Expand Down

0 comments on commit 992c323

Please sign in to comment.