[Rocksdb] Remove unused double apis to record into histograms
Summary: Statistics.h and histogram.h had double based api's to record values. Remove them as they are not used anywhere Test Plan: make all check Reviewers: haobo, dhruba Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D10815
This commit is contained in:
parent
8a48410f09
commit
446151cd20
@ -39,11 +39,6 @@ class DBStatistics: public Statistics {
|
|||||||
allHistograms_[histogramType].Add(value);
|
allHistograms_[histogramType].Add(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void measureTime(Histograms histogramType, double value) {
|
|
||||||
assert(histogramType < HISTOGRAM_ENUM_MAX);
|
|
||||||
allHistograms_[histogramType].Add(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void histogramData(Histograms histogramType,
|
virtual void histogramData(Histograms histogramType,
|
||||||
HistogramData * const data) {
|
HistogramData * const data) {
|
||||||
assert(histogramType < HISTOGRAM_ENUM_MAX);
|
assert(histogramType < HISTOGRAM_ENUM_MAX);
|
||||||
|
@ -80,7 +80,6 @@ class Histogram {
|
|||||||
virtual ~Histogram();
|
virtual ~Histogram();
|
||||||
// Add a value to be recorded in the histogram.
|
// Add a value to be recorded in the histogram.
|
||||||
virtual void Add(uint64_t value) = 0;
|
virtual void Add(uint64_t value) = 0;
|
||||||
virtual void Add(double value) = 0;
|
|
||||||
|
|
||||||
virtual std::string ToString() const = 0;
|
virtual std::string ToString() const = 0;
|
||||||
|
|
||||||
@ -123,8 +122,7 @@ class Statistics {
|
|||||||
|
|
||||||
virtual long getTickerCount(Tickers tickerType) = 0;
|
virtual long getTickerCount(Tickers tickerType) = 0;
|
||||||
virtual void recordTick(Tickers tickerType, uint64_t count = 0) = 0;
|
virtual void recordTick(Tickers tickerType, uint64_t count = 0) = 0;
|
||||||
virtual void measureTime(Histograms histogramType, uint64_t count) = 0;
|
virtual void measureTime(Histograms histogramType, uint64_t time) = 0;
|
||||||
virtual void measureTime(Histograms histogramType, double count) = 0;
|
|
||||||
|
|
||||||
virtual void histogramData(Histograms type, HistogramData * const data) = 0;
|
virtual void histogramData(Histograms type, HistogramData * const data) = 0;
|
||||||
|
|
||||||
|
@ -85,10 +85,6 @@ void HistogramImpl::Add(uint64_t value) {
|
|||||||
sum_squares_ += (value * value);
|
sum_squares_ += (value * value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistogramImpl::Add(double value) {
|
|
||||||
Add(static_cast<uint64_t>(value));
|
|
||||||
}
|
|
||||||
|
|
||||||
void HistogramImpl::Merge(const HistogramImpl& other) {
|
void HistogramImpl::Merge(const HistogramImpl& other) {
|
||||||
if (other.min_ < min_) min_ = other.min_;
|
if (other.min_ < min_) min_ = other.min_;
|
||||||
if (other.max_ > max_) max_ = other.max_;
|
if (other.max_ > max_) max_ = other.max_;
|
||||||
|
@ -53,7 +53,6 @@ class HistogramImpl {
|
|||||||
virtual ~HistogramImpl() {}
|
virtual ~HistogramImpl() {}
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
virtual void Add(uint64_t value);
|
virtual void Add(uint64_t value);
|
||||||
virtual void Add(double value);
|
|
||||||
void Merge(const HistogramImpl& other);
|
void Merge(const HistogramImpl& other);
|
||||||
|
|
||||||
virtual std::string ToString() const;
|
virtual std::string ToString() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user