We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc2b611 commit 9dbca41Copy full SHA for 9dbca41
1 file changed
examples/sys_sync.py
@@ -21,17 +21,17 @@ def last() -> HashMap:
21
@section("tracepoint/syscalls/sys_enter_sync")
22
def do_trace(ctx: c_void_p) -> c_int64:
23
key = 0
24
- tsp = last().lookup(key)
+ tsp = last.lookup(key)
25
if tsp:
26
kt = ktime()
27
delta = kt - tsp
28
if delta < 1000000000:
29
time_ms = delta // 1000000
30
print(f"sync called within last second, last {time_ms} ms ago")
31
- last().delete(key)
+ last.delete(key)
32
else:
33
34
- last().update(key, kt)
+ last.update(key, kt)
35
return c_int64(0)
36
37
0 commit comments