Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Apr 23, 2020
1 parent 9ddda49 commit 0a5b8d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/server/info_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ class info_collector
row_stats.total_rdb_index_and_filter_blocks_mem_usage);
rdb_memtable_mem_usage->set(row_stats.total_rdb_memtable_mem_usage);
rdb_estimate_num_keys->set(row_stats.total_rdb_estimate_num_keys);
rdb_bf_seek_negatives_rate->set(convert_to_1M_ratio(total_rdb_bf_seek_negatives, total_rdb_bf_seek_total));
rdb_bf_point_negatives_rate->set(convert_to_1M_ratio(total_rdb_bf_point_negatives, total_rdb_bf_point_negatives + total_rdb_bf_point_positive_total));
rdb_bf_seek_negatives_rate->set(convert_to_1M_ratio(row_stats.total_rdb_bf_seek_negatives, row_stats.total_rdb_bf_seek_total));
rdb_bf_point_negatives_rate->set(convert_to_1M_ratio(row_stats.total_rdb_bf_point_negatives, row_stats.total_rdb_bf_point_negatives + row_stats.total_rdb_bf_point_positive_total));
rdb_bf_point_false_positive_rate->set(convert_to_1M_ratio(
total_rdb_bf_point_positive_total - total_rdb_bf_point_positive_true, (total_rdb_bf_point_positive_total - total_rdb_bf_point_positive_true) + total_rdb_bf_point_negatives);
row_stats.total_rdb_bf_point_positive_total - row_stats.total_rdb_bf_point_positive_true, (row_stats.total_rdb_bf_point_positive_total - row_stats.total_rdb_bf_point_positive_true) + row_stats.total_rdb_bf_point_negatives));
read_qps->set(row_stats.get_total_read_qps());
write_qps->set(row_stats.get_total_write_qps());
backup_request_qps->set(row_stats.total_backup_request_qps);
Expand Down
10 changes: 5 additions & 5 deletions src/server/table_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ struct table_stats
row_stats.total_rdb_index_and_filter_blocks_mem_usage;
total_rdb_memtable_mem_usage += row_stats.total_rdb_memtable_mem_usage;
total_rdb_estimate_num_keys += row_stats.total_rdb_estimate_num_keys;
total_rdb_bf_seek_negatives += row_stats.rdb_bf_seek_negatives;
total_rdb_bf_seek_total += row_stats.rdb_bf_seek_total;
total_rdb_bf_point_positive_true += row_stats.rdb_bf_point_positive_true;
total_rdb_bf_point_positive_total += row_stats.rdb_bf_point_positive_total;
total_rdb_bf_point_negatives += row_stats.rdb_bf_point_negatives;
total_rdb_bf_seek_negatives += row_stats.total_rdb_bf_seek_negatives;
total_rdb_bf_seek_total += row_stats.total_rdb_bf_seek_total;
total_rdb_bf_point_positive_true += row_stats.total_rdb_bf_point_positive_true;
total_rdb_bf_point_positive_total += row_stats.total_rdb_bf_point_positive_total;
total_rdb_bf_point_negatives += row_stats.total_rdb_bf_point_negatives;
total_backup_request_qps += row_stats.total_backup_request_qps;
total_get_bytes += row_stats.total_get_bytes;
total_multi_get_bytes += row_stats.total_multi_get_bytes;
Expand Down
2 changes: 1 addition & 1 deletion src/shell/commands/table_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "shell/commands.h"

double convert_to_1M_ratio(double hit, double total) {
double convert_to_ratio(double hit, double total) {
return std::abs(total) < 1e-6 ? 0 : hit / total;
}

Expand Down

0 comments on commit 0a5b8d8

Please sign in to comment.