/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | FakeClockTest.java | 49 .schedule(newRunnable(), 100L, TimeUnit.NANOSECONDS); in testScheduledExecutorService_isDone() 62 .schedule(newRunnable(), 100L, TimeUnit.NANOSECONDS); in testScheduledExecutorService_cancel() 75 .schedule(newRunnable(), 100L, TimeUnit.NANOSECONDS); in testScheduledExecutorService_getDelay() 78 assertEquals(10L, future.getDelay(TimeUnit.NANOSECONDS)); in testScheduledExecutorService_getDelay() 93 TimeUnit.NANOSECONDS); in testScheduledExecutorService_result() 109 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch() 113 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch() 118 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch() 123 assertEquals(expectedElapsedNanos, stopwatch.elapsed(TimeUnit.NANOSECONDS)); in testStopWatch() 132 scheduledExecutorService.schedule(newRunnable(), 200L, TimeUnit.NANOSECONDS); in testPendingAndDueTasks() [all …]
|
D | ReschedulerTest.java | 46 rescheduler.reschedule(1, TimeUnit.NANOSECONDS); in runs() 57 rescheduler.reschedule(1, TimeUnit.NANOSECONDS); in cancels() 70 rescheduler.reschedule(1, TimeUnit.NANOSECONDS); in cancelPermanently() 83 rescheduler.reschedule(1, TimeUnit.NANOSECONDS); in reschedules() 86 rescheduler.reschedule(50, TimeUnit.NANOSECONDS); in reschedules() 102 rescheduler.reschedule(50, TimeUnit.NANOSECONDS); in reschedulesShortDelay() 105 rescheduler.reschedule(1, TimeUnit.NANOSECONDS); in reschedulesShortDelay()
|
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/ |
D | StopwatchTest.java | 21 import static java.util.concurrent.TimeUnit.NANOSECONDS; 47 assertEquals(0, unstartedStopwatch.elapsed(NANOSECONDS)); in testCreateUnstarted() 52 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testInitialState() 101 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testReset_new() 104 assertEquals(3, stopwatch.elapsed(NANOSECONDS)); in testReset_new() 110 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testReset_whileRunning() 112 assertEquals(2, stopwatch.elapsed(NANOSECONDS)); in testReset_whileRunning() 116 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testReset_whileRunning() 122 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testElapsed_whileRunning() 125 assertEquals(345, stopwatch.elapsed(NANOSECONDS)); in testElapsed_whileRunning() [all …]
|
/external/guava/guava/src/com/google/common/base/ |
D | Stopwatch.java | 26 import static java.util.concurrent.TimeUnit.NANOSECONDS; 208 return desiredUnit.convert(elapsedNanos(), NANOSECONDS); in elapsed() 219 double value = (double) nanos / NANOSECONDS.convert(1, unit); in toString() 226 if (DAYS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 229 if (HOURS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 232 if (MINUTES.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 235 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 238 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 241 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 244 return NANOSECONDS; in chooseUnit() [all …]
|
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/ |
D | Stopwatch.java | 26 import static java.util.concurrent.TimeUnit.NANOSECONDS; 207 return desiredUnit.convert(elapsedNanos(), NANOSECONDS); in elapsed() 211 if (DAYS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 214 if (HOURS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 217 if (MINUTES.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 220 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 223 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 226 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 229 return NANOSECONDS; in chooseUnit() 234 case NANOSECONDS: in abbreviate()
|
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/ |
D | KeepAliveEnforcerTest.java | 35 new KeepAliveEnforcer(true, -1, TimeUnit.NANOSECONDS); in negativeTime() 45 KeepAliveEnforcer enforcer = new KeepAliveEnforcer(true, 0, TimeUnit.NANOSECONDS, ticker); in permitLimitless() 65 KeepAliveEnforcer enforcer = new KeepAliveEnforcer(false, 0, TimeUnit.NANOSECONDS, ticker); in strikeOutBecauseNoOutstandingCalls() 75 KeepAliveEnforcer enforcer = new KeepAliveEnforcer(false, 0, TimeUnit.NANOSECONDS, ticker); in startsIdle() 84 KeepAliveEnforcer enforcer = new KeepAliveEnforcer(true, 1, TimeUnit.NANOSECONDS, ticker); in strikeOutBecauseRateTooHighWhileActive() 94 KeepAliveEnforcer enforcer = new KeepAliveEnforcer(true, 1, TimeUnit.NANOSECONDS, ticker); in strikeOutBecauseRateTooHighWhileIdle() 104 KeepAliveEnforcer enforcer = new KeepAliveEnforcer(false, 1, TimeUnit.NANOSECONDS, ticker); in permitInRateWhileActive() 114 KeepAliveEnforcer enforcer = new KeepAliveEnforcer(true, 1, TimeUnit.NANOSECONDS, ticker); in permitInRateWhileIdle() 125 false, KeepAliveEnforcer.IMPLICIT_PERMIT_TIME_NANOS * 10, TimeUnit.NANOSECONDS, ticker); in implicitPermittedWhileIdle() 136 false, KeepAliveEnforcer.IMPLICIT_PERMIT_TIME_NANOS * 10, TimeUnit.NANOSECONDS, ticker); in implicitOverridesWhileActive() [all …]
|
/external/guava/guava-tests/test/com/google/common/base/ |
D | StopwatchTest.java | 21 import static java.util.concurrent.TimeUnit.NANOSECONDS; 48 assertEquals(0, unstartedStopwatch.elapsed(NANOSECONDS)); in testCreateUnstarted() 53 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testInitialState() 102 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testReset_new() 105 assertEquals(3, stopwatch.elapsed(NANOSECONDS)); in testReset_new() 111 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testReset_whileRunning() 113 assertEquals(2, stopwatch.elapsed(NANOSECONDS)); in testReset_whileRunning() 117 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testReset_whileRunning() 123 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); in testElapsed_whileRunning() 126 assertEquals(345, stopwatch.elapsed(NANOSECONDS)); in testElapsed_whileRunning() [all …]
|
/external/grpc-grpc-java/core/src/jmh/java/io/grpc/ |
D | StatusBenchmark.java | 37 @OutputTimeUnit(TimeUnit.NANOSECONDS) 47 @OutputTimeUnit(TimeUnit.NANOSECONDS) 57 @OutputTimeUnit(TimeUnit.NANOSECONDS) 68 @OutputTimeUnit(TimeUnit.NANOSECONDS) 79 @OutputTimeUnit(TimeUnit.NANOSECONDS) 89 @OutputTimeUnit(TimeUnit.NANOSECONDS)
|
/external/caliper/caliper/src/test/java/com/google/caliper/worker/ |
D | RuntimeWorkerTest.java | 21 import static java.util.concurrent.TimeUnit.NANOSECONDS; 44 oneCycle.times(INITIAL_REPS).to(NANOSECONDS), TIMING_INTERVAL.to(NANOSECONDS), 0.0); in testCalculateTargetReps_tinyBenchmark() 51 calculateTargetReps(INITIAL_REPS, HOURS.toNanos(1), TIMING_INTERVAL.to(NANOSECONDS), 0.0); in testCalculateTargetReps_hugeBenchmark() 57 TIMING_INTERVAL.to(NANOSECONDS), 0.5); in testCalculateTargetReps_applyRandomness()
|
/external/grpc-grpc-java/core/src/jmh/java/io/grpc/internal/ |
D | ChannelzBenchmark.java | 93 @OutputTimeUnit(TimeUnit.NANOSECONDS) 100 @OutputTimeUnit(TimeUnit.NANOSECONDS) 107 @OutputTimeUnit(TimeUnit.NANOSECONDS) 114 @OutputTimeUnit(TimeUnit.NANOSECONDS) 121 @OutputTimeUnit(TimeUnit.NANOSECONDS) 128 @OutputTimeUnit(TimeUnit.NANOSECONDS)
|
/external/opencensus-java/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/ |
D | StartEndSpanBenchmark.java | 73 @OutputTimeUnit(TimeUnit.NANOSECONDS) 90 @OutputTimeUnit(TimeUnit.NANOSECONDS) 107 @OutputTimeUnit(TimeUnit.NANOSECONDS) 120 @OutputTimeUnit(TimeUnit.NANOSECONDS) 137 @OutputTimeUnit(TimeUnit.NANOSECONDS) 154 @OutputTimeUnit(TimeUnit.NANOSECONDS)
|
D | RecordTraceEventsBenchmark.java | 86 @OutputTimeUnit(TimeUnit.NANOSECONDS) 95 @OutputTimeUnit(TimeUnit.NANOSECONDS) 104 @OutputTimeUnit(TimeUnit.NANOSECONDS) 116 @OutputTimeUnit(TimeUnit.NANOSECONDS)
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
D | Uninterruptibles.java | 19 import static java.util.concurrent.TimeUnit.NANOSECONDS; 85 return latch.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly() 173 return future.get(remainingNanos, NANOSECONDS); in getUninterruptibly() 201 NANOSECONDS.timedJoin(toJoin, remainingNanos); in joinUninterruptibly() 275 NANOSECONDS.sleep(remainingNanos); in sleepUninterruptibly() 316 return semaphore.tryAcquire(permits, remainingNanos, NANOSECONDS); in tryAcquireUninterruptibly()
|
/external/guava/guava-gwt/test-super/com/google/common/testing/super/com/google/common/testing/ |
D | FakeTickerTest.java | 45 assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS)); in testAutoIncrementStep_returnsSameInstance() 49 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); in testAutoIncrementStep_nanos() 70 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); in testAutoIncrementStep_resetToZero() 86 ticker.setAutoIncrementStep(-1, TimeUnit.NANOSECONDS); in testAutoIncrement_negative()
|
/external/guava/guava-testlib/test/com/google/common/testing/ |
D | FakeTickerTest.java | 56 assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS)); in testAutoIncrementStep_returnsSameInstance() 60 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); in testAutoIncrementStep_nanos() 81 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); in testAutoIncrementStep_resetToZero() 97 ticker.setAutoIncrementStep(-1, TimeUnit.NANOSECONDS); in testAutoIncrement_negative() 129 new FakeTicker().setAutoIncrementStep(incrementByNanos, TimeUnit.NANOSECONDS); in testConcurrentAutoIncrementStep()
|
/external/caliper/caliper/src/main/java/com/google/caliper/runner/ |
D | TrialRunLoop.java | 18 import static java.util.concurrent.TimeUnit.NANOSECONDS; 94 timeLimitNanos - trialStopwatch.elapsed(NANOSECONDS), in call() 95 NANOSECONDS); in call() 125 timeLimitNanos = trialStopwatch.elapsed(NANOSECONDS) + cleanupTimeNanos; in call() 197 return timeLimit.to(NANOSECONDS); in getTrialTimeLimitTrialNanos()
|
/external/guava/guava-gwt/test-super/com/google/common/cache/super/com/google/common/cache/ |
D | CacheBuilderTest.java | 23 import static java.util.concurrent.TimeUnit.NANOSECONDS; 120 .expireAfterWrite(1, NANOSECONDS) in testTimeToLive_small() 145 .expireAfterAccess(1, NANOSECONDS) in testTimeToIdle_small() 162 .expireAfterWrite(1, NANOSECONDS) in testTimeToIdleAndToLive() 163 .expireAfterAccess(1, NANOSECONDS) in testTimeToIdleAndToLive()
|
/external/grpc-grpc-java/context/src/test/java/io/grpc/ |
D | DeadlineTest.java | 113 assertTrue(d.timeRemaining(TimeUnit.NANOSECONDS) > 0); in shortDeadlineEventuallyExpires() 135 Deadline after = Deadline.after(Long.MAX_VALUE, TimeUnit.NANOSECONDS, ticker); in deadlineDoesNotOverflowOrUnderflow() 138 Deadline before = Deadline.after(-Long.MAX_VALUE, TimeUnit.NANOSECONDS, ticker); in deadlineDoesNotOverflowOrUnderflow() 187 verify(mockScheduler).schedule(runnableCaptor.capture(), eq(50000L), eq(TimeUnit.NANOSECONDS)); in runOnEventualExpirationIsExecuted() 206 verify(mockScheduler).schedule(runnableCaptor.capture(), eq(0L), eq(TimeUnit.NANOSECONDS)); in runOnAlreadyExpiredIsExecutedOnExecutor() 226 ticker.increment(1, TimeUnit.NANOSECONDS); in compareTo_greater() 234 ticker.increment(1, TimeUnit.NANOSECONDS); in compareTo_less()
|
/external/mockito/src/test/java/org/mockitoutil/ |
D | Stopwatch.java | 13 import static java.util.concurrent.TimeUnit.NANOSECONDS; 68 …throw new MockitoAssertionError(format(message, NANOSECONDS.toMillis(expectedNanos), NANOSECONDS.t… in fail()
|
/external/opencensus-java/contrib/agent/src/jmh/java/io/opencensus/contrib/agent/instrumentation/ |
D | ExecutorInstrumentationBenchmark.java | 53 @OutputTimeUnit(TimeUnit.NANOSECONDS) 66 @OutputTimeUnit(TimeUnit.NANOSECONDS) 79 @OutputTimeUnit(TimeUnit.NANOSECONDS)
|
/external/guava/guava-tests/test/com/google/common/collect/ |
D | QueuesTest.java | 94 int elements = drain(q, buf, 100, Long.MAX_VALUE, TimeUnit.NANOSECONDS, interruptibly); in testMultipleProducers() 163 int elements = Queues.drain(q, buf, -1, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in testNegativeMaxElements() 169 Queues.drain(q, buf, 1, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in testNegativeMaxElements() 181 Queues.drain(q, ImmutableList.of(), 100, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in testDrain_throws() 204 Queues.drainUninterruptibly(q, buf, 100, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in testDrainUninterruptibly_doesNotThrow() 254 Queues.drain(q, Lists.newArrayList(), 1, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in assertInterruptibleDrained()
|
/external/grpc-grpc-java/netty/src/jmh/java/io/grpc/netty/ |
D | InboundHeadersBenchmark.java | 90 @OutputTimeUnit(TimeUnit.NANOSECONDS) 100 @OutputTimeUnit(TimeUnit.NANOSECONDS) 110 @OutputTimeUnit(TimeUnit.NANOSECONDS) 120 @OutputTimeUnit(TimeUnit.NANOSECONDS)
|
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/ |
D | Rescheduler.java | 63 wakeUp = scheduler.schedule(new FutureRunnable(), delayNanos, TimeUnit.NANOSECONDS); in reschedule() 99 new FutureRunnable(), runAtNanos - now, TimeUnit.NANOSECONDS); in run() 114 return stopwatch.elapsed(TimeUnit.NANOSECONDS); in nanoTime()
|
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/ |
D | MaxConnectionIdleManager.java | 76 shutdownTask, nextIdleMonitorTime - ticker.nanoTime(), TimeUnit.NANOSECONDS); in start() 88 scheduler.schedule(shutdownTask, maxConnectionIdleInNanos, TimeUnit.NANOSECONDS); in start() 112 .schedule(shutdownTask, maxConnectionIdleInNanos, TimeUnit.NANOSECONDS); in onTransportIdle()
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
D | ConnectionPoolTest.java | 48 ConnectionPool pool = new ConnectionPool(Integer.MAX_VALUE, 100L, TimeUnit.NANOSECONDS); in connectionsEvictedWhenIdleLongEnough() 80 ConnectionPool pool = new ConnectionPool(Integer.MAX_VALUE, 100L, TimeUnit.NANOSECONDS); in inUseConnectionsNotEvicted() 104 ConnectionPool pool = new ConnectionPool(Integer.MAX_VALUE, 100L, TimeUnit.NANOSECONDS); in cleanupPrioritizesEarliestEviction() 136 ConnectionPool pool = new ConnectionPool(2, 100L, TimeUnit.NANOSECONDS); in oldestConnectionsEvictedIfIdleLimitExceeded() 160 ConnectionPool pool = new ConnectionPool(2, 100L, TimeUnit.NANOSECONDS); in leakedAllocation()
|