52 class CT = LegacyStatsClock<std::chrono::seconds>,
57 static_assert(std::numeric_limits<T>::is_signed,
"");
165 template <
typename ReturnType =
double>
166 ReturnType
avg(
size_t level)
const {
170 return folly::detail::avgHelper<ReturnType>(total, nsamples);
174 template <
typename ReturnType =
double>
179 return folly::detail::avgHelper<ReturnType>(total, nsamples);
186 template <
typename ReturnType =
double>
187 ReturnType
rate(
size_t level)
const {
191 return folly::detail::rateHelper<ReturnType, Duration, Duration>(
199 template <
typename ReturnType =
double>
204 return folly::detail::rateHelper<ReturnType, Duration, Duration>(
328 return bucket.count(
level_);
351 return bucket.template avg<ValueType>(
level_);
358 template <
typename ReturnType>
364 return bucket.template avg<ReturnType>(
start_,
end_);
folly::detail::HistogramBuckets< ValueType, ContainerType > buckets_
void computeAvgData(ValueType *total, uint64_t *nsamples, size_t level) const
uint64_t count(size_t level) const
size_t getNumBuckets() const
std::string getString(size_t level) const
ValueType getBucketMin(size_t bucketIdx) const
std::chrono::steady_clock::time_point now()
ReturnType rate(size_t level) const
ValueType getBucketSize() const
uint64_t operator()(const ContainerType &bucket) const
ReturnType operator()(const ContainerType &bucket) const
void update(TimePoint now)
ValueType sum(TimePoint start, TimePoint end) const
—— Concurrent Priority Queue Implementation ——
ReturnType avg(size_t level) const
void addValue(Duration now, const ValueType &value)
CountFromInterval(TimePoint start, TimePoint end)
void addValues(TimePoint now, const folly::Histogram< ValueType > &values)
void maybeHandleSingleUniqueValue(const ValueType &value)
ValueType getBucketSize() const
AvgFromLevel(size_t level)
uint64_t count(TimePoint start, TimePoint end) const
size_t getNumBuckets() const
ValueType getBucketMin(size_t idx) const
CountFromLevel(size_t level)
AvgFromInterval(TimePoint start, TimePoint end)
typename Clock::duration Duration
auto end(TestAdlIterable &instance)
uint64_t operator()(const ContainerType &bucket) const
ValueType getPercentileEstimate(double pct, size_t level) const
ReturnType avg(TimePoint start, TimePoint end) const
BucketType & getByIndex(size_t idx)
ValueType operator()(const ContainerType &bucket) const
void addValue(Duration now, const ValueType &value, uint64_t times)
void addValues(Duration now, const folly::Histogram< ValueType > &values)
ValueType getPercentileBucketMin(double pct, size_t level) const
void computeRateData(ValueType *total, Duration *elapsed, size_t level) const
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
size_t getPercentileBucketIdx(double pct, size_t level) const
void addValue(TimePoint now, const ValueType &value)
size_t getNumLevels() const
void update(Duration now)
Future< Unit > times(const int n, F &&thunk)
ValueType sum(size_t level) const
const ContainerType & getBucket(size_t bucketIdx) const
typename Clock::time_point TimePoint
TimeseriesHistogram(ValueType bucketSize, ValueType min, ValueType max, const ContainerType &defaultContainer)
ReturnType rate(TimePoint start, TimePoint end) const
ValueType getPercentileBucketMin(double pct, TimePoint start, TimePoint end) const
std::vector< int > values(1'000)