From eff9cf0d6794203b17d17d129a311ccf9fb9c33f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 5 Apr 2016 10:37:35 -0700 Subject: make interarrival timer generate the right QPS with poisson load --- src/csharp/Grpc.IntegrationTesting/InterarrivalTimers.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/csharp/Grpc.IntegrationTesting/InterarrivalTimers.cs b/src/csharp/Grpc.IntegrationTesting/InterarrivalTimers.cs index e8d7cbe8bb..6492d34890 100644 --- a/src/csharp/Grpc.IntegrationTesting/InterarrivalTimers.cs +++ b/src/csharp/Grpc.IntegrationTesting/InterarrivalTimers.cs @@ -78,8 +78,6 @@ namespace Grpc.IntegrationTesting /// public class PoissonInterarrivalTimer : IInterarrivalTimer { - const double NanosToSeconds = 1e-9; - readonly ExponentialDistribution exponentialDistribution; DateTime? lastEventTime; @@ -119,7 +117,7 @@ namespace Grpc.IntegrationTesting } var origLastEventTime = this.lastEventTime.Value; - this.lastEventTime = origLastEventTime + TimeSpan.FromSeconds(exponentialDistribution.Next() * NanosToSeconds); + this.lastEventTime = origLastEventTime + TimeSpan.FromSeconds(exponentialDistribution.Next()); return this.lastEventTime.Value - origLastEventTime; } -- cgit v1.2.3