Skip to content

Commit

Permalink
[tools/syscount.py]: fix total_ns wrong count (iovisor#1931)
Browse files Browse the repository at this point in the history
It's useful to know each syscall's total latency
in that period, but not the latency of the last time
in that period.

Signed-off-by: Ahao Mu <[email protected]>
  • Loading branch information
muahao authored and yonghong-song committed Aug 16, 2018
1 parent 49d475f commit 8cdcb0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/syscount.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def handle_errno(errstr):
val = data.lookup_or_init(&key, &zero);
val->count++;
val->total_ns = bpf_ktime_get_ns() - *start_ns;
val->total_ns += bpf_ktime_get_ns() - *start_ns;
#else
u64 *val, zero = 0;
val = data.lookup_or_init(&key, &zero);
Expand Down

0 comments on commit 8cdcb0d

Please sign in to comment.