self.current_sec = event_sec
self.start_ns = event.timestamp
+ def _print_date(self, begin_ns, end_ns):
+ date = 'Timerange: [%s, %s]' % (
+ common.ns_to_hour_nsec(begin_ns, gmt=self._arg_gmt,
+ multi_day=True),
+ common.ns_to_hour_nsec(end_ns, gmt=self._arg_gmt,
+ multi_day=True))
+ print(date)
+
def _validate_transform_common_args(self, args):
self._arg_path = args.path
total_ns = end_ns - begin_ns
graph = Pyasciigraph()
values = []
- print('Timerange: [%s, %s]' % (
- common.ns_to_hour_nsec(begin_ns, gmt=self._arg_gmt,
- multi_day=True),
- common.ns_to_hour_nsec(end_ns, gmt=self._arg_gmt,
- multi_day=True)))
+ self._print_date(begin_ns, end_ns)
for tid in sorted(self.state.tids.values(),
key=operator.attrgetter('cpu_ns'), reverse=True):
if self._arg_proc_list and tid.comm not in self._arg_proc_list:
self.iostats_output_disk()
def _print_results(self, begin_ns, end_ns):
- print('Timerange: [%s, %s]' % (
- common.ns_to_hour_nsec(begin_ns, gmt=self._arg_gmt,
- multi_day=True),
- common.ns_to_hour_nsec(end_ns, gmt=self._arg_gmt,
- multi_day=True)))
+ self._print_date(begin_ns, end_ns)
if self._arg_usage:
self.iotop_output()
self.syscalls_stats = self.compute_syscalls_latency_stats(end_ns)
if self._arg_log:
self._print_irq_log()
- def _print_date(self, begin_ns, end_ns):
- date = 'Timerange: [%s, %s]' % (
- common.ns_to_hour_nsec(begin_ns, gmt=self._arg_gmt,
- multi_day=True),
- common.ns_to_hour_nsec(end_ns, gmt=self._arg_gmt,
- multi_day=True))
- print(date)
-
def _print_stats(self, begin_ns, end_ns):
self._print_date(begin_ns, end_ns)
return True
def _print_results(self, begin_ns, end_ns):
- print('Timerange: [%s, %s]' % (
- common.ns_to_hour_nsec(begin_ns, gmt=self._arg_gmt,
- multi_day=True),
- common.ns_to_hour_nsec(end_ns, gmt=self._arg_gmt,
- multi_day=True)))
-
+ self._print_date(begin_ns, end_ns)
self._print_per_tid_alloc()
self._print_per_tid_freed()
self._print_total_alloc_freed()
return True
def _print_results(self, begin_ns, end_ns):
- print('Timerange: [%s, %s]' % (
- common.ns_to_hour_nsec(begin_ns, gmt=self._arg_gmt,
- multi_day=True),
- common.ns_to_hour_nsec(end_ns, gmt=self._arg_gmt,
- multi_day=True)))
+ self._print_date(begin_ns, end_ns)
strformat = '{:<28} {:>14} {:>14} {:>14} {:>12} {:>10} {:<14}'
print('Per-TID syscalls statistics (usec)')
for tid in sorted(self.state.tids.values(),