@Test public void logsSlowestOperationIfMultipleOperationsExceedTheSlowThresholdIfFirst() { accumulateLogsWithCall(TWO_CENTURIES, profilingTimelockService::getFreshTimestamp); flushLogsWithCall(LONG_DURATION, () -> profilingTimelockService.startIdentifiedAtlasDbTransactionBatch(1)); verifyLoggerInvokedOnceWithSpecificProfile("getFreshTimestamp", TWO_CENTURIES); }
@Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return runTaskTimed("startIdentifiedAtlasDbTransactionBatch", () -> delegate.startIdentifiedAtlasDbTransactionBatch(count)); }
ProfilingTimelockService implements AutoCloseable, TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return runTaskTimed("startIdentifiedAtlasDbTransactionBatch", () -> delegate.startIdentifiedAtlasDbTransactionBatch(count)); } }
ProfilingTimelockService implements AutoCloseable, TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return runTaskTimed("startIdentifiedAtlasDbTransactionBatch", () -> delegate.startIdentifiedAtlasDbTransactionBatch(count)); } @VisibleForTesting  ProfilingTimelockService(
            Logger logger,
            TimelockService delegate,
            Supplier<Stopwatch> stopwatchSupplier,
            BooleanSupplier loggingPermissionSupplier); }
ProfilingTimelockService implements AutoCloseable, TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return runTaskTimed("startIdentifiedAtlasDbTransactionBatch", () -> delegate.startIdentifiedAtlasDbTransactionBatch(count)); } @VisibleForTesting  ProfilingTimelockService(
            Logger logger,
            TimelockService delegate,
            Supplier<Stopwatch> stopwatchSupplier,
            BooleanSupplier loggingPermissionSupplier); static ProfilingTimelockService create(TimelockService delegate); @Override boolean isInitialized(); @Override long getFreshTimestamp(); @Override long getCommitTimestamp(long startTs, LockToken commitLocksToken); @Override TimestampRange getFreshTimestamps(int numTimestampsRequested); @Override LockImmutableTimestampResponse lockImmutableTimestamp(); @Override List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count); @Override long getImmutableTimestamp(); @Override LockResponse lock(LockRequest request); @Override WaitForLocksResponse waitForLocks(WaitForLocksRequest request); @Override Set<LockToken> refreshLockLeases(Set<LockToken> tokens); @Override Set<LockToken> unlock(Set<LockToken> tokens); @Override void tryUnlock(Set<LockToken> tokens); @Override long currentTimeMillis(); @Override void close(); }
ProfilingTimelockService implements AutoCloseable, TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return runTaskTimed("startIdentifiedAtlasDbTransactionBatch", () -> delegate.startIdentifiedAtlasDbTransactionBatch(count)); } @VisibleForTesting  ProfilingTimelockService(
            Logger logger,
            TimelockService delegate,
            Supplier<Stopwatch> stopwatchSupplier,
            BooleanSupplier loggingPermissionSupplier); static ProfilingTimelockService create(TimelockService delegate); @Override boolean isInitialized(); @Override long getFreshTimestamp(); @Override long getCommitTimestamp(long startTs, LockToken commitLocksToken); @Override TimestampRange getFreshTimestamps(int numTimestampsRequested); @Override LockImmutableTimestampResponse lockImmutableTimestamp(); @Override List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count); @Override long getImmutableTimestamp(); @Override LockResponse lock(LockRequest request); @Override WaitForLocksResponse waitForLocks(WaitForLocksRequest request); @Override Set<LockToken> refreshLockLeases(Set<LockToken> tokens); @Override Set<LockToken> unlock(Set<LockToken> tokens); @Override void tryUnlock(Set<LockToken> tokens); @Override long currentTimeMillis(); @Override void close();  }