Skip to content

Commit f6c9cf9

Browse files
committed
Throughput values are not normalized
closes #23
1 parent 99fa252 commit f6c9cf9

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
@@ -146,7 +145,6 @@ class Args:
146145
setattr(args, "size_hist", False)
147146
setattr(args, "latsize_hist", False)
148147
setattr(args, "summary", True)
149-
setattr(args, "normalize", True)
150148
setattr(args, "total", True)
151149

152150
#
@@ -184,7 +182,6 @@ class Args:
184182
'-z': "size_hist",
185183
'-q': "latsize_hist",
186184
'-y': "summary",
187-
'-n': "normalize",
188185
'-t': "total"}
189186
if opt in switches:
190187
setattr(args, switches[opt], True)
@@ -485,9 +482,10 @@ class Args:
485482
ds__delta = ds__end - ds__start
486483
if not accum:
487484
ds__start = ds__end
488-
if args.summary and args.normalize:
489-
helper1.normalize("ops", ds__delta / 1000000000)
490-
helper3.normalize("opst", ds__delta / 1000000000)
485+
helper1.normalize("ops", ds__delta / 1000000000)
486+
helper1.normalize("data", ds__delta / 1000000000)
487+
helper3.normalize("opst", ds__delta / 1000000000)
488+
helper3.normalize("datat", ds__delta / 1000000000)
491489
clear_data = not accum
492490
if args.latsize_hist:
493491
helper2.printall(clear_data)
@@ -506,9 +504,10 @@ class Args:
506504
pass
507505
try:
508506
ds__delta = long(os.popen("date +%s%N").readlines()[0]) - ds__start
509-
if args.summary and args.normalize:
510-
helper1.normalize("ops", ds__delta / 1000000000)
511-
helper3.normalize("opst", ds__delta / 1000000000)
507+
helper1.normalize("ops", ds__delta / 1000000000)
508+
helper1.normalize("data", ds__delta / 1000000000)
509+
helper3.normalize("opst", ds__delta / 1000000000)
510+
helper3.normalize("datat", ds__delta / 1000000000)
512511
if args.latsize_hist:
513512
helper2.printall()
514513
if args.lat_hist or args.size_hist or args.summary:

0 commit comments

Comments
 (0)