@@ -48,7 +48,7 @@ use crate::{
4848} ;
4949use anyhow:: anyhow;
5050use parking_lot:: { lock_api:: ArcRwLockWriteGuard , RawRwLock , RwLock } ;
51- use spacetimedb_lib:: Address ;
51+ use spacetimedb_lib:: { metrics :: METRICS , Address } ;
5252use spacetimedb_primitives:: * ;
5353use spacetimedb_sats:: data_key:: { DataKey , ToDataKey } ;
5454use spacetimedb_sats:: db:: def:: * ;
@@ -250,7 +250,7 @@ impl CommittedState {
250250 for schema in system_tables ( ) {
251251 let table_id = schema. table_id ;
252252 // Reset the row count metric for this system table
253- DB_METRICS
253+ METRICS
254254 . rdb_num_table_rows
255255 . with_label_values ( & database_address, & table_id. 0 )
256256 . set ( 0 ) ;
@@ -283,7 +283,7 @@ impl CommittedState {
283283
284284 st_columns. rows . insert ( RowId ( data_key) , row) ;
285285 // Increment row count for st_columns
286- DB_METRICS
286+ METRICS
287287 . rdb_num_table_rows
288288 . with_label_values ( & database_address, & ST_COLUMNS_ID . into ( ) )
289289 . inc ( ) ;
@@ -311,7 +311,7 @@ impl CommittedState {
311311 let data_key = row. to_data_key ( ) ;
312312 st_constraints. rows . insert ( RowId ( data_key) , row) ;
313313 // Increment row count for st_constraints
314- DB_METRICS
314+ METRICS
315315 . rdb_num_table_rows
316316 . with_label_values ( & database_address, & ST_CONSTRAINTS_ID . into ( ) )
317317 . inc ( ) ;
@@ -340,7 +340,7 @@ impl CommittedState {
340340 let data_key = row. to_data_key ( ) ;
341341 st_indexes. rows . insert ( RowId ( data_key) , row) ;
342342 // Increment row count for st_indexes
343- DB_METRICS
343+ METRICS
344344 . rdb_num_table_rows
345345 . with_label_values ( & database_address, & ST_INDEXES_ID . into ( ) )
346346 . inc ( ) ;
@@ -375,7 +375,7 @@ impl CommittedState {
375375 let data_key = row. to_data_key ( ) ;
376376 st_sequences. rows . insert ( RowId ( data_key) , row) ;
377377 // Increment row count for st_sequences
378- DB_METRICS
378+ METRICS
379379 . rdb_num_table_rows
380380 . with_label_values ( & database_address, & ST_SEQUENCES_ID . into ( ) )
381381 . inc ( ) ;
@@ -1885,7 +1885,7 @@ impl Locking {
18851885 committed_state
18861886 . table_rows ( table_id, schema)
18871887 . remove ( & RowId ( write. data_key ) ) ;
1888- DB_METRICS
1888+ METRICS
18891889 . rdb_num_table_rows
18901890 . with_label_values ( & self . database_address , & table_id. into ( ) )
18911891 . dec ( ) ;
@@ -1914,7 +1914,7 @@ impl Locking {
19141914 committed_state
19151915 . table_rows ( table_id, schema)
19161916 . insert ( RowId ( write. data_key ) , product_value) ;
1917- DB_METRICS
1917+ METRICS
19181918 . rdb_num_table_rows
19191919 . with_label_values ( & self . database_address , & table_id. into ( ) )
19201920 . inc ( ) ;
0 commit comments