After https://github.com/cowprotocol/infrastructure/pull/4611, we no longer need the update_database_metrics function:
|
pub async fn update_database_metrics(&self) -> sqlx::Result<()> { |
|
let metrics = Metrics::get(); |
|
|
|
let mut ex = self.pool.acquire().await?; |
|
|
|
// update table row metrics |
|
for &table in database::TABLES { |
|
let count = count_rows_in_table(&mut ex, table).await?; |
|
metrics.table_rows.with_label_values(&[table]).set(count); |
|
} |
|
|
|
// update table row metrics |
|
for &table in database::LARGE_TABLES { |
|
let count = estimate_rows_in_table(&mut ex, table).await?; |
|
metrics.table_rows.with_label_values(&[table]).set(count); |
|
} |
|
|
|
Ok(()) |
|
} |
After https://github.com/cowprotocol/infrastructure/pull/4611, we no longer need the
update_database_metricsfunction:services/crates/autopilot/src/database/mod.rs
Lines 79 to 97 in ff38a3e