From fb2ffac8b98524b3866dac33e2cce51ed2586de0 Mon Sep 17 00:00:00 2001 From: Bojan Serafimov Date: Thu, 4 Aug 2022 09:42:27 +0200 Subject: [PATCH] Ignore metrics static --- pageserver/src/layered_repository/layer_map.rs | 1 - pageserver/src/layered_repository/timeline.rs | 6 ------ pageserver/src/lib.rs | 1 - pageserver/src/page_service.rs | 1 - pageserver/src/storage_sync.rs | 1 - pageserver/src/storage_sync/upload.rs | 1 - pageserver/src/tenant_tasks.rs | 1 - pageserver/src/virtual_file.rs | 2 -- pageserver/src/walredo.rs | 1 - 9 files changed, 15 deletions(-) diff --git a/pageserver/src/layered_repository/layer_map.rs b/pageserver/src/layered_repository/layer_map.rs index dee28f3206..be590c88c2 100644 --- a/pageserver/src/layered_repository/layer_map.rs +++ b/pageserver/src/layered_repository/layer_map.rs @@ -23,7 +23,6 @@ use std::sync::Arc; use tracing::*; use utils::lsn::Lsn; -// TODO Add pageserver instance label lazy_static! { static ref NUM_ONDISK_LAYERS: IntGauge = register_int_gauge!("pageserver_ondisk_layers", "Number of layers on-disk") diff --git a/pageserver/src/layered_repository/timeline.rs b/pageserver/src/layered_repository/timeline.rs index 70c0429491..6ed1efd3d1 100644 --- a/pageserver/src/layered_repository/timeline.rs +++ b/pageserver/src/layered_repository/timeline.rs @@ -59,7 +59,6 @@ use crate::CheckpointConfig; use crate::{page_cache, storage_sync}; // Metrics collected on operations on the storage repository. -// TODO Add pageserver instance label lazy_static! { pub static ref STORAGE_TIME: HistogramVec = register_histogram_vec!( "pageserver_storage_operations_seconds", @@ -70,7 +69,6 @@ lazy_static! { } // Metrics collected on operations on the storage repository. -// TODO Add pageserver instance label lazy_static! { static ref RECONSTRUCT_TIME: HistogramVec = register_histogram_vec!( "pageserver_getpage_reconstruct_seconds", @@ -80,7 +78,6 @@ lazy_static! { .expect("failed to define a metric"); } -// TODO Add pageserver instance label lazy_static! { static ref MATERIALIZED_PAGE_CACHE_HIT: IntCounterVec = register_int_counter_vec!( "pageserver_materialized_cache_hits_total", @@ -96,7 +93,6 @@ lazy_static! { .expect("failed to define a metric"); } -// TODO Add pageserver instance label lazy_static! { static ref LAST_RECORD_LSN: IntGaugeVec = register_int_gauge_vec!( "pageserver_last_record_lsn", @@ -109,7 +105,6 @@ lazy_static! { // Metrics for determining timeline's physical size. // A layered timeline's physical is defined as the total size of // (delta/image) layer files on disk. -// TODO Add pageserver instance label lazy_static! { static ref CURRENT_PHYSICAL_SIZE: UIntGaugeVec = register_uint_gauge_vec!( "pageserver_current_physical_size", @@ -121,7 +116,6 @@ lazy_static! { // Metrics for cloud upload. These metrics reflect data uploaded to cloud storage, // or in testing they estimate how much we would upload if we did. -// TODO Add pageserver instance label lazy_static! { static ref NUM_PERSISTENT_FILES_CREATED: IntCounter = register_int_counter!( "pageserver_created_persistent_files_total", diff --git a/pageserver/src/lib.rs b/pageserver/src/lib.rs index 97d50544aa..4ecb181553 100644 --- a/pageserver/src/lib.rs +++ b/pageserver/src/lib.rs @@ -42,7 +42,6 @@ pub const STORAGE_FORMAT_VERSION: u16 = 3; pub const IMAGE_FILE_MAGIC: u16 = 0x5A60; pub const DELTA_FILE_MAGIC: u16 = 0x5A61; -// TODO Add pageserver instance label lazy_static! { static ref LIVE_CONNECTIONS_COUNT: IntGaugeVec = register_int_gauge_vec!( "pageserver_live_connections", diff --git a/pageserver/src/page_service.rs b/pageserver/src/page_service.rs index 839f8e0103..c8aa4b35e8 100644 --- a/pageserver/src/page_service.rs +++ b/pageserver/src/page_service.rs @@ -434,7 +434,6 @@ const TIME_BUCKETS: &[f64] = &[ 0.1, // 1/10 s ]; -// TODO Add pageserver instance label lazy_static! { static ref SMGR_QUERY_TIME: HistogramVec = register_histogram_vec!( "pageserver_smgr_query_seconds", diff --git a/pageserver/src/storage_sync.rs b/pageserver/src/storage_sync.rs index 0824aabcad..9bdb70204c 100644 --- a/pageserver/src/storage_sync.rs +++ b/pageserver/src/storage_sync.rs @@ -193,7 +193,6 @@ use self::download::download_index_parts; pub use self::download::gather_tenant_timelines_index_parts; pub use self::download::TEMP_DOWNLOAD_EXTENSION; -// TODO Add pageserver instance label lazy_static! { static ref REMAINING_SYNC_ITEMS: IntGauge = register_int_gauge!( "pageserver_remote_storage_remaining_sync_items", diff --git a/pageserver/src/storage_sync/upload.rs b/pageserver/src/storage_sync/upload.rs index 3808494ed0..f9ab3b7471 100644 --- a/pageserver/src/storage_sync/upload.rs +++ b/pageserver/src/storage_sync/upload.rs @@ -20,7 +20,6 @@ use crate::{ }; use metrics::{register_int_counter_vec, IntCounterVec}; -// TODO Add pageserver instance label lazy_static! { static ref NO_LAYERS_UPLOAD: IntCounterVec = register_int_counter_vec!( "pageserver_remote_storage_no_layers_uploads_total", diff --git a/pageserver/src/tenant_tasks.rs b/pageserver/src/tenant_tasks.rs index 062eb0a454..6f508b9625 100644 --- a/pageserver/src/tenant_tasks.rs +++ b/pageserver/src/tenant_tasks.rs @@ -19,7 +19,6 @@ use tokio::sync::watch; use tracing::*; use utils::zid::ZTenantId; -// TODO Add pageserver instance label static TENANT_TASK_EVENTS: Lazy = Lazy::new(|| { register_int_counter_vec!( "pageserver_tenant_task_events", diff --git a/pageserver/src/virtual_file.rs b/pageserver/src/virtual_file.rs index fd1bb54c72..0e3991250c 100644 --- a/pageserver/src/virtual_file.rs +++ b/pageserver/src/virtual_file.rs @@ -32,7 +32,6 @@ const STORAGE_IO_TIME_BUCKETS: &[f64] = &[ 1.0, // 1 sec ]; -// TODO Add pageserver instance label lazy_static! { static ref STORAGE_IO_TIME: HistogramVec = register_histogram_vec!( "pageserver_io_operations_seconds", @@ -43,7 +42,6 @@ lazy_static! { .expect("failed to define a metric"); } -// TODO Add pageserver instance label lazy_static! { static ref STORAGE_IO_SIZE: IntGaugeVec = register_int_gauge_vec!( "pageserver_io_operations_bytes_total", diff --git a/pageserver/src/walredo.rs b/pageserver/src/walredo.rs index 9f0652a27a..fe6e91fed2 100644 --- a/pageserver/src/walredo.rs +++ b/pageserver/src/walredo.rs @@ -106,7 +106,6 @@ impl crate::walredo::WalRedoManager for DummyRedoManager { // for access to the postgres process ('wait') since there is only one for // each tenant. // -// TODO Add pageserver instance label lazy_static! { static ref WAL_REDO_TIME: Histogram = register_histogram!("pageserver_wal_redo_seconds", "Time spent on WAL redo")