Added some measurement numbers to comments.

pull/722/head
Jan Tattermusch 10 years ago
parent a0fcfcc1fa
commit 5b141669e6
  1. 10
      src/csharp/Grpc.Core.Tests/PInvokeTest.cs

@ -65,6 +65,9 @@ namespace Grpc.Core.Tests
GrpcEnvironment.Shutdown(); GrpcEnvironment.Shutdown();
} }
/// <summary>
/// (~1.26us .NET Windows)
/// </summary>
[Test] [Test]
public void CompletionQueueCreateDestroyBenchmark() public void CompletionQueueCreateDestroyBenchmark()
{ {
@ -80,7 +83,8 @@ namespace Grpc.Core.Tests
/// <summary> /// <summary>
/// Approximate results: /// Approximate results:
/// (mono ~80ns) /// (~80ns Mono Linux)
/// (~110ns .NET Windows)
/// </summary> /// </summary>
[Test] [Test]
public void NativeCallbackBenchmark() public void NativeCallbackBenchmark()
@ -100,7 +104,8 @@ namespace Grpc.Core.Tests
/// <summary> /// <summary>
/// Creating a new native-to-managed callback has significant overhead /// Creating a new native-to-managed callback has significant overhead
/// compared to using an existing one. We need to be aware of this. /// compared to using an existing one. We need to be aware of this.
/// (~50us on mono) /// (~50us on Mono Linux!!!)
/// (~1.1us on .NET Windows)
/// </summary> /// </summary>
[Test] [Test]
public void NewNativeCallbackBenchmark() public void NewNativeCallbackBenchmark()
@ -117,6 +122,7 @@ namespace Grpc.Core.Tests
/// <summary> /// <summary>
/// Tests overhead of a simple PInvoke call. /// Tests overhead of a simple PInvoke call.
/// (~46ns .NET Windows)
/// </summary> /// </summary>
[Test] [Test]
public void NopPInvokeBenchmark() public void NopPInvokeBenchmark()

Loading…
Cancel
Save