summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-06-18 13:09:42 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-06-18 13:09:42 +0200
commit613e69236f00f7bff184743953e673f71d11b68f (patch)
tree385af9796dc6adc948ac1b9ba147cf115d09ad4b
parent1c7fd696da879bb50d0c0267fea32193362cafe6 (diff)
downloadscripts-613e69236f00f7bff184743953e673f71d11b68f.tar.gz
interrupts-graph.py: add --log and --no-smooth
-rwxr-xr-xrare/interrupts-graph.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/rare/interrupts-graph.py b/rare/interrupts-graph.py
index 7417726..76006cd 100755
--- a/rare/interrupts-graph.py
+++ b/rare/interrupts-graph.py
@@ -52,6 +52,10 @@ parser.add_argument('-x', '--xrange', type=float,
help='Range of x values to display')
parser.add_argument('-I', '--interval', type=float,
help='Seconds to wait between updates')
+parser.add_argument('--log', type=float,
+ help='Log base of y axis or 0 to disable log y axis')
+parser.add_argument('--no-smooth', action='store_false',
+ help='Whether to enable curve fitting')
args = parser.parse_args()
if args.input_filename:
input_filename = args.input_filename
@@ -61,7 +65,10 @@ if args.xrange:
XRANGE = args.xrange
if args.interval:
INTERVAL = args.interval
-
+if args.log is not None:
+ LOG_SCALE_BASE = args.log
+if args.no_smooth is not None:
+ SMOOTH_CURVES = args.no_smooth
if args.limit_seconds is not None:
if args.limit_seconds > 0:
x_entries_max = int(args.limit_seconds / INTERVAL)