Skip to content

Remove update_database_metrics #4199

@tilacog

Description

@tilacog

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(())
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions