mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 21:42:50 +02:00
collect room lock timing ???
This commit is contained in:
parent
f09e1c075d
commit
1f75b0a247
1 changed files with 4 additions and 0 deletions
|
@ -196,12 +196,14 @@ async fn handle_room(
|
||||||
count: usize,
|
count: usize,
|
||||||
transaction_id: &str,
|
transaction_id: &str,
|
||||||
) -> Result<Vec<(OwnedEventId, Result)>> {
|
) -> Result<Vec<(OwnedEventId, Result)>> {
|
||||||
|
let room_lock_start = Instant::now();
|
||||||
let _room_lock = services
|
let _room_lock = services
|
||||||
.rooms
|
.rooms
|
||||||
.event_handler
|
.event_handler
|
||||||
.mutex_federation
|
.mutex_federation
|
||||||
.lock(&room_id)
|
.lock(&room_id)
|
||||||
.await;
|
.await;
|
||||||
|
let room_lock_end = Instant::now();
|
||||||
|
|
||||||
let room_id = &room_id;
|
let room_id = &room_id;
|
||||||
let mut n = 0;
|
let mut n = 0;
|
||||||
|
@ -215,6 +217,7 @@ async fn handle_room(
|
||||||
transaction_id = ?transaction_id,
|
transaction_id = ?transaction_id,
|
||||||
pdu = n + 1,
|
pdu = n + 1,
|
||||||
total = count,
|
total = count,
|
||||||
|
room_lock_time = ?room_lock_end.saturating_duration_since(room_lock_start).as_micros(),
|
||||||
pdu_elapsed = ?pdu_start_time.elapsed(),
|
pdu_elapsed = ?pdu_start_time.elapsed(),
|
||||||
txn_elapsed = ?txn_start_time.elapsed(),
|
txn_elapsed = ?txn_start_time.elapsed(),
|
||||||
"Handling PDU",
|
"Handling PDU",
|
||||||
|
@ -232,6 +235,7 @@ async fn handle_room(
|
||||||
transaction_id = ?transaction_id,
|
transaction_id = ?transaction_id,
|
||||||
pdu = n + 1,
|
pdu = n + 1,
|
||||||
total = count,
|
total = count,
|
||||||
|
room_lock_time = ?room_lock_end.saturating_duration_since(room_lock_start).as_micros(),
|
||||||
pdu_elapsed = ?pdu_start_time.elapsed(),
|
pdu_elapsed = ?pdu_start_time.elapsed(),
|
||||||
txn_elapsed = ?txn_start_time.elapsed(),
|
txn_elapsed = ?txn_start_time.elapsed(),
|
||||||
"Finished handling PDU",
|
"Finished handling PDU",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue