Require registrationComplete() not only in dbg builds
[folly.git] / folly / stats / TimeseriesHistogram.h
index 43af8676912a3e51bf9fcf1327299ed318c8262b..5b6bc8fb2a164ad42039ee340cb55157f72bbd17 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -135,7 +135,7 @@ class TimeseriesHistogram {
   }
 
   /* Total sum of values at the given timeseries level (all buckets). */
-  ValueType sum(int level) const {
+  ValueType sum(size_t level) const {
     ValueType total = ValueType();
     for (size_t b = 0; b < buckets_.getNumBuckets(); ++b) {
       total += buckets_.getByIndex(b).sum(level);
@@ -154,7 +154,7 @@ class TimeseriesHistogram {
 
   /* Average of values at the given timeseries level (all buckets). */
   template <typename ReturnType = double>
-  ReturnType avg(int level) const {
+  ReturnType avg(size_t level) const {
     auto total = ValueType();
     uint64_t nsamples = 0;
     computeAvgData(&total, &nsamples, level);