Skip to content

Commit 36713ad

Browse files
committed
feat(sdk): Add more logs around the sync_lock and response_processor in SlidingSync.
1 parent d73a02c commit 36713ad

File tree

1 file changed

+7
-1
lines changed
  • crates/matrix-sdk/src/sliding_sync

1 file changed

+7
-1
lines changed

crates/matrix-sdk/src/sliding_sync/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,16 @@ impl SlidingSync {
258258
// happens here.
259259

260260
let sync_response = {
261+
let _timer = timer!("response processor");
262+
261263
let response_processor = {
262264
// Take the lock to avoid concurrent sliding syncs overwriting each other's room
263265
// infos.
264-
let _sync_lock = self.inner.client.base_client().sync_lock().lock().await;
266+
let _sync_lock = {
267+
let _timer = timer!("acquiring the `sync_lock`");
268+
269+
self.inner.client.base_client().sync_lock().lock().await
270+
};
265271

266272
let mut response_processor =
267273
SlidingSyncResponseProcessor::new(self.inner.client.clone());

0 commit comments

Comments
 (0)