remove existing profiling points

pull/8713/head
Jan Tattermusch 8 years ago
parent 475e06bb12
commit b35dfa83b5
  1. 9
      src/csharp/Grpc.Core/Internal/AsyncCall.cs
  2. 11
      src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
  3. 3
      src/csharp/Grpc.Core/Internal/CallSafeHandle.cs
  4. 3
      src/csharp/Grpc.Core/Internal/ChannelSafeHandle.cs
  5. 3
      src/csharp/Grpc.Core/Internal/CompletionQueueSafeHandle.cs
  6. 3
      src/csharp/Grpc.Core/Internal/MetadataArraySafeHandle.cs

@ -387,8 +387,6 @@ namespace Grpc.Core.Internal
}
private void Initialize(CompletionQueueSafeHandle cq)
{
using (Profilers.ForCurrentThread().NewScope("AsyncCall.Initialize"))
{
var call = CreateNativeCall(cq);
@ -396,11 +394,8 @@ namespace Grpc.Core.Internal
InitializeInternal(call);
RegisterCancellationCallback();
}
}
private INativeCall CreateNativeCall(CompletionQueueSafeHandle cq)
{
using (Profilers.ForCurrentThread().NewScope("AsyncCall.CreateNativeCall"))
{
if (injectedNativeCall != null)
{
@ -418,7 +413,6 @@ namespace Grpc.Core.Internal
return result;
}
}
}
// Make sure that once cancellationToken for this call is cancelled, Cancel() will be called.
private void RegisterCancellationCallback()
@ -456,8 +450,6 @@ namespace Grpc.Core.Internal
// NOTE: because this event is a result of batch containing GRPC_OP_RECV_STATUS_ON_CLIENT,
// success will be always set to true.
using (Profilers.ForCurrentThread().NewScope("AsyncCall.HandleUnaryResponse"))
{
TaskCompletionSource<object> delayedStreamingWriteTcs = null;
TResponse msg = default(TResponse);
var deserializeException = TryDeserialize(receivedMessage, out msg);
@ -497,7 +489,6 @@ namespace Grpc.Core.Internal
unaryResponseTcs.SetResult(msg);
}
}
/// <summary>
/// Handles receive status completion for calls with streaming response.

@ -180,8 +180,6 @@ namespace Grpc.Core.Internal
/// the underlying native resources.
/// </summary>
protected bool ReleaseResourcesIfPossible()
{
using (Profilers.ForCurrentThread().NewScope("AsyncCallBase.ReleaseResourcesIfPossible"))
{
if (!disposed && call != null)
{
@ -194,7 +192,6 @@ namespace Grpc.Core.Internal
}
return false;
}
}
protected abstract bool IsClient
{
@ -228,23 +225,16 @@ namespace Grpc.Core.Internal
protected abstract Task CheckSendAllowedOrEarlyResult();
protected byte[] UnsafeSerialize(TWrite msg)
{
using (Profilers.ForCurrentThread().NewScope("AsyncCallBase.UnsafeSerialize"))
{
return serializer(msg);
}
}
protected Exception TryDeserialize(byte[] payload, out TRead msg)
{
using (Profilers.ForCurrentThread().NewScope("AsyncCallBase.TryDeserialize"))
{
try
{
msg = deserializer(payload);
return null;
}
catch (Exception e)
{
@ -252,7 +242,6 @@ namespace Grpc.Core.Internal
return e;
}
}
}
/// <summary>
/// Handles send completion (including SendCloseFromClient).

@ -75,13 +75,10 @@ namespace Grpc.Core.Internal
}
public void StartUnary(BatchContextSafeHandle ctx, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags)
{
using (Profilers.ForCurrentThread().NewScope("CallSafeHandle.StartUnary"))
{
Native.grpcsharp_call_start_unary(this, ctx, payload, new UIntPtr((ulong)payload.Length), metadataArray, writeFlags)
.CheckOk();
}
}
public void StartClientStreaming(UnaryResponseClientHandler callback, MetadataArraySafeHandle metadataArray)
{

@ -64,8 +64,6 @@ namespace Grpc.Core.Internal
}
public CallSafeHandle CreateCall(CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CallCredentialsSafeHandle credentials)
{
using (Profilers.ForCurrentThread().NewScope("ChannelSafeHandle.CreateCall"))
{
var result = Native.grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline);
if (credentials != null)
@ -75,7 +73,6 @@ namespace Grpc.Core.Internal
result.Initialize(cq);
return result;
}
}
public ChannelState CheckConnectivityState(bool tryToConnect)
{

@ -69,12 +69,9 @@ namespace Grpc.Core.Internal
}
public CompletionQueueEvent Pluck(IntPtr tag)
{
using (Profilers.ForCurrentThread().NewScope("CompletionQueueSafeHandle.Pluck"))
{
return Native.grpcsharp_completion_queue_pluck(this, tag);
}
}
/// <summary>
/// Creates a new usage scope for this completion queue. Once successfully created,

@ -47,8 +47,6 @@ namespace Grpc.Core.Internal
}
public static MetadataArraySafeHandle Create(Metadata metadata)
{
using (Profilers.ForCurrentThread().NewScope("MetadataArraySafeHandle.Create"))
{
if (metadata.Count == 0)
{
@ -64,7 +62,6 @@ namespace Grpc.Core.Internal
}
return metadataArray;
}
}
/// <summary>
/// Reads metadata from pointer to grpc_metadata_array

Loading…
Cancel
Save