@@ -36,6 +36,7 @@ use matrix_sdk_base::{
36
36
Position , RawChunk , Update ,
37
37
} ,
38
38
media:: { MediaRequestParameters , UniqueKey } ,
39
+ timer,
39
40
} ;
40
41
use matrix_sdk_store_encryption:: StoreCipher ;
41
42
use ruma:: {
@@ -176,11 +177,10 @@ impl SqliteEventCacheStore {
176
177
#[ instrument( skip_all) ]
177
178
async fn read ( & self ) -> Result < SqliteAsyncConn > {
178
179
trace ! ( "Taking a `read` connection" ) ;
180
+ let _ = timer ! ( "`read` connection acquired" ) ;
179
181
180
182
let connection = self . pool . get ( ) . await ?;
181
183
182
- trace ! ( "`read` connection taken" ) ;
183
-
184
184
// Per https://www.sqlite.org/foreignkeys.html#fk_enable, foreign key
185
185
// support must be enabled on a per-connection basis. Execute it every
186
186
// time we try to get a connection, since we can't guarantee a previous
@@ -194,11 +194,10 @@ impl SqliteEventCacheStore {
194
194
#[ instrument( skip_all) ]
195
195
async fn write ( & self ) -> Result < OwnedMutexGuard < SqliteAsyncConn > > {
196
196
trace ! ( "Taking a `write` connection" ) ;
197
+ let _ = timer ! ( "`write` connection acquired" ) ;
197
198
198
199
let connection = self . write_connection . clone ( ) . lock_owned ( ) . await ;
199
200
200
- trace ! ( "`write` connection taken" ) ;
201
-
202
201
// Per https://www.sqlite.org/foreignkeys.html#fk_enable, foreign key
203
202
// support must be enabled on a per-connection basis. Execute it every
204
203
// time we try to get a connection, since we can't guarantee a previous
0 commit comments