diff --git a/build_tools/clang_tidy.py b/build_tools/clang_tidy.py index 11a38bb065..0581e329e5 100755 --- a/build_tools/clang_tidy.py +++ b/build_tools/clang_tidy.py @@ -103,7 +103,6 @@ def tidy_on_path(path): "-readability-magic-numbers," "-readability-named-parameter," "-readability-suspicious-call-argument", - "-extra-arg=-language=c++", "-extra-arg=-std=c++17", "-extra-arg=-Ithirdparty/output/include"] return subprocess.check_output( diff --git a/src/server/pegasus_event_listener.cpp b/src/server/pegasus_event_listener.cpp index 12f94bdb9e..fdc6849047 100644 --- a/src/server/pegasus_event_listener.cpp +++ b/src/server/pegasus_event_listener.cpp @@ -52,6 +52,16 @@ METRIC_DEFINE_counter(replica, dsn::metric_unit::kBytes, "The size of rocksdb compaction output in bytes"); +METRIC_DEFINE_counter(replica, + rdb_compaction_input_blob_bytes, + dsn::metric_unit::kBytes, + "The size of rocksdb compaction input blob in bytes"); + +METRIC_DEFINE_counter(replica, + rdb_compaction_output_blob_bytes, + dsn::metric_unit::kBytes, + "The size of rocksdb compaction output blob in bytes"); + METRIC_DEFINE_counter( replica, rdb_changed_delayed_writes, @@ -78,6 +88,8 @@ pegasus_event_listener::pegasus_event_listener(replica_base *r) METRIC_VAR_INIT_replica(rdb_compaction_completed_count), METRIC_VAR_INIT_replica(rdb_compaction_input_bytes), METRIC_VAR_INIT_replica(rdb_compaction_output_bytes), + METRIC_VAR_INIT_replica(rdb_compaction_input_blob_bytes), + METRIC_VAR_INIT_replica(rdb_compaction_output_blob_bytes), METRIC_VAR_INIT_replica(rdb_changed_delayed_writes), METRIC_VAR_INIT_replica(rdb_changed_stopped_writes) { @@ -86,15 +98,23 @@ pegasus_event_listener::pegasus_event_listener(replica_base *r) void pegasus_event_listener::OnFlushCompleted(rocksdb::DB *db, const rocksdb::FlushJobInfo &info) { METRIC_VAR_INCREMENT(rdb_flush_completed_count); - METRIC_VAR_INCREMENT_BY(rdb_flush_output_bytes, info.table_properties.data_size); + uint64_t total_output_bytes = info.table_properties.data_size; + for (const auto &blob_info : info.blob_file_addition_infos) { + total_output_bytes += blob_info.total_blob_bytes; + } + METRIC_VAR_INCREMENT_BY(rdb_flush_output_bytes, total_output_bytes); } void pegasus_event_listener::OnCompactionCompleted(rocksdb::DB *db, const rocksdb::CompactionJobInfo &info) { METRIC_VAR_INCREMENT(rdb_compaction_completed_count); - METRIC_VAR_INCREMENT_BY(rdb_compaction_input_bytes, info.stats.total_input_bytes); - METRIC_VAR_INCREMENT_BY(rdb_compaction_output_bytes, info.stats.total_output_bytes); + METRIC_VAR_INCREMENT_BY(rdb_compaction_input_bytes, + info.stats.total_input_bytes + info.stats.total_blob_bytes_read); + METRIC_VAR_INCREMENT_BY(rdb_compaction_output_bytes, + info.stats.total_output_bytes + info.stats.total_output_bytes_blob); + METRIC_VAR_INCREMENT_BY(rdb_compaction_input_blob_bytes, info.stats.total_blob_bytes_read); + METRIC_VAR_INCREMENT_BY(rdb_compaction_output_blob_bytes, info.stats.total_output_bytes_blob); } void pegasus_event_listener::OnStallConditionsChanged(const rocksdb::WriteStallInfo &info) diff --git a/src/server/pegasus_event_listener.h b/src/server/pegasus_event_listener.h index 900fabdc83..76c6eeabd8 100644 --- a/src/server/pegasus_event_listener.h +++ b/src/server/pegasus_event_listener.h @@ -50,6 +50,8 @@ class pegasus_event_listener : public rocksdb::EventListener, dsn::replication:: METRIC_VAR_DECLARE_counter(rdb_compaction_completed_count); METRIC_VAR_DECLARE_counter(rdb_compaction_input_bytes); METRIC_VAR_DECLARE_counter(rdb_compaction_output_bytes); + METRIC_VAR_DECLARE_counter(rdb_compaction_input_blob_bytes); + METRIC_VAR_DECLARE_counter(rdb_compaction_output_blob_bytes); METRIC_VAR_DECLARE_counter(rdb_changed_delayed_writes); METRIC_VAR_DECLARE_counter(rdb_changed_stopped_writes); diff --git a/src/server/pegasus_server_impl.cpp b/src/server/pegasus_server_impl.cpp index 042f60bd9e..925b741c13 100644 --- a/src/server/pegasus_server_impl.cpp +++ b/src/server/pegasus_server_impl.cpp @@ -1918,6 +1918,13 @@ ::dsn::error_code pegasus_server_impl::stop(bool clear_state) } METRIC_VAR_SET(rdb_total_sst_files, 0); METRIC_VAR_SET(rdb_total_sst_size_mb, 0); + METRIC_VAR_SET(rdb_total_blob_size_mb, 0); + METRIC_VAR_SET(rdb_live_blob_size_mb, 0); + METRIC_VAR_SET(rdb_live_blob_garbage_size_mb, 0); + METRIC_VAR_SET(rdb_blob_garbage_ratio, 0.0); + METRIC_VAR_SET(rdb_blob_cache_capacity_bytes, 0); + METRIC_VAR_SET(rdb_blob_cache_usage_bytes, 0); + METRIC_VAR_SET(rdb_blob_cache_pinned_usage_bytes, 0); METRIC_VAR_SET(rdb_index_and_filter_blocks_mem_usage_bytes, 0); METRIC_VAR_SET(rdb_memtable_mem_usage_bytes, 0); METRIC_VAR_SET(rdb_block_cache_hit_count, 0); @@ -2523,12 +2530,46 @@ void pegasus_server_impl::update_replica_rocksdb_statistics() } METRIC_VAR_SET(rdb_total_sst_files, val); + static uint64_t bytes_per_mb = 1U << 20U; if (_db->GetProperty(_data_cf, rocksdb::DB::Properties::kTotalSstFilesSize, &str_val) && dsn::buf2uint64(str_val, val)) { - static uint64_t bytes_per_mb = 1U << 20U; METRIC_VAR_SET(rdb_total_sst_size_mb, val / bytes_per_mb); } + // Update blob metrics (RocksDB provides these when blob files are enabled) + uint64_t live_blob_file_size = 0; + _db->GetIntProperty(_data_cf, rocksdb::DB::Properties::kLiveBlobFileSize, &live_blob_file_size); + METRIC_VAR_SET(rdb_live_blob_size_mb, live_blob_file_size / bytes_per_mb); + + uint64_t live_blob_file_garbage_size = 0; + _db->GetIntProperty( + _data_cf, rocksdb::DB::Properties::kLiveBlobFileGarbageSize, &live_blob_file_garbage_size); + METRIC_VAR_SET(rdb_live_blob_garbage_size_mb, live_blob_file_garbage_size / bytes_per_mb); + + uint64_t total_blob_file_size = 0; + _db->GetIntProperty( + _data_cf, rocksdb::DB::Properties::kTotalBlobFileSize, &total_blob_file_size); + METRIC_VAR_SET(rdb_total_blob_size_mb, total_blob_file_size / bytes_per_mb); + + if (total_blob_file_size > 0) { + METRIC_VAR_SET(rdb_blob_garbage_ratio, + 1.0 * live_blob_file_garbage_size / total_blob_file_size); + } + + uint64_t blob_cache_capacity = 0; + _db->GetIntProperty( + _data_cf, rocksdb::DB::Properties::kBlobCacheCapacity, &blob_cache_capacity); + METRIC_VAR_SET(rdb_blob_cache_capacity_bytes, blob_cache_capacity); + + uint64_t blob_cache_usage = 0; + _db->GetIntProperty(_data_cf, rocksdb::DB::Properties::kBlobCacheUsage, &blob_cache_usage); + METRIC_VAR_SET(rdb_blob_cache_usage_bytes, blob_cache_usage); + + uint64_t blob_cache_pinned_usage = 0; + _db->GetIntProperty( + _data_cf, rocksdb::DB::Properties::kBlobCachePinnedUsage, &blob_cache_pinned_usage); + METRIC_VAR_SET(rdb_blob_cache_pinned_usage_bytes, blob_cache_pinned_usage); + std::map props; if (_db->GetMapProperty(_data_cf, "rocksdb.cfstats", &props)) { auto write_amplification_iter = props.find("compaction.Sum.WriteAmp"); diff --git a/src/server/pegasus_server_impl.h b/src/server/pegasus_server_impl.h index e64eb1da1a..a5938a4dea 100644 --- a/src/server/pegasus_server_impl.h +++ b/src/server/pegasus_server_impl.h @@ -575,6 +575,13 @@ class pegasus_server_impl : public pegasus_read_service // Replica-level metrics for rocksdb. METRIC_VAR_DECLARE_gauge_int64(rdb_total_sst_files); METRIC_VAR_DECLARE_gauge_int64(rdb_total_sst_size_mb); + METRIC_VAR_DECLARE_gauge_int64(rdb_total_blob_size_mb); + METRIC_VAR_DECLARE_gauge_int64(rdb_live_blob_size_mb); + METRIC_VAR_DECLARE_gauge_int64(rdb_live_blob_garbage_size_mb); + METRIC_VAR_DECLARE_gauge_double(rdb_blob_garbage_ratio); + METRIC_VAR_DECLARE_gauge_int64(rdb_blob_cache_capacity_bytes); + METRIC_VAR_DECLARE_gauge_int64(rdb_blob_cache_usage_bytes); + METRIC_VAR_DECLARE_gauge_int64(rdb_blob_cache_pinned_usage_bytes); METRIC_VAR_DECLARE_gauge_int64(rdb_estimated_keys); METRIC_VAR_DECLARE_gauge_int64(rdb_index_and_filter_blocks_mem_usage_bytes); diff --git a/src/server/pegasus_server_impl_init.cpp b/src/server/pegasus_server_impl_init.cpp index 7519af802b..45575394a0 100644 --- a/src/server/pegasus_server_impl_init.cpp +++ b/src/server/pegasus_server_impl_init.cpp @@ -125,6 +125,41 @@ METRIC_DEFINE_gauge_int64(replica, dsn::metric_unit::kMegaBytes, "The total size of rocksdb sst files"); +METRIC_DEFINE_gauge_int64(replica, + rdb_total_blob_size_mb, + dsn::metric_unit::kMegaBytes, + "The total size of rocksdb blob files"); + +METRIC_DEFINE_gauge_int64(replica, + rdb_live_blob_size_mb, + dsn::metric_unit::kMegaBytes, + "The size of live rocksdb blob files"); + +METRIC_DEFINE_gauge_int64(replica, + rdb_live_blob_garbage_size_mb, + dsn::metric_unit::kMegaBytes, + "The size of live rocksdb blob garbage"); + +METRIC_DEFINE_gauge_double(replica, + rdb_blob_garbage_ratio, + dsn::metric_unit::kPercent, + "The ratio of blob garbage to total blob size (0-1)"); + +METRIC_DEFINE_gauge_int64(replica, + rdb_blob_cache_capacity_bytes, + dsn::metric_unit::kBytes, + "The capacity of rocksdb blob cache"); + +METRIC_DEFINE_gauge_int64(replica, + rdb_blob_cache_usage_bytes, + dsn::metric_unit::kBytes, + "The usage of rocksdb blob cache"); + +METRIC_DEFINE_gauge_int64(replica, + rdb_blob_cache_pinned_usage_bytes, + dsn::metric_unit::kBytes, + "The pinned usage of rocksdb blob cache"); + METRIC_DEFINE_gauge_int64(replica, rdb_estimated_keys, dsn::metric_unit::kKeys, @@ -629,6 +664,13 @@ pegasus_server_impl::pegasus_server_impl(dsn::replication::replica *r) METRIC_VAR_INIT_replica(throttling_rejected_read_requests), METRIC_VAR_INIT_replica(rdb_total_sst_files), METRIC_VAR_INIT_replica(rdb_total_sst_size_mb), + METRIC_VAR_INIT_replica(rdb_total_blob_size_mb), + METRIC_VAR_INIT_replica(rdb_live_blob_size_mb), + METRIC_VAR_INIT_replica(rdb_live_blob_garbage_size_mb), + METRIC_VAR_INIT_replica(rdb_blob_garbage_ratio), + METRIC_VAR_INIT_replica(rdb_blob_cache_capacity_bytes), + METRIC_VAR_INIT_replica(rdb_blob_cache_usage_bytes), + METRIC_VAR_INIT_replica(rdb_blob_cache_pinned_usage_bytes), METRIC_VAR_INIT_replica(rdb_estimated_keys), METRIC_VAR_INIT_replica(rdb_index_and_filter_blocks_mem_usage_bytes), METRIC_VAR_INIT_replica(rdb_memtable_mem_usage_bytes), diff --git a/src/shell/command_helper.h b/src/shell/command_helper.h index 3dbd17be42..8104698440 100644 --- a/src/shell/command_helper.h +++ b/src/shell/command_helper.h @@ -1535,6 +1535,7 @@ inline dsn::metric_filters row_data_filters() "bulk_load_ingestion_rejected_write_requests", "rdb_total_sst_size_mb", "rdb_total_sst_files", + "rdb_total_blob_size_mb", "rdb_block_cache_hit_count", "rdb_block_cache_total_count", "rdb_index_and_filter_blocks_mem_usage_bytes", @@ -1584,6 +1585,7 @@ inline stat_var_map create_sums(row_data &row) return stat_var_map({ BIND_ROW(dup_recent_lost_mutations, dup_recent_mutation_loss_count), BIND_ROW(rdb_total_sst_size_mb, storage_mb), + BIND_ROW(rdb_total_blob_size_mb, storage_mb), BIND_ROW(rdb_total_sst_files, storage_count), BIND_ROW(rdb_block_cache_hit_count, rdb_block_cache_hit_count), BIND_ROW(rdb_block_cache_total_count, rdb_block_cache_total_count), @@ -1785,92 +1787,95 @@ update_app_pegasus_perf_counter(row_data &row, const std::string &counter_name, row.recent_read_cu += value; else if (counter_name == "recent.write.cu") row.recent_write_cu += value; - else if (counter_name == "recent.expire.count") + else if (counter_name == "recent.expire.count") { row.recent_expire_count += value; - else if (counter_name == "recent.filter.count") + } else if (counter_name == "recent.filter.count") { row.recent_filter_count += value; - else if (counter_name == "recent.abnormal.count") + } else if (counter_name == "recent.abnormal.count") { row.recent_abnormal_count += value; - else if (counter_name == "recent.write.throttling.delay.count") + } else if (counter_name == "recent.write.throttling.delay.count") { row.recent_write_throttling_delay_count += value; - else if (counter_name == "recent.write.throttling.reject.count") + } else if (counter_name == "recent.write.throttling.reject.count") { row.recent_write_throttling_reject_count += value; - else if (counter_name == "recent.read.throttling.delay.count") + } else if (counter_name == "recent.read.throttling.delay.count") { row.recent_read_throttling_delay_count += value; - else if (counter_name == "recent.read.throttling.reject.count") + } else if (counter_name == "recent.read.throttling.reject.count") { row.recent_read_throttling_reject_count += value; - else if (counter_name == "recent.backup.request.throttling.delay.count") + } else if (counter_name == "recent.backup.request.throttling.delay.count") { row.recent_backup_request_throttling_delay_count += value; - else if (counter_name == "recent.backup.request.throttling.reject.count") + } else if (counter_name == "recent.backup.request.throttling.reject.count") { row.recent_backup_request_throttling_reject_count += value; - else if (counter_name == "recent.write.splitting.reject.count") + } else if (counter_name == "recent.write.splitting.reject.count") { row.recent_write_splitting_reject_count += value; - else if (counter_name == "recent.read.splitting.reject.count") + } else if (counter_name == "recent.read.splitting.reject.count") { row.recent_read_splitting_reject_count += value; - else if (counter_name == "recent.write.bulk.load.ingestion.reject.count") + } else if (counter_name == "recent.write.bulk.load.ingestion.reject.count") { row.recent_write_bulk_load_ingestion_reject_count += value; - else if (counter_name == "disk.storage.sst(MB)") + } else if (counter_name == "disk.storage.sst(MB)" || counter_name == "rdb_total_sst_size_mb" || + counter_name == "disk.storage.blob(MB)" || + counter_name == "rdb_total_blob_size_mb") { row.storage_mb += value; - else if (counter_name == "disk.storage.sst.count") + } else if (counter_name == "disk.storage.sst.count") { row.storage_count += value; - else if (counter_name == "rdb.block_cache.hit_count") + } else if (counter_name == "rdb.block_cache.hit_count") { row.rdb_block_cache_hit_count += value; - else if (counter_name == "rdb.block_cache.total_count") + } else if (counter_name == "rdb.block_cache.total_count") { row.rdb_block_cache_total_count += value; - else if (counter_name == "rdb.index_and_filter_blocks.memory_usage") + } else if (counter_name == "rdb.index_and_filter_blocks.memory_usage") { row.rdb_index_and_filter_blocks_mem_usage += value; - else if (counter_name == "rdb.memtable.memory_usage") + } else if (counter_name == "rdb.memtable.memory_usage") { row.rdb_memtable_mem_usage += value; - else if (counter_name == "rdb.estimate_num_keys") + } else if (counter_name == "rdb.estimate_num_keys") { row.rdb_estimate_num_keys += value; - else if (counter_name == "rdb.bf_seek_negatives") + } else if (counter_name == "rdb.bf_seek_negatives") { row.rdb_bf_seek_negatives += value; - else if (counter_name == "rdb.bf_seek_total") + } else if (counter_name == "rdb.bf_seek_total") { row.rdb_bf_seek_total += value; - else if (counter_name == "rdb.bf_point_positive_true") + } else if (counter_name == "rdb.bf_point_positive_true") { row.rdb_bf_point_positive_true += value; - else if (counter_name == "rdb.bf_point_positive_total") + } else if (counter_name == "rdb.bf_point_positive_total") { row.rdb_bf_point_positive_total += value; - else if (counter_name == "rdb.bf_point_negatives") + } else if (counter_name == "rdb.bf_point_negatives") { row.rdb_bf_point_negatives += value; - else if (counter_name == "backup_request_qps") + } else if (counter_name == "backup_request_qps") { row.backup_request_qps += value; - else if (counter_name == "backup_request_bytes") + } else if (counter_name == "backup_request_bytes") { row.backup_request_bytes += value; - else if (counter_name == "get_bytes") + } else if (counter_name == "get_bytes") { row.get_bytes += value; - else if (counter_name == "multi_get_bytes") + } else if (counter_name == "multi_get_bytes") { row.multi_get_bytes += value; - else if (counter_name == "batch_get_bytes") + } else if (counter_name == "batch_get_bytes") { row.batch_get_bytes += value; - else if (counter_name == "scan_bytes") + } else if (counter_name == "scan_bytes") { row.scan_bytes += value; - else if (counter_name == "put_bytes") + } else if (counter_name == "put_bytes") { row.put_bytes += value; - else if (counter_name == "multi_put_bytes") + } else if (counter_name == "multi_put_bytes") { row.multi_put_bytes += value; - else if (counter_name == "check_and_set_bytes") + } else if (counter_name == "check_and_set_bytes") { row.check_and_set_bytes += value; - else if (counter_name == "check_and_mutate_bytes") + } else if (counter_name == "check_and_mutate_bytes") { row.check_and_mutate_bytes += value; - else if (counter_name == "recent_rdb_compaction_input_bytes") + } else if (counter_name == "recent_rdb_compaction_input_bytes") { row.recent_rdb_compaction_input_bytes += value; - else if (counter_name == "recent_rdb_compaction_output_bytes") + } else if (counter_name == "recent_rdb_compaction_output_bytes") { row.recent_rdb_compaction_output_bytes += value; - else if (counter_name == "rdb.read_l2andup_hit_count") + } else if (counter_name == "rdb.read_l2andup_hit_count") { row.rdb_read_l2andup_hit_count += value; - else if (counter_name == "rdb.read_l1_hit_count") + } else if (counter_name == "rdb.read_l1_hit_count") { row.rdb_read_l1_hit_count += value; - else if (counter_name == "rdb.read_l0_hit_count") + } else if (counter_name == "rdb.read_l0_hit_count") { row.rdb_read_l0_hit_count += value; - else if (counter_name == "rdb.read_memtable_hit_count") + } else if (counter_name == "rdb.read_memtable_hit_count") { row.rdb_read_memtable_hit_count += value; - else if (counter_name == "rdb.write_amplification") + } else if (counter_name == "rdb.write_amplification") { row.rdb_write_amplification += value; - else if (counter_name == "rdb.read_amplification") + } else if (counter_name == "rdb.read_amplification") { row.rdb_read_amplification += value; - else + } else { return false; + } return true; } @@ -1987,8 +1992,8 @@ inline bool get_app_partition_stat(shell_context *sc, update_app_pegasus_perf_counter(row, counter_name, m.value); } } else if (parse_app_perf_counter_name(m.name, app_name, counter_name)) { - // if the app_name from perf-counter isn't existed(maybe the app was dropped), it - // will be ignored. + // if the app_name from perf-counter isn't existed(maybe the app was dropped), + // it will be ignored. if (app_name_id.find(app_name) == app_name_id.end()) { continue; } @@ -2212,8 +2217,14 @@ inline bool get_storage_size_stat(shell_context *sc, app_storage_size_stat &st_s } } - std::vector> results = call_remote_command( - sc, nodes, "perf-counters-by-prefix", {"replica*app.pegasus*disk.storage.sst(MB)"}); + std::vector> results = + call_remote_command(sc, + nodes, + "perf-counters-by-prefix", + {"replica*app.pegasus*disk.storage.sst(MB)", + "replica*app.pegasus*disk.storage.blob(MB)", + "replica*app.pegasus*rdb_total_sst_size_mb", + "replica*app.pegasus*rdb_total_blob_size_mb"}); for (int i = 0; i < nodes.size(); ++i) { dsn::perf_counter_info info; @@ -2227,23 +2238,28 @@ inline bool get_storage_size_stat(shell_context *sc, app_storage_size_stat &st_s bool parse_ret = parse_app_pegasus_perf_counter_name( m.name, app_id_x, partition_index_x, counter_name); CHECK(parse_ret, "name = {}", m.name); - if (counter_name != "disk.storage.sst(MB)") + if (counter_name != "disk.storage.sst(MB)" && counter_name != "disk.storage.blob(MB)" && + counter_name != "rdb_total_sst_size_mb" && + counter_name != "rdb_total_blob_size_mb") { continue; + } auto find = pcs_by_appid.find(app_id_x); - if (find == pcs_by_appid.end()) // app id not found + if (find == pcs_by_appid.end()) { // app id not found continue; + } auto &pc = find->second[partition_index_x]; - if (pc.hp_primary != nodes[i].hp) // not primary replica - continue; - if (pc.partition_flags != 0) // already calculated + if (pc.hp_primary != nodes[i].hp) { // not primary replica continue; - pc.partition_flags = 1; - int64_t app_partition_count = find->second.size(); + } + auto app_partition_count = static_cast(find->second.size()); auto st_it = st_stat.st_value_by_app .emplace(app_id_x, std::vector{app_partition_count, 0, 0}) .first; - st_it->second[1]++; // stat_partition_count - st_it->second[2] += m.value; // storage_size_in_mb + if (pc.partition_flags == 0) { + pc.partition_flags = 1; + st_it->second[1]++; // stat_partition_count (once per partition) + } + st_it->second[2] += static_cast(m.value); // storage_size_in_mb (sst + blob) } } diff --git a/src/utils/metrics.h b/src/utils/metrics.h index 8fe1eb1122..827d940912 100644 --- a/src/utils/metrics.h +++ b/src/utils/metrics.h @@ -168,6 +168,8 @@ class error_code; // Variadic arguments are possible qualifiers for the variable, such as `static`. #define METRIC_VAR_DECLARE_gauge_int64(name, ...) \ METRIC_VAR_DECLARE(name, __VA_ARGS__ dsn::gauge_ptr) +#define METRIC_VAR_DECLARE_gauge_double(name, ...) \ + METRIC_VAR_DECLARE(name, __VA_ARGS__ dsn::gauge_ptr) #define METRIC_VAR_DECLARE_counter(name, ...) \ METRIC_VAR_DECLARE(name, __VA_ARGS__ dsn::counter_ptr) #define METRIC_VAR_DECLARE_percentile_int64(name, ...) \ @@ -179,6 +181,8 @@ class error_code; #define METRIC_VAR_DEFINE(name, clazz, ...) __VA_ARGS__ clazz::METRIC_VAR_NAME(name) #define METRIC_VAR_DEFINE_gauge_int64(name, clazz, ...) \ METRIC_VAR_DEFINE(name, clazz, __VA_ARGS__ dsn::gauge_ptr) +#define METRIC_VAR_DEFINE_gauge_double(name, clazz, ...) \ + METRIC_VAR_DEFINE(name, clazz, __VA_ARGS__ dsn::gauge_ptr) #define METRIC_VAR_DEFINE_counter(name, clazz, ...) \ METRIC_VAR_DEFINE(name, clazz, __VA_ARGS__ dsn::counter_ptr) #define METRIC_VAR_DEFINE_percentile_int64(name, clazz, ...) \