27 template <
typename T,
typename CT,
typename C>
33 : buckets_(bucketSize, min, max, copyMe),
34 haveNotSeenValue_(true),
35 singleUniqueValue_(false) {}
37 template <
typename T,
typename CT,
typename C>
45 template <
typename T,
typename CT,
typename C>
54 template <
typename T,
typename CT,
typename C>
67 myBucket.addValueAggregated(now, histBucket.
sum, histBucket.
count);
75 template <
typename T,
typename CT,
typename C>
89 template <
typename T,
typename CT,
typename C>
100 template <
typename T,
typename CT,
typename C>
115 template <
typename T,
typename CT,
typename C>
118 size_t level)
const {
122 template <
typename T,
typename CT,
typename C>
131 template <
typename T,
typename CT,
typename C>
138 template <
typename T,
typename CT,
typename C>
145 template <
typename T,
typename CT,
typename C>
159 cont.template avg<ValueType>(level),
166 template <
typename T,
typename CT,
typename C>
180 cont.count(start, end),
182 cont.avg(start, end),
189 template <
class T,
class CT,
class C>
193 size_t level)
const {
196 *total += levelObj.sum();
197 *nsamples += levelObj.count();
201 template <
class T,
class CT,
class C>
209 *total += levelObj.sum(start, end);
210 *nsamples += levelObj.count(start, end);
214 template <
typename T,
typename CT,
typename C>
218 size_t level)
const {
221 *total += levelObj.sum();
222 *elapsed =
std::max(*elapsed, levelObj.elapsed());
226 template <
class T,
class CT,
class C>
234 *total += level.sum(start, end);
235 *elapsed =
std::max(*elapsed, level.elapsed(start, end));
ValueType getBucketSize() const
folly::detail::HistogramBuckets< ValueType, ContainerType > buckets_
void computeAvgData(ValueType *total, uint64_t *nsamples, size_t level) const
ValueType getPercentileEstimate(double pct, CountFn countFromBucket, AvgFn avgFromBucket) const
const Bucket & getBucketByIndex(size_t idx) const
size_t getNumBuckets() const
std::string getString(size_t level) const
std::chrono::steady_clock::time_point now()
void update(TimePoint now)
—— Concurrent Priority Queue Implementation ——
void addValues(TimePoint now, const folly::Histogram< ValueType > &values)
void maybeHandleSingleUniqueValue(const ValueType &value)
ValueType getBucketSize() const
BucketType & getByValue(ValueType value)
size_t getNumBuckets() const
ValueType getBucketMin(size_t idx) const
typename Clock::duration Duration
auto end(TestAdlIterable &instance)
ValueType getPercentileEstimate(double pct, size_t level) const
size_t getNumBuckets() const
BucketType & getByIndex(size_t idx)
void toAppend(char value, Tgt *result)
size_t getPercentileBucketIdx(double pct, CountFn countFromBucket, double *lowPct=nullptr, double *highPct=nullptr) 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)
Future< Unit > times(const int n, F &&thunk)
typename Clock::time_point TimePoint
TimeseriesHistogram(ValueType bucketSize, ValueType min, ValueType max, const ContainerType &defaultContainer)