pg-lock-tracer 0.6.0__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pg_lock_tracer-0.6.0/src/pg_lock_tracer.egg-info → pg_lock_tracer-0.6.1}/PKG-INFO +8 -3
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/README.md +7 -2
- pg_lock_tracer-0.6.1/src/pg_lock_tracer/__init__.py +1 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/animate_lock_graph.py +12 -2
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/helper.py +0 -1
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/oid_resolver.py +1 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1/src/pg_lock_tracer.egg-info}/PKG-INFO +8 -3
- pg_lock_tracer-0.6.0/src/pg_lock_tracer/__init__.py +0 -1
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/LICENSE +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/pyproject.toml +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/setup.cfg +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/setup.py +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/bpf/__init__.py +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/bpf/pg_lock_tracer.c +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/bpf/pg_lw_lock_tracer.c +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/bpf/pg_row_lock_tracer.c +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/pg_lock_tracer.py +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/pg_lw_lock_tracer.py +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer/pg_row_lock_tracer.py +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer.egg-info/SOURCES.txt +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer.egg-info/dependency_links.txt +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer.egg-info/entry_points.txt +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer.egg-info/requires.txt +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer.egg-info/top_level.txt +0 -0
- {pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/tests/test_helper.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pg_lock_tracer
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: A BPF based lock tracer for the PostgreSQL database
|
|
5
5
|
Home-page: https://github.com/jnidzwetzki/pg-lock-tracer
|
|
6
6
|
Author: Jan Nidzwetzki
|
|
@@ -74,8 +74,13 @@ pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -
|
|
|
74
74
|
# Show statistics about locks
|
|
75
75
|
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 --statistics
|
|
76
76
|
|
|
77
|
-
# Create an animated lock graph
|
|
78
|
-
|
|
77
|
+
# Create an animated lock graph (with Oids)
|
|
78
|
+
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 -j -o locks.json
|
|
79
|
+
animate_lock_graph -i lock -o locks.html
|
|
80
|
+
|
|
81
|
+
# Create an animated lock graph (with table names)
|
|
82
|
+
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 -j -r 1234:psql://jan@localhost/test2 -o locks.json
|
|
83
|
+
animate_lock_graph -i lock -o locks.html
|
|
79
84
|
```
|
|
80
85
|
|
|
81
86
|
## Example Output
|
|
@@ -52,8 +52,13 @@ pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -
|
|
|
52
52
|
# Show statistics about locks
|
|
53
53
|
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 --statistics
|
|
54
54
|
|
|
55
|
-
# Create an animated lock graph
|
|
56
|
-
|
|
55
|
+
# Create an animated lock graph (with Oids)
|
|
56
|
+
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 -j -o locks.json
|
|
57
|
+
animate_lock_graph -i lock -o locks.html
|
|
58
|
+
|
|
59
|
+
# Create an animated lock graph (with table names)
|
|
60
|
+
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 -j -r 1234:psql://jan@localhost/test2 -o locks.json
|
|
61
|
+
animate_lock_graph -i lock -o locks.html
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
## Example Output
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.1"
|
|
@@ -207,7 +207,7 @@ class DOTModel:
|
|
|
207
207
|
if self.verbose:
|
|
208
208
|
print(f"Processing {event}")
|
|
209
209
|
|
|
210
|
-
tablename = event
|
|
210
|
+
tablename = StringHelper.get_tablename(event)
|
|
211
211
|
lock_type = event["lock_type"]
|
|
212
212
|
|
|
213
213
|
if not self.graph.vs.select(label_eq=tablename):
|
|
@@ -244,7 +244,7 @@ class DOTModel:
|
|
|
244
244
|
if self.verbose:
|
|
245
245
|
print(f"Processing {event}")
|
|
246
246
|
|
|
247
|
-
tablename = event
|
|
247
|
+
tablename = StringHelper.get_tablename(event)
|
|
248
248
|
lock_type = event["lock_type"]
|
|
249
249
|
lock_numeric_value = PostgreSQLLockHelper.lock_type_to_int(lock_type)
|
|
250
250
|
|
|
@@ -383,6 +383,16 @@ class StringHelper:
|
|
|
383
383
|
|
|
384
384
|
return result
|
|
385
385
|
|
|
386
|
+
@staticmethod
|
|
387
|
+
def get_tablename(event):
|
|
388
|
+
"""
|
|
389
|
+
Get the tablename or the Oid of the event.
|
|
390
|
+
"""
|
|
391
|
+
if "table" in event:
|
|
392
|
+
return event["table"]
|
|
393
|
+
|
|
394
|
+
return f"Oid {event['oid']}"
|
|
395
|
+
|
|
386
396
|
|
|
387
397
|
def main():
|
|
388
398
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pg_lock_tracer
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: A BPF based lock tracer for the PostgreSQL database
|
|
5
5
|
Home-page: https://github.com/jnidzwetzki/pg-lock-tracer
|
|
6
6
|
Author: Jan Nidzwetzki
|
|
@@ -74,8 +74,13 @@ pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -
|
|
|
74
74
|
# Show statistics about locks
|
|
75
75
|
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 --statistics
|
|
76
76
|
|
|
77
|
-
# Create an animated lock graph
|
|
78
|
-
|
|
77
|
+
# Create an animated lock graph (with Oids)
|
|
78
|
+
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 -j -o locks.json
|
|
79
|
+
animate_lock_graph -i lock -o locks.html
|
|
80
|
+
|
|
81
|
+
# Create an animated lock graph (with table names)
|
|
82
|
+
pg_lock_tracer -x /home/jan/postgresql-sandbox/bin/REL_15_1_DEBUG/bin/postgres -p 1234 -j -r 1234:psql://jan@localhost/test2 -o locks.json
|
|
83
|
+
animate_lock_graph -i lock -o locks.html
|
|
79
84
|
```
|
|
80
85
|
|
|
81
86
|
## Example Output
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pg_lock_tracer-0.6.0 → pg_lock_tracer-0.6.1}/src/pg_lock_tracer.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|