/external/guava/guava-tests/test/com/google/common/base/ |
D | StopwatchTest.java | 38 private final Stopwatch stopwatch = new Stopwatch(ticker); field in StopwatchTest 52 assertFalse(stopwatch.isRunning()); in testInitialState() 53 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testInitialState() 57 assertSame(stopwatch, stopwatch.start()); in testStart() 58 assertTrue(stopwatch.isRunning()); in testStart() 62 stopwatch.start(); in testStart_whileRunning() 64 stopwatch.start(); in testStart_whileRunning() 68 assertTrue(stopwatch.isRunning()); in testStart_whileRunning() 72 stopwatch.start(); in testStop() 73 assertSame(stopwatch, stopwatch.stop()); in testStop() [all …]
|
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/ |
D | StopwatchTest.java | 37 private final Stopwatch stopwatch = new Stopwatch(ticker); field in StopwatchTest 51 assertFalse(stopwatch.isRunning()); in testInitialState() 52 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testInitialState() 56 assertSame(stopwatch, stopwatch.start()); in testStart() 57 assertTrue(stopwatch.isRunning()); in testStart() 61 stopwatch.start(); in testStart_whileRunning() 63 stopwatch.start(); in testStart_whileRunning() 67 assertTrue(stopwatch.isRunning()); in testStart_whileRunning() 71 stopwatch.start(); in testStop() 72 assertSame(stopwatch, stopwatch.stop()); in testStop() [all …]
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | RateLimiterTest.java | 51 private final FakeStopwatch stopwatch = new FakeStopwatch(); field in RateLimiterTest 54 RateLimiter limiter = RateLimiter.create(stopwatch, 5.0); in testSimple() 118 RateLimiter limiter = RateLimiter.create(stopwatch, 5.0); in testSimpleWithWait() 120 stopwatch.sleepMillis(200); // U0.20, we are ready for the next request... in testSimpleWithWait() 127 RateLimiter limiter = RateLimiter.create(stopwatch, 5.0); in testSimpleAcquireReturnValues() 129 stopwatch.sleepMillis(200); // U0.20, we are ready for the next request... in testSimpleAcquireReturnValues() 136 RateLimiter limiter = RateLimiter.create(stopwatch, 5.0); in testSimpleAcquireEarliestAvailableIsInPast() 138 stopwatch.sleepMillis(400); in testSimpleAcquireEarliestAvailableIsInPast() 145 RateLimiter limiter = RateLimiter.create(stopwatch, 5.0); in testOneSecondBurst() 146 stopwatch.sleepMillis(1000); // max capacity reached in testOneSecondBurst() [all …]
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
D | RateLimiter.java | 137 static RateLimiter create(SleepingStopwatch stopwatch, double permitsPerSecond) { in create() argument 138 RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0 /* maxBurstSeconds */); in create() 174 SleepingStopwatch stopwatch, double permitsPerSecond, long warmupPeriod, TimeUnit unit) { in create() argument 175 RateLimiter rateLimiter = new SmoothWarmingUp(stopwatch, warmupPeriod, unit); in create() 184 private final SleepingStopwatch stopwatch; field in RateLimiter 202 RateLimiter(SleepingStopwatch stopwatch) { in RateLimiter() argument 203 this.stopwatch = checkNotNull(stopwatch); in RateLimiter() 229 doSetRate(permitsPerSecond, stopwatch.readMicros()); in setRate() 274 stopwatch.sleepMicrosUninterruptibly(microsToWait); in acquire() 287 return reserveAndGetWaitLength(permits, stopwatch.readMicros()); in reserve() [all …]
|
D | SmoothRateLimiter.java | 230 SmoothWarmingUp(SleepingStopwatch stopwatch, long warmupPeriod, TimeUnit timeUnit) { in SmoothWarmingUp() argument 231 super(stopwatch); in SmoothWarmingUp() 284 SmoothBursty(SleepingStopwatch stopwatch, double maxBurstSeconds) { in SmoothBursty() argument 285 super(stopwatch); in SmoothBursty() 332 private SmoothRateLimiter(SleepingStopwatch stopwatch) { in SmoothRateLimiter() argument 333 super(stopwatch); in SmoothRateLimiter()
|
D | ServiceManager.java | 483 Stopwatch stopwatch = startupTimers.get(service); in tryStartTiming() local 484 if (stopwatch == null) { in tryStartTiming() 644 Stopwatch stopwatch = startupTimers.get(service); in transitionService() local 645 if (stopwatch == null) { in transitionService() 647 stopwatch = Stopwatch.createStarted(); in transitionService() 648 startupTimers.put(service, stopwatch); in transitionService() 650 if (to.compareTo(RUNNING) >= 0 && stopwatch.isRunning()) { in transitionService() 652 stopwatch.stop(); in transitionService() 654 logger.log(Level.FINE, "Started {0} in {1}.", new Object[] {service, stopwatch}); in transitionService()
|
/external/grpc-grpc/src/csharp/Grpc.IntegrationTesting/ |
D | ClientRunners.cs | 211 var stopwatch = new Stopwatch(); in RunUnary() 222 stopwatch.Restart(); in RunUnary() 224 stopwatch.Stop(); in RunUnary() 227 … threadLocalHistogram.Value.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); in RunUnary() 237 var stopwatch = new Stopwatch(); in RunUnaryAsync() 241 stopwatch.Restart(); in RunUnaryAsync() 243 stopwatch.Stop(); in RunUnaryAsync() 246 … threadLocalHistogram.Value.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); in RunUnaryAsync() 256 var stopwatch = new Stopwatch(); in RunStreamingPingPongAsync() 262 stopwatch.Restart(); in RunStreamingPingPongAsync() [all …]
|
D | StressTestClient.cs | 146 var stopwatch = Stopwatch.StartNew(); in RunBodyAsync() 150 stopwatch.Stop(); in RunBodyAsync() 151 histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); in RunBodyAsync()
|
/external/guice/core/src/com/google/inject/internal/ |
D | InternalInjectorCreator.java | 60 private final Stopwatch stopwatch = new Stopwatch(); field in InternalInjectorCreator 103 shells = shellBuilder.build(initializer, bindingData, stopwatch, errors); in build() 104 stopwatch.resetAndLog("Injector construction"); in build() 123 stopwatch.resetAndLog("Binding initialization"); in initializeStatically() 128 stopwatch.resetAndLog("Binding indexing"); in initializeStatically() 131 stopwatch.resetAndLog("Collecting injection requests"); in initializeStatically() 134 stopwatch.resetAndLog("Binding validation"); in initializeStatically() 137 stopwatch.resetAndLog("Static validation"); in initializeStatically() 140 stopwatch.resetAndLog("Instance member validation"); in initializeStatically() 146 stopwatch.resetAndLog("Provider verification"); in initializeStatically() [all …]
|
D | InjectorShell.java | 125 Stopwatch stopwatch, in build() argument 154 stopwatch.resetAndLog("Module execution"); in build() 160 stopwatch.resetAndLog("Interceptors creation"); in build() 170 stopwatch.resetAndLog("TypeListeners & ProvisionListener creation"); in build() 173 stopwatch.resetAndLog("Scopes creation"); in build() 176 stopwatch.resetAndLog("Converters creation"); in build() 187 stopwatch.resetAndLog("Binding creation"); in build() 190 stopwatch.resetAndLog("Module annotated method scanners creation"); in build() 199 injectorShells.addAll(builder.build(initializer, bindingData, stopwatch, errors)); in build() 201 stopwatch.resetAndLog("Private environment creation"); in build()
|
/external/grpc-grpc/src/csharp/Grpc.Core/Utils/ |
D | BenchmarkUtil.cs | 46 var stopwatch = new Stopwatch(); in RunBenchmark() 47 stopwatch.Start(); in RunBenchmark() 52 stopwatch.Stop(); in RunBenchmark() 53 logger.Info("Elapsed time: {0}ms", stopwatch.ElapsedMilliseconds); in RunBenchmark() 54 …Info("Ops per second: {0}", (int)((double)benchmarkIterations * 1000 / stopwatch.ElapsedMilliseco… in RunBenchmark()
|
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/ |
D | Rescheduler.java | 37 private final Stopwatch stopwatch; field in Rescheduler 46 Stopwatch stopwatch) { in Rescheduler() argument 50 this.stopwatch = stopwatch; in Rescheduler() 51 stopwatch.start(); in Rescheduler() 114 return stopwatch.elapsed(TimeUnit.NANOSECONDS); in nanoTime()
|
D | Http2Ping.java | 48 private final Stopwatch stopwatch; field in Http2Ping 81 public Http2Ping(long data, Stopwatch stopwatch) { in Http2Ping() argument 83 this.stopwatch = stopwatch; in Http2Ping() 131 roundTripTimeNanos = this.roundTripTimeNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); in complete()
|
D | CensusStatsModule.java | 313 private final Stopwatch stopwatch; field in CensusStatsModule.ClientCallTracer 331 this.stopwatch = module.stopwatchSupplier.get().start(); in ClientCallTracer() 383 stopwatch.stop(); in callEnded() 384 long roundtripNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); in callEnded() 478 private final Stopwatch stopwatch; field in CensusStatsModule.ServerTracer 497 this.stopwatch = stopwatchSupplier.get().start(); in ServerTracer() 587 stopwatch.stop(); in streamClosed() 588 long elapsedTimeNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); in streamClosed()
|
D | DnsNameResolver.java | 134 private final Stopwatch stopwatch; field in DnsNameResolver 147 Stopwatch stopwatch) { in DnsNameResolver() argument 170 this.stopwatch = Preconditions.checkNotNull(stopwatch, "stopwatch"); in DnsNameResolver() 204 && stopwatch.elapsed(TimeUnit.NANOSECONDS) > networkAddressCacheTtlNanos); 239 stopwatch.reset().start();
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | FakeClockTest.java | 102 Stopwatch stopwatch = fakeClock.getStopwatchSupplier().get(); in testStopWatch() local 105 stopwatch.start(); in testStopWatch() 109 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch() 113 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch() 115 stopwatch.stop(); in testStopWatch() 118 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch() 120 stopwatch.reset(); in testStopWatch() 123 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch()
|
/external/caliper/caliper/src/main/java/com/google/caliper/worker/ |
D | MacrobenchmarkWorker.java | 42 private final Stopwatch stopwatch; field in MacrobenchmarkWorker 50 this.stopwatch = Stopwatch.createUnstarted(ticker); in MacrobenchmarkWorker() 68 stopwatch.start(); in measure() 70 long nanos = stopwatch.stop().elapsed(NANOSECONDS); in measure() 71 stopwatch.reset(); in measure()
|
/external/grpc-grpc/examples/csharp/RouteGuide/RouteGuideServer/ |
D | RouteGuideImpl.cs | 73 var stopwatch = new Stopwatch(); in RecordRoute() 74 stopwatch.Start(); in RecordRoute() 91 stopwatch.Stop(); in RecordRoute() 98 ElapsedTime = (int)(stopwatch.ElapsedMilliseconds / 1000) in RecordRoute()
|
/external/grpc-grpc/src/csharp/Grpc.Microbenchmarks/ |
D | PInvokeByteArrayBenchmark.cs | 52 var stopwatch = Stopwatch.StartNew(); in ThreadBody() 60 stopwatch.Stop(); in ThreadBody() 61 Console.WriteLine("Elapsed millis: " + stopwatch.ElapsedMilliseconds); in ThreadBody()
|
D | CompletionRegistryBenchmark.cs | 57 var stopwatch = Stopwatch.StartNew(); in ThreadBody() 64 stopwatch.Stop(); in ThreadBody() 65 Console.WriteLine("Elapsed millis: " + stopwatch.ElapsedMilliseconds); in ThreadBody()
|
D | SendMessageBenchmark.cs | 63 var stopwatch = Stopwatch.StartNew(); in ThreadBody() 70 stopwatch.Stop(); in ThreadBody() 71 Console.WriteLine("Elapsed millis: " + stopwatch.ElapsedMilliseconds); in ThreadBody()
|
/external/caliper/caliper/src/main/java/com/google/caliper/runner/ |
D | ConsoleOutput.java | 58 private final Stopwatch stopwatch; field in ConsoleOutput 61 ConsoleOutput(@Stdout PrintWriter stdout, int numberOfTrials, Stopwatch stopwatch) { in ConsoleOutput() argument 64 this.stopwatch = stopwatch; in ConsoleOutput() 145 stdout.format("Execution complete: %s.%n", stopwatch.stop()); in close()
|
D | ExperimentingCaliperRun.java | 152 Stopwatch stopwatch = Stopwatch.createStarted(); in run() local 157 ConsoleOutput output = new ConsoleOutput(stdout, totalTrials, stopwatch); in run()
|
/external/grpc-grpc-java/testing/src/main/java/io/grpc/testing/ |
D | GrpcCleanupRule.java | 52 private Stopwatch stopwatch = Stopwatch.createUnstarted(); field in GrpcCleanupRule 80 this.stopwatch = Stopwatch.createUnstarted(ticker); in setTicker() 150 stopwatch.start(); 166 timeoutNanos - stopwatch.elapsed(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS);
|
/external/guava/guava-tests/benchmark/com/google/common/base/ |
D | StopwatchBenchmark.java | 32 @Benchmark long stopwatch(int reps) { in stopwatch() method in StopwatchBenchmark
|