]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/monitoring/histogram.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / rocksdb / monitoring / histogram.cc
index 4bc7139d304df26481462d9a22af3fcf414c4be1..55339f8880c83f946a35942cecffa413d81b777b 100644 (file)
@@ -7,21 +7,17 @@
 // 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
@@ -181,7 +177,7 @@ double HistogramStat::StandardDeviation() const {
   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();
@@ -289,4 +285,4 @@ void HistogramImpl::Data(HistogramData * const data) const {
   stats_.Data(data);
 }
 
-} // namespace levedb
+}  // namespace ROCKSDB_NAMESPACE