Searched refs:ticker (Results 1 - 25 of 48) sorted by relevance

12

/external/guava/guava-gwt/test-super/com/google/common/testing/super/com/google/common/testing/
H A DFakeTickerTest.java35 FakeTicker ticker = new FakeTicker();
36 assertEquals(0, ticker.read());
37 assertSame(ticker, ticker.advance(10));
38 assertEquals(10, ticker.read());
39 ticker.advance(1, TimeUnit.MILLISECONDS);
40 assertEquals(1000010L, ticker.read());
44 FakeTicker ticker = new FakeTicker();
45 assertSame(ticker, ticker
[all...]
/external/jemalloc/include/jemalloc/internal/
H A Dticker.h24 void ticker_init(ticker_t *ticker, int32_t nticks);
25 void ticker_copy(ticker_t *ticker, const ticker_t *other);
26 int32_t ticker_read(const ticker_t *ticker);
27 bool ticker_ticks(ticker_t *ticker, int32_t nticks);
28 bool ticker_tick(ticker_t *ticker);
33 ticker_init(ticker_t *ticker, int32_t nticks) argument
36 ticker->tick = nticks;
37 ticker->nticks = nticks;
41 ticker_copy(ticker_t *ticker, const ticker_t *other) argument
44 *ticker
48 ticker_read(const ticker_t *ticker) argument
55 ticker_ticks(ticker_t *ticker, int32_t nticks) argument
67 ticker_tick(ticker_t *ticker) argument
[all...]
/external/guava/guava-testlib/test/com/google/common/testing/
H A DFakeTickerTest.java46 FakeTicker ticker = new FakeTicker();
47 assertEquals(0, ticker.read());
48 assertSame(ticker, ticker.advance(10));
49 assertEquals(10, ticker.read());
50 ticker.advance(1, TimeUnit.MILLISECONDS);
51 assertEquals(1000010L, ticker.read());
55 FakeTicker ticker = new FakeTicker();
56 assertSame(ticker, ticker
[all...]
/external/jemalloc/test/unit/
H A Dticker.c7 ticker_t ticker; local
10 ticker_init(&ticker, NTICKS);
13 assert_u_eq(ticker_read(&ticker), NTICKS - j,
14 "Unexpected ticker value (i=%d, j=%d)", i, j);
15 assert_false(ticker_tick(&ticker),
16 "Unexpected ticker fire (i=%d, j=%d)", i, j);
18 assert_u32_eq(ticker_read(&ticker), 0,
19 "Expected ticker depletion");
20 assert_true(ticker_tick(&ticker),
21 "Expected ticker fir
32 ticker_t ticker; local
[all...]
/external/guava/guava-tests/test/com/google/common/base/
H A DStopwatchTest.java37 private final FakeTicker ticker = new FakeTicker(); field in class:StopwatchTest
38 private final Stopwatch stopwatch = new Stopwatch(ticker);
98 ticker.advance(1);
101 ticker.advance(2);
104 ticker.advance(3);
109 ticker.advance(1);
112 ticker.advance(2);
116 ticker.advance(3);
121 ticker.advance(78);
125 ticker
[all...]
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/
H A DStopwatchTest.java36 private final FakeTicker ticker = new FakeTicker(); field in class:StopwatchTest
37 private final Stopwatch stopwatch = new Stopwatch(ticker);
97 ticker.advance(1);
100 ticker.advance(2);
103 ticker.advance(3);
108 ticker.advance(1);
111 ticker.advance(2);
115 ticker.advance(3);
120 ticker.advance(78);
124 ticker
[all...]
/external/guava/guava-tests/test/com/google/common/cache/
H A DCacheExpirationTest.java50 FakeTicker ticker = new FakeTicker();
56 .ticker(ticker)
58 checkExpiration(cache, loader, ticker, removalListener);
62 FakeTicker ticker = new FakeTicker();
68 .ticker(ticker)
70 checkExpiration(cache, loader, ticker, removalListener);
74 FakeTicker ticker, CountingRemovalListener<String, Integer> removalListener) {
86 CacheTesting.expireEntries((LoadingCache<?, ?>) cache, EXPIRING_TIME, ticker);
73 checkExpiration(LoadingCache<String, Integer> cache, WatchedCreatorLoader loader, FakeTicker ticker, CountingRemovalListener<String, Integer> removalListener) argument
122 runExpirationTest(LoadingCache<String, Integer> cache, WatchedCreatorLoader loader, FakeTicker ticker, CountingRemovalListener<String, Integer> removalListener) argument
397 runRemovalScheduler(LoadingCache<String, Integer> cache, CountingRemovalListener<String, Integer> removalListener, WatchedCreatorLoader loader, FakeTicker ticker, String keyPrefix, long ttl) argument
[all...]
H A DCacheRefreshTest.java32 FakeTicker ticker = new FakeTicker();
38 .ticker(ticker)
47 ticker.advance(1, MILLISECONDS);
57 ticker.advance(1, MILLISECONDS);
67 ticker.advance(1, MILLISECONDS);
75 ticker.advance(1, MILLISECONDS);
83 ticker.advance(1, MILLISECONDS);
91 ticker.advance(1, MILLISECONDS);
H A DCacheBuilderGwtTest.java139 .ticker(fakeTicker)
156 .ticker(fakeTicker)
184 .ticker(fakeTicker)
282 .ticker(fakeTicker)
379 .ticker(fakeTicker)
397 .ticker(fakeTicker)
415 .ticker(fakeTicker)
433 .ticker(fakeTicker)
455 .ticker(fakeTicker)
473 .ticker(fakeTicke
[all...]
H A DLocalCacheTest.java167 assertSame(NULL_TICKER, map.ticker);
411 LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder().ticker(testTicker));
412 assertSame(testTicker, map.ticker);
862 FakeTicker ticker = new FakeTicker();
867 .ticker(ticker)
878 ticker.advance(1);
880 ticker.advance(1);
883 ticker.advance(1);
1004 FakeTicker ticker
[all...]
H A DCacheTesting.java414 static void expireEntries(Cache<?, ?> cache, long expiringTime, FakeTicker ticker) { argument
415 checkNotNull(ticker);
416 expireEntries(toLocalCache(cache), expiringTime, ticker);
420 LocalCache<?, ?> cchm, long expiringTime, FakeTicker ticker) {
426 ticker.advance(2 * expiringTime, TimeUnit.MILLISECONDS);
428 long now = ticker.read();
419 expireEntries( LocalCache<?, ?> cchm, long expiringTime, FakeTicker ticker) argument
H A DCacheLoadingTest.java211 FakeTicker ticker = new FakeTicker();
226 .ticker(ticker)
243 ticker.advance(1, MILLISECONDS);
251 ticker.advance(1, MILLISECONDS);
259 ticker.advance(1, MILLISECONDS);
271 FakeTicker ticker = new FakeTicker();
286 .ticker(ticker)
303 ticker
[all...]
H A DCacheBuilderSpecTest.java562 assertEquals("ticker", a.ticker, b.ticker);
H A DCacheBuilderTest.java347 new CacheBuilder<Object, Object>().ticker(testTicker);
350 builder.ticker(testTicker);
/external/guava/guava/src/com/google/common/base/
H A DStopwatch.java65 * supply a fake or mock ticker.
77 private final Ticker ticker; field in class:Stopwatch
98 public static Stopwatch createUnstarted(Ticker ticker) { argument
99 return new Stopwatch(ticker);
118 public static Stopwatch createStarted(Ticker ticker) { argument
119 return new Stopwatch(ticker).start();
140 Stopwatch(Ticker ticker) { argument
141 this.ticker = checkNotNull(ticker, "ticker");
[all...]
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/
H A DStopwatch.java64 * supply a fake or mock ticker.
76 private final Ticker ticker; field in class:Stopwatch
97 public static Stopwatch createUnstarted(Ticker ticker) { argument
98 return new Stopwatch(ticker);
117 public static Stopwatch createStarted(Ticker ticker) { argument
118 return new Stopwatch(ticker).start();
139 Stopwatch(Ticker ticker) { argument
140 this.ticker = checkNotNull(ticker, "ticker");
[all...]
/external/caliper/caliper/src/main/java/com/google/caliper/worker/
H A DRuntimeWorker.java45 protected final Ticker ticker; field in class:RuntimeWorker
52 Method method, Random random, Ticker ticker,
57 this.ticker = ticker;
105 @BenchmarkMethod Method method, Random random, Ticker ticker,
107 super(benchmark, method, random, ticker, workerOptions);
120 long before = ticker.read();
122 return ticker.read() - before;
131 @BenchmarkMethod Method method, Random random, Ticker ticker,
133 super(benchmark, method, random, ticker, workerOption
51 RuntimeWorker(Object benchmark, Method method, Random random, Ticker ticker, Map<String, String> workerOptions) argument
104 Micro(@enchmark Object benchmark, @BenchmarkMethod Method method, Random random, Ticker ticker, @WorkerOptions Map<String, String> workerOptions) argument
130 Pico(@enchmark Object benchmark, @BenchmarkMethod Method method, Random random, Ticker ticker, @WorkerOptions Map<String, String> workerOptions) argument
[all...]
H A DMacrobenchmarkWorker.java48 Ticker ticker, @WorkerOptions Map<String, String> workerOptions) {
50 this.stopwatch = Stopwatch.createUnstarted(ticker);
47 MacrobenchmarkWorker(@enchmark Object benchmark, @BenchmarkMethod Method method, Ticker ticker, @WorkerOptions Map<String, String> workerOptions) argument
/external/guava/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/
H A DLocalCache.java60 private final Ticker ticker; field in class:LocalCache
81 this.ticker = firstNonNull(builder.ticker, Ticker.systemTicker());
119 Timestamped<V> oldValue = cachingHashMap.put(key, new Timestamped<V>(value, ticker));
235 return ticker.read();
245 long startTime = ticker.read();
261 statsCounter.recordLoadException(ticker.read() - startTime);
264 statsCounter.recordLoadException(ticker.read() - startTime);
267 statsCounter.recordLoadException(ticker.read() - startTime);
275 statsCounter.recordLoadSuccess(ticker
305 private final Ticker ticker; field in class:LocalCache.Timestamped
309 Timestamped(V value, Ticker ticker) argument
[all...]
H A DCacheBuilder.java230 Ticker ticker; field in class:CacheBuilder
453 * @throws IllegalStateException if a ticker was already set
455 public CacheBuilder<K, V> ticker(Ticker ticker) { argument
456 checkState(this.ticker == null);
457 this.ticker = checkNotNull(ticker);
462 if (ticker != null) {
463 return ticker;
/external/guava/guava/src/com/google/common/cache/
H A DCacheBuilder.java236 Ticker ticker; field in class:CacheBuilder
698 * @throws IllegalStateException if a ticker was already set
700 public CacheBuilder<K, V> ticker(Ticker ticker) { argument
701 checkState(this.ticker == null);
702 this.ticker = checkNotNull(ticker);
707 if (ticker != null) {
708 return ticker;
H A DLocalCache.java215 final Ticker ticker; field in class:LocalCache
256 ticker = builder.getTicker(recordsTime());
2182 long now = map.ticker.read();
2220 // re-read ticker once inside the lock
2221 long now = map.ticker.read();
2306 // re-read ticker now that loading has completed
2307 long now = map.ticker.read();
2410 long now = map.ticker.read();
2757 long now = map.ticker.read();
2779 long now = map.ticker
4573 final Ticker ticker; field in class:LocalCache.ManualSerializationProxy
4594 ManualSerializationProxy( Strength keyStrength, Strength valueStrength, Equivalence<Object> keyEquivalence, Equivalence<Object> valueEquivalence, long expireAfterWriteNanos, long expireAfterAccessNanos, long maxWeight, Weigher<K, V> weigher, int concurrencyLevel, RemovalListener<? super K, ? super V> removalListener, Ticker ticker, CacheLoader<? super K, V> loader) argument
[all...]
/external/guava/guava-gwt/test-super/com/google/common/cache/super/com/google/common/cache/
H A DCacheBuilderTest.java171 new CacheBuilder<Object, Object>().ticker(testTicker);
174 builder.ticker(testTicker);
/external/jemalloc/
H A DAndroid.mk103 src/ticker.c \
241 test/unit/ticker.c \
/external/guava/guava/src/com/google/common/collect/
H A DMapMaker.java130 Ticker ticker; field in class:MapMaker
447 return MoreObjects.firstNonNull(ticker, Ticker.systemTicker());

Completed in 7142 milliseconds

12