|
|
@ -14,10 +14,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
namespace rocksdb { |
|
|
|
namespace rocksdb { |
|
|
|
|
|
|
|
|
|
|
|
namespace { |
|
|
|
|
|
|
|
const HistogramBucketMapper bucketMapper; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HistogramWindowingImpl::HistogramWindowingImpl() { |
|
|
|
HistogramWindowingImpl::HistogramWindowingImpl() { |
|
|
|
env_ = Env::Default(); |
|
|
|
env_ = Env::Default(); |
|
|
|
window_stats_.reset(new HistogramStat[num_windows_]); |
|
|
|
window_stats_.reset(new HistogramStat[num_windows_]); |
|
|
@ -37,7 +33,6 @@ HistogramWindowingImpl::HistogramWindowingImpl( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HistogramWindowingImpl::~HistogramWindowingImpl() { |
|
|
|
HistogramWindowingImpl::~HistogramWindowingImpl() { |
|
|
|
window_stats_.release(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void HistogramWindowingImpl::Clear() { |
|
|
|
void HistogramWindowingImpl::Clear() { |
|
|
@ -160,7 +155,7 @@ void HistogramWindowingImpl::SwapHistoryBucket() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (stats_.min() == stats_to_drop.min()) { |
|
|
|
if (stats_.min() == stats_to_drop.min()) { |
|
|
|
uint64_t new_min = bucketMapper.LastValue(); |
|
|
|
uint64_t new_min = std::numeric_limits<uint64_t>::max(); |
|
|
|
for (unsigned int i = 0; i < num_windows_; i++) { |
|
|
|
for (unsigned int i = 0; i < num_windows_; i++) { |
|
|
|
if (i != next_window) { |
|
|
|
if (i != next_window) { |
|
|
|
uint64_t m = window_stats_[i].min(); |
|
|
|
uint64_t m = window_stats_[i].min(); |
|
|
|