fix warning (#1988)

Signed-off-by: kehycs <kehycs@foxmail.com>
This commit is contained in:
Hanyang Ke 2020-04-19 11:12:01 +08:00 committed by GitHub
parent 29acf6a594
commit 25b6efc8e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ class CollectInsertMetrics : CollectMetricsBase {
if (n_ > 0) {
auto total_time = TimeFromBegine();
double avg_time = total_time / n_;
for (int i = 0; i < n_; ++i) {
for (size_t i = 0; i < n_; ++i) {
Metrics::GetInstance().AddVectorsDurationHistogramOberve(avg_time);
}
@ -90,7 +90,7 @@ class CollectQueryMetrics : CollectMetricsBase {
~CollectQueryMetrics() {
if (nq_ > 0) {
auto total_time = TimeFromBegine();
for (int i = 0; i < nq_; ++i) {
for (size_t i = 0; i < nq_; ++i) {
server::Metrics::GetInstance().QueryResponseSummaryObserve(total_time);
}
auto average_time = total_time / nq_;