Fix: use begin/end values from _analysis_conf for IO filtering
authorAntoine Busque <abusque@efficios.com>
Tue, 26 Apr 2016 19:42:40 +0000 (15:42 -0400)
committerAntoine Busque <abusque@efficios.com>
Tue, 26 Apr 2016 19:42:40 +0000 (15:42 -0400)
The values in `_args` previously used were the raw string values from
the command line, whereas those in `_analysis_conf` are parsed into
integers.

Fixes: #44
lttnganalyses/cli/io.py

index 38c3cfa1d9f961f47bda0a029d6ae1d446809fde..4dc2234732714136ddb2c47a6db4021f330a0031 100644 (file)
@@ -268,8 +268,10 @@ class IoAnalysisCommand(Command):
         # Note: we only want to return False only when a request has
         # ended and is completely outside the timerange (i.e. begun
         # after the end of the time range).
-        return not (self._args.begin and self._args.end and end and
-                    begin > self._args.end)
+        return not (
+            self._analysis_conf.begin_ts and self._analysis_conf.end_ts and
+            end and begin > self._analysis_conf.end_ts
+        )
 
     def _filter_io_request(self, io_rq):
         return self._filter_size(io_rq.size) and \
@@ -277,8 +279,12 @@ class IoAnalysisCommand(Command):
             self._filter_time_range(io_rq.begin_ts, io_rq.end_ts)
 
     def _is_io_rq_out_of_range(self, io_rq):
-        return self._args.begin and io_rq.begin_ts < self._args.begin or \
-            self._args.end and io_rq.end_ts > self._args.end
+        return (
+            self._analysis_conf.begin_ts and
+            io_rq.begin_ts < self._analysis_conf.begin_ts or
+            self._analysis_conf.end_ts and
+            io_rq.end_ts > self._analysis_conf.end_ts
+        )
 
     def _append_per_proc_read_usage_row(self, proc_stats, result_table):
         result_table.append_row(
This page took 0.024932 seconds and 5 git commands to generate.