Skip to content

Throughput values are not normalized #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions cmd/estat.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def die(*args, **kwargs):
-z/-Z enable/disable size histograms (default: off)
-q/-Q enable/disable latency histograms by size (default: off)
-y/-Y enable/disable the summary output (default: on)
-n/-N enable/disable normalizing summary by time (default: on)
-t/-T enable/disable emitting the summary total (default: on)
-d LEVEL set BCC debug level
-e emit the resulting eBPF script without executing it
Expand Down Expand Up @@ -144,7 +143,6 @@ class Args:
setattr(args, "size_hist", False)
setattr(args, "latsize_hist", False)
setattr(args, "summary", True)
setattr(args, "normalize", True)
setattr(args, "total", True)

#
Expand Down Expand Up @@ -182,7 +180,6 @@ class Args:
'-z': "size_hist",
'-q': "latsize_hist",
'-y': "summary",
'-n': "normalize",
'-t': "total"}
if opt in switches:
setattr(args, switches[opt], True)
Expand Down Expand Up @@ -484,9 +481,10 @@ class Args:
ds__delta = ds__end - ds__start
if not accum:
ds__start = ds__end
if args.summary and args.normalize:
helper1.normalize("ops", ds__delta // 1000000000)
helper3.normalize("opst", ds__delta // 1000000000)
helper1.normalize("ops", ds__delta // 1000000000)
helper1.normalize("data", ds__delta // 1000000000)
helper3.normalize("opst", ds__delta // 1000000000)
helper3.normalize("datat", ds__delta // 1000000000)
clear_data = not accum
if args.latsize_hist:
helper2.printall(clear_data)
Expand All @@ -505,9 +503,10 @@ class Args:
pass
try:
ds__delta = int(os.popen("date +%s%N").readlines()[0]) - ds__start
if args.summary and args.normalize:
helper1.normalize("ops", ds__delta // 1000000000)
helper3.normalize("opst", ds__delta // 1000000000)
helper1.normalize("ops", ds__delta // 1000000000)
helper1.normalize("data", ds__delta // 1000000000)
helper3.normalize("opst", ds__delta // 1000000000)
helper3.normalize("datat", ds__delta // 1000000000)
if args.latsize_hist:
helper2.printall()
if args.lat_hist or args.size_hist or args.summary:
Expand Down