Skip to content

Commit 26a49c9

Browse files
committed
Throughput values are not normalized
closes #23
1 parent 82ac14f commit 26a49c9

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

cmd/estat.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ def die(*args, **kwargs):
8686
-z/-Z enable/disable size histograms (default: off)
8787
-q/-Q enable/disable latency histograms by size (default: off)
8888
-y/-Y enable/disable the summary output (default: on)
89-
-n/-N enable/disable normalizing summary by time (default: on)
9089
-t/-T enable/disable emitting the summary total (default: on)
9190
-d LEVEL set BCC debug level
9291
-e emit the resulting eBPF script without executing it
@@ -144,7 +143,6 @@ class Args:
144143
setattr(args, "size_hist", False)
145144
setattr(args, "latsize_hist", False)
146145
setattr(args, "summary", True)
147-
setattr(args, "normalize", True)
148146
setattr(args, "total", True)
149147

150148
#
@@ -182,7 +180,6 @@ class Args:
182180
'-z': "size_hist",
183181
'-q': "latsize_hist",
184182
'-y': "summary",
185-
'-n': "normalize",
186183
'-t': "total"}
187184
if opt in switches:
188185
setattr(args, switches[opt], True)
@@ -484,9 +481,10 @@ class Args:
484481
ds__delta = ds__end - ds__start
485482
if not accum:
486483
ds__start = ds__end
487-
if args.summary and args.normalize:
488-
helper1.normalize("ops", ds__delta // 1000000000)
489-
helper3.normalize("opst", ds__delta // 1000000000)
484+
helper1.normalize("ops", ds__delta // 1000000000)
485+
helper1.normalize("data", ds__delta // 1000000000)
486+
helper3.normalize("opst", ds__delta // 1000000000)
487+
helper3.normalize("datat", ds__delta // 1000000000)
490488
clear_data = not accum
491489
if args.latsize_hist:
492490
helper2.printall(clear_data)
@@ -505,9 +503,10 @@ class Args:
505503
pass
506504
try:
507505
ds__delta = int(os.popen("date +%s%N").readlines()[0]) - ds__start
508-
if args.summary and args.normalize:
509-
helper1.normalize("ops", ds__delta // 1000000000)
510-
helper3.normalize("opst", ds__delta // 1000000000)
506+
helper1.normalize("ops", ds__delta // 1000000000)
507+
helper1.normalize("data", ds__delta // 1000000000)
508+
helper3.normalize("opst", ds__delta // 1000000000)
509+
helper3.normalize("datat", ds__delta // 1000000000)
511510
if args.latsize_hist:
512511
helper2.printall()
513512
if args.lat_hist or args.size_hist or args.summary:

0 commit comments

Comments
 (0)