use pool in SendMessageBenchmark

pull/13476/head
Jan Tattermusch 7 years ago
parent 2e631706e2
commit 21cde3d22a
  1. 5
      src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs

@ -52,10 +52,7 @@ namespace Grpc.Microbenchmarks
private void ThreadBody(int iterations, int payloadSize)
{
// TODO(jtattermusch): parametrize by number of pending completions.
// TODO(jtattermusch): parametrize by cached/non-cached BatchContextSafeHandle
var completionRegistry = new CompletionRegistry(environment);
var completionRegistry = new CompletionRegistry(environment, () => environment.BatchContextPool.Lease());
var cq = CompletionQueueSafeHandle.CreateAsync(completionRegistry);
var call = CreateFakeCall(cq);

Loading…
Cancel
Save