Skip to content

Commit 4390926

Browse files
committed
Throughput values are not normalized
closes #23
1 parent 21b6666 commit 4390926

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
@@ -88,7 +88,6 @@ def die(*args, **kwargs):
8888
-z/-Z enable/disable size histograms (default: off)
8989
-q/-Q enable/disable latency histograms by size (default: off)
9090
-y/-Y enable/disable the summary output (default: on)
91-
-n/-N enable/disable normalizing summary by time (default: on)
9291
-t/-T enable/disable emitting the summary total (default: on)
9392
-d LEVEL set BCC debug level
9493
-e emit the resulting eBPF script without executing it
@@ -147,7 +146,6 @@ class Args:
147146
setattr(args, "size_hist", False)
148147
setattr(args, "latsize_hist", False)
149148
setattr(args, "summary", True)
150-
setattr(args, "normalize", True)
151149
setattr(args, "total", True)
152150

153151
#
@@ -185,7 +183,6 @@ class Args:
185183
'-z': "size_hist",
186184
'-q': "latsize_hist",
187185
'-y': "summary",
188-
'-n': "normalize",
189186
'-t': "total"}
190187
if opt in switches:
191188
setattr(args, switches[opt], True)
@@ -483,9 +480,10 @@ class Args:
483480
ds__delta = ds__end - ds__start
484481
if not accum:
485482
ds__start = ds__end
486-
if args.summary and args.normalize:
487-
helper1.normalize("ops", ds__delta / 1000000000)
488-
helper3.normalize("opst", ds__delta / 1000000000)
483+
helper1.normalize("ops", ds__delta / 1000000000)
484+
helper1.normalize("data", ds__delta / 1000000000)
485+
helper3.normalize("opst", ds__delta / 1000000000)
486+
helper3.normalize("datat", ds__delta / 1000000000)
489487
clear_data = not accum
490488
if args.latsize_hist:
491489
helper2.printall(clear_data)
@@ -504,9 +502,10 @@ class Args:
504502
pass
505503
try:
506504
ds__delta = long(os.popen("date +%s%N").readlines()[0]) - ds__start
507-
if args.summary and args.normalize:
508-
helper1.normalize("ops", ds__delta / 1000000000)
509-
helper3.normalize("opst", ds__delta / 1000000000)
505+
helper1.normalize("ops", ds__delta / 1000000000)
506+
helper1.normalize("data", ds__delta / 1000000000)
507+
helper3.normalize("opst", ds__delta / 1000000000)
508+
helper3.normalize("datat", ds__delta / 1000000000)
510509
if args.latsize_hist:
511510
helper2.printall()
512511
if args.lat_hist or args.size_hist or args.summary:

0 commit comments

Comments
 (0)