Esempio n. 1
0
 public void CompletionQueueCreateDestroyBenchmark()
 {
     BenchmarkUtil.RunBenchmark(
         100000, 1000000,
         () => {
         CompletionQueueSafeHandle cq = CompletionQueueSafeHandle.Create();
         cq.Dispose();
     }
         );
 }
Esempio n. 2
0
        public void CompletionQueueCreateDestroyBenchmark()
        {
            GrpcEnvironment.AddRef();  // completion queue requires gRPC environment being initialized.

            BenchmarkUtil.RunBenchmark(
                10, 10,
                () =>
            {
                CompletionQueueSafeHandle cq = CompletionQueueSafeHandle.Create();
                cq.Dispose();
            });

            GrpcEnvironment.ReleaseAsync().Wait();
        }