From 99867ff168e5555ccec05f1d5da7bf9d2303261f Mon Sep 17 00:00:00 2001 From: askmeegs Date: Mon, 19 Aug 2019 09:25:43 -0400 Subject: [PATCH] remove stopwatch from health check --- src/cartservice/HealthImpl.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/cartservice/HealthImpl.cs b/src/cartservice/HealthImpl.cs index f535b39..66e4a10 100644 --- a/src/cartservice/HealthImpl.cs +++ b/src/cartservice/HealthImpl.cs @@ -1,6 +1,5 @@ using System; using System.Threading.Tasks; -using static System.Diagnostics.Stopwatch; using cartservice.interfaces; using Grpc.Core; using Grpc.Health.V1; @@ -15,13 +14,9 @@ namespace cartservice { } public override Task Check(HealthCheckRequest request, ServerCallContext context){ - var watch = StartNew(); var result = Task.FromResult(new HealthCheckResponse { Status = dependency.Ping() ? HealthCheckResponse.Types.ServingStatus.Serving : HealthCheckResponse.Types.ServingStatus.NotServing }); - watch.Stop(); - var elapsedMs = watch.ElapsedMilliseconds; - Console.WriteLine ("✅ Health Check took " + elapsedMs + "ms"); return result; } }