From 446151cd2096c59a78407698df8bb2fbba7b2b3d Mon Sep 17 00:00:00 2001 From: Abhishek Kona Date: Thu, 16 May 2013 10:40:30 -0700 Subject: [PATCH] [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 --- db/db_statistics.h | 5 ----- include/leveldb/statistics.h | 4 +--- util/histogram.cc | 4 ---- util/histogram.h | 1 - 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/db/db_statistics.h b/db/db_statistics.h index de61edd5e5..badfd1b58c 100644 --- a/db/db_statistics.h +++ b/db/db_statistics.h @@ -39,11 +39,6 @@ class DBStatistics: public Statistics { 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, HistogramData * const data) { assert(histogramType < HISTOGRAM_ENUM_MAX); diff --git a/include/leveldb/statistics.h b/include/leveldb/statistics.h index d60903d308..31f542edde 100644 --- a/include/leveldb/statistics.h +++ b/include/leveldb/statistics.h @@ -80,7 +80,6 @@ class Histogram { virtual ~Histogram(); // Add a value to be recorded in the histogram. virtual void Add(uint64_t value) = 0; - virtual void Add(double value) = 0; virtual std::string ToString() const = 0; @@ -123,8 +122,7 @@ class Statistics { virtual long getTickerCount(Tickers tickerType) = 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, double count) = 0; + virtual void measureTime(Histograms histogramType, uint64_t time) = 0; virtual void histogramData(Histograms type, HistogramData * const data) = 0; diff --git a/util/histogram.cc b/util/histogram.cc index f232138a02..e7e993b30d 100644 --- a/util/histogram.cc +++ b/util/histogram.cc @@ -85,10 +85,6 @@ void HistogramImpl::Add(uint64_t value) { sum_squares_ += (value * value); } -void HistogramImpl::Add(double value) { - Add(static_cast(value)); -} - void HistogramImpl::Merge(const HistogramImpl& other) { if (other.min_ < min_) min_ = other.min_; if (other.max_ > max_) max_ = other.max_; diff --git a/util/histogram.h b/util/histogram.h index 5350b02b29..2ddb6e6c3f 100644 --- a/util/histogram.h +++ b/util/histogram.h @@ -53,7 +53,6 @@ class HistogramImpl { virtual ~HistogramImpl() {} virtual void Clear(); virtual void Add(uint64_t value); - virtual void Add(double value); void Merge(const HistogramImpl& other); virtual std::string ToString() const;