diff options
Diffstat (limited to 'src/csharp/Grpc.Core')
-rw-r--r-- | src/csharp/Grpc.Core/Profiling/IProfiler.cs | 2 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Profiling/ProfilerEntry.cs | 3 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Profiling/Profilers.cs | 13 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/VersionInfo.cs | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/src/csharp/Grpc.Core/Profiling/IProfiler.cs b/src/csharp/Grpc.Core/Profiling/IProfiler.cs index c426c365d2..e850375004 100644 --- a/src/csharp/Grpc.Core/Profiling/IProfiler.cs +++ b/src/csharp/Grpc.Core/Profiling/IProfiler.cs @@ -41,7 +41,9 @@ namespace Grpc.Core.Profiling internal interface IProfiler { void Begin(string tag); + void End(string tag); + void Mark(string tag); } } diff --git a/src/csharp/Grpc.Core/Profiling/ProfilerEntry.cs b/src/csharp/Grpc.Core/Profiling/ProfilerEntry.cs index 5cc4c3c054..792e3c3cd0 100644 --- a/src/csharp/Grpc.Core/Profiling/ProfilerEntry.cs +++ b/src/csharp/Grpc.Core/Profiling/ProfilerEntry.cs @@ -40,7 +40,8 @@ namespace Grpc.Core.Profiling { internal struct ProfilerEntry { - public enum Type { + public enum Type + { BEGIN, END, MARK diff --git a/src/csharp/Grpc.Core/Profiling/Profilers.cs b/src/csharp/Grpc.Core/Profiling/Profilers.cs index c8123347f2..471ee20875 100644 --- a/src/csharp/Grpc.Core/Profiling/Profilers.cs +++ b/src/csharp/Grpc.Core/Profiling/Profilers.cs @@ -40,12 +40,12 @@ namespace Grpc.Core.Profiling { internal static class Profilers { - static readonly NopProfiler defaultProfiler = new NopProfiler(); + static readonly NopProfiler DefaultProfiler = new NopProfiler(); static readonly ThreadLocal<IProfiler> profilers = new ThreadLocal<IProfiler>(); public static IProfiler ForCurrentThread() { - return profilers.Value ?? defaultProfiler; + return profilers.Value ?? DefaultProfiler; } public static void SetForCurrentThread(IProfiler profiler) @@ -89,15 +89,18 @@ namespace Grpc.Core.Profiling this.entries = new ProfilerEntry[capacity]; } - public void Begin(string tag) { + public void Begin(string tag) + { AddEntry(new ProfilerEntry(Timespec.PreciseNow, ProfilerEntry.Type.BEGIN, tag)); } - public void End(string tag) { + public void End(string tag) + { AddEntry(new ProfilerEntry(Timespec.PreciseNow, ProfilerEntry.Type.END, tag)); } - public void Mark(string tag) { + public void Mark(string tag) + { AddEntry(new ProfilerEntry(Timespec.PreciseNow, ProfilerEntry.Type.MARK, tag)); } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index e9ec30e923..818ddb83b9 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -41,6 +41,6 @@ namespace Grpc.Core /// <summary> /// Current version of gRPC C# /// </summary> - public const string CurrentVersion = "0.7.1"; + public const string CurrentVersion = "0.12.0"; } } |