Class StoreTimerSnapshot.CounterSnapshot
- java.lang.Object
-
- com.apple.foundationdb.record.provider.common.StoreTimerSnapshot.CounterSnapshot
-
- Enclosing class:
- StoreTimerSnapshot
public static class StoreTimerSnapshot.CounterSnapshot extends Object
An immutable snapshot of aStoreTimer.Counter
.Contains the number of occurrences and cummulative time spent on an associated event.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StoreTimerSnapshot.CounterSnapshot
from(StoreTimer.Counter counter)
Creates an immutable snapshot of aStoreTimer.Counter
.int
getCount()
Get the number of occurrences of the associated event.long
getTimeNanos()
Get the cumulative time spent on the associated event.
-
-
-
Method Detail
-
from
@Nonnull public static StoreTimerSnapshot.CounterSnapshot from(@Nonnull StoreTimer.Counter counter)
Creates an immutable snapshot of aStoreTimer.Counter
.- Parameters:
counter
- to create the snapshot from- Returns:
- immutable snapshot of the provided counter
-
getCount
@Nonnull public int getCount()
Get the number of occurrences of the associated event.- Returns:
- the number of occurrences of the associated event
-
getTimeNanos
public long getTimeNanos()
Get the cumulative time spent on the associated event.- Returns:
- the cumulative time spent on the associated event
-
-