// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS
-#endif
-
#include "monitoring/histogram.h"
-#include <inttypes.h>
-#include <cassert>
-#include <math.h>
#include <stdio.h>
+#include <cassert>
+#include <cinttypes>
+#include <cmath>
#include "port/port.h"
#include "util/cast_util.h"
-namespace rocksdb {
+namespace ROCKSDB_NAMESPACE {
HistogramBucketMapper::HistogramBucketMapper() {
// If you change this, you also need to change
double variance =
static_cast<double>(cur_sum_squares * cur_num - cur_sum * cur_sum) /
static_cast<double>(cur_num * cur_num);
- return sqrt(variance);
+ return std::sqrt(variance);
}
std::string HistogramStat::ToString() const {
uint64_t cur_num = num();
stats_.Data(data);
}
-} // namespace levedb
+} // namespace ROCKSDB_NAMESPACE