CatapultServer
v0.5.0.1 (Elephant)
|
constexpr Timestamp SubtractNonNegative(const Timestamp ×tamp, const TimeSpan &timeSpan)
Subtracts timeSpan from timestamp and returns the maximum of the difference and zero.
Definition: TimeSpan.h:139
RollbackCounterType
Rollback counter types.
Definition: RollbackStats.h:28
void prune(Timestamp threshold)
Prunes statistics below time threshold.
Definition: RollbackStats.cpp:54
size_t m_currentRollbackSize
Definition: RollbackInfo.h:65
Represents a time duration.
Definition: TimeSpan.h:30
void save()
Adds counter to committed statistics and resets the counter.
Definition: RollbackInfo.cpp:49
void reset()
Adds counter to ignored statistics and resets the counter.
Definition: RollbackInfo.cpp:42
const utils::TimeSpan m_recentStatsTimeSpan
Definition: RollbackInfo.h:64
void increment()
Increments counter.
Definition: RollbackInfo.cpp:38
TimeSupplier m_timeSupplier
Definition: JointValidator.cpp:85
RollbackStats m_ignored
Definition: RollbackInfo.h:68
RollbackResult
Rollback results.
Definition: RollbackInfo.h:31
Committed rollback counters.
Container for both committed and ignored rollback statistics.
Definition: RollbackInfo.h:40
uint64_t total(RollbackCounterType rollbackCounterType) const
Returns statistics for a type (rollbackCounterType).
Definition: RollbackStats.cpp:30
RollbackInfo(const chain::TimeSupplier &timeSupplier, const utils::TimeSpan &recentStatsTimeSpan)
Creates a container around timeSupplier with recent stats span (recentStatsTimeSpan).
Definition: RollbackInfo.cpp:26
supplier< Timestamp > TimeSupplier
Supplies a timestamp.
Definition: ChainFunctions.h:39
Ignored rollback counters.
Definition: AddressExtractionExtension.cpp:28
size_t counter(RollbackResult rollbackResult, RollbackCounterType rollbackCounterType) const
Returns rollback counter for result (rollbackResult) and counter type (rollbackCounterType).
Definition: RollbackInfo.cpp:32
Container for rollback statistics.
Definition: RollbackStats.h:40
RollbackStats m_committed
Definition: RollbackInfo.h:67
chain::TimeSupplier m_timeSupplier
Definition: RollbackInfo.h:63
void add(Timestamp timestamp, size_t rollbackSize)
Adds info about rollbackSize at timestamp to current statistics.
Definition: RollbackStats.cpp:45
void prune()
Definition: RollbackInfo.cpp:56