@@ -6,14 +6,11 @@ use super::{
66 tx:: TxId ,
77 tx_state:: TxState ,
88} ;
9- use crate :: execution_context:: { Workload , WorkloadType } ;
10- use crate :: {
11- db:: datastore:: {
12- locking_tx_datastore:: state_view:: { IterByColRangeMutTx , IterMutTx , IterTx } ,
13- traits:: { InsertFlags , UpdateFlags } ,
14- } ,
15- subscription:: ExecutionCounters ,
9+ use crate :: db:: datastore:: {
10+ locking_tx_datastore:: state_view:: { IterByColRangeMutTx , IterMutTx , IterTx } ,
11+ traits:: { InsertFlags , UpdateFlags } ,
1612} ;
13+ use crate :: execution_context:: { Workload , WorkloadType } ;
1714use crate :: {
1815 db:: {
1916 datastore:: {
@@ -33,7 +30,6 @@ use crate::{
3330} ;
3431use anyhow:: { anyhow, Context } ;
3532use core:: { cell:: RefCell , ops:: RangeBounds } ;
36- use enum_map:: EnumMap ;
3733use parking_lot:: { Mutex , RwLock } ;
3834use spacetimedb_commitlog:: payload:: { txdata, Txdata } ;
3935use spacetimedb_data_structures:: map:: { HashCollectionExt , HashMap } ;
@@ -71,9 +67,6 @@ pub struct Locking {
7167 sequence_state : Arc < Mutex < SequencesState > > ,
7268 /// The identity of this database.
7369 pub ( crate ) database_identity : Identity ,
74-
75- /// A map from workload types to their cached prometheus counters.
76- workload_type_to_exec_counters : Arc < EnumMap < WorkloadType , ExecutionCounters > > ,
7770}
7871
7972impl MemoryUsage for Locking {
@@ -82,7 +75,6 @@ impl MemoryUsage for Locking {
8275 committed_state,
8376 sequence_state,
8477 database_identity,
85- workload_type_to_exec_counters : _,
8678 } = self ;
8779 std:: mem:: size_of_val ( & * * committed_state)
8880 + committed_state. read ( ) . heap_usage ( )
@@ -94,14 +86,10 @@ impl MemoryUsage for Locking {
9486
9587impl Locking {
9688 pub fn new ( database_identity : Identity , page_pool : PagePool ) -> Self {
97- let workload_type_to_exec_counters =
98- Arc :: new ( EnumMap :: from_fn ( |ty| ExecutionCounters :: new ( & ty, & database_identity) ) ) ;
99-
10089 Self {
10190 committed_state : Arc :: new ( RwLock :: new ( CommittedState :: new ( page_pool) ) ) ,
10291 sequence_state : <_ >:: default ( ) ,
10392 database_identity,
104- workload_type_to_exec_counters,
10593 }
10694 }
10795
@@ -318,10 +306,6 @@ impl Locking {
318306
319307 tx. alter_table_access ( table_id, access)
320308 }
321-
322- pub ( crate ) fn exec_counters_for ( & self , workload_type : WorkloadType ) -> & ExecutionCounters {
323- & self . workload_type_to_exec_counters [ workload_type]
324- }
325309}
326310
327311impl DataRow for Locking {
0 commit comments