template <typename T, typename BucketType>
template <typename CountFn>
-const uint64_t HistogramBuckets<T, BucketType>::computeTotalCount(
+uint64_t HistogramBuckets<T, BucketType>::computeTotalCount(
CountFn countFromBucket) const {
uint64_t count = 0;
for (unsigned int n = 0; n < buckets_.size(); ++n) {
* @return Returns the total number of values stored across all buckets
*/
template <typename CountFn>
- const uint64_t computeTotalCount(CountFn countFromBucket) const;
+ uint64_t computeTotalCount(CountFn countFromBucket) const;
/**
* Determine which bucket the specified percentile falls into.
*
* Runs in O(numBuckets)
*/
- const uint64_t computeTotalCount() const {
+ uint64_t computeTotalCount() const {
CountFromBucket countFn;
return buckets_.computeTotalCount(countFn);
}
template class MultiLevelTimeSeries<int64_t>;
template class TimeseriesHistogram<int64_t>;
-// Histogram::getPercentileBucketIdx() and Histogram::getPercentileEstimate()
+// Histogram::getPercentileBucketIdx(), Histogram::getPercentileEstimate()
+// and Histogram::computeTotalCount()
// are implemented using template methods. Instantiate the default versions of
// these methods too, so anyone using them won't also need to explicitly
// include Histogram-defs.h
double pct,
Histogram<int64_t>::CountFromBucket countFromBucket,
Histogram<int64_t>::AvgFromBucket avgFromBucket) const;
+template uint64_t detail::HistogramBuckets<int64_t, Histogram<int64_t>::Bucket>
+ ::computeTotalCount<Histogram<int64_t>::CountFromBucket>(
+ Histogram<int64_t>::CountFromBucket countFromBucket) const;
} // folly