From 13301d58143e2aaef72baf0171e93c49d6a6ce44 Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Sun, 22 Jan 2023 13:20:31 +0100 Subject: [PATCH] Improved wording --- README.md | 2 +- src/pg_lock_tracer/pg_lw_lock_tracer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d205cdd..66b1e0a 100644 --- a/README.md +++ b/README.md @@ -667,7 +667,7 @@ CLI: `sudo pg_lw_lock_tracer -p 1698108 --statistics` 2904552882590752 [Pid 1704367] Acquired lock WALInsert (mode) LW_EXCLUSIVE / LWLockAcquire() 2904552882611656 [Pid 1704367] Unlock WALInsert 2904552882638194 [Pid 1704367] Wait for WALWrite -2904554401202251 [Pid 1704367] Lock for WALWrite was acquired in 1518564057 ns +2904554401202251 [Pid 1704367] Wait for WALWrite lock took 1518564057 ns 2904554401222926 [Pid 1704367] Waited but not acquired WALWrite (mode LW_EXCLUSIVE) / LWLockConditionalAcquire() 2904554401234504 [Pid 1704367] Acquired lock WALWrite (mode LW_EXCLUSIVE) / LWLockConditionalAcquire() 2904554404873664 [Pid 1704367] Unlock WALWrite diff --git a/src/pg_lock_tracer/pg_lw_lock_tracer.py b/src/pg_lock_tracer/pg_lw_lock_tracer.py index c642118..2f75e97 100755 --- a/src/pg_lock_tracer/pg_lw_lock_tracer.py +++ b/src/pg_lock_tracer/pg_lw_lock_tracer.py @@ -285,7 +285,7 @@ def print_lock_event(self, _cpu, data, _size): print(f"{print_prefix} Wait for {tranche}") elif event.event_type == Events.WAIT_DONE: lock_time = self.get_lock_wait_time(event) - print(f"{print_prefix} Lock for {tranche} was acquired in {lock_time} ns") + print(f"{print_prefix} Wait for {tranche} lock took {lock_time} ns") elif event.event_type == Events.COND_ACQUIRE: print( f"{print_prefix} Acquired lock {tranche} (mode) {lock_mode} "