from . import termgraph
from .command import Command
from ..core import irq as core_irq
-from ..linuxautomaton import common, sv
+from ..linuxautomaton import sv
class IrqAnalysisCommand(Command):
return hard_stats_table, soft_stats_table, freq_tables
- def _ns_to_hour_nsec(self, ts):
- return common.ns_to_hour_nsec(ts, self._args.multi_day, self._args.gmt)
-
def _print_log(self, result_table):
fmt = '[{:<18}, {:<18}] {:>15} {:>4} {:<9} {:>4} {:<22}'
title_fmt = '{:<20} {:<19} {:>15} {:>4} {:<9} {:>4} {:<22}'
end_ts = timerange.end
if type(row.raised_ts) is mi.Timestamp:
- raised_fmt = ' (raised at %s)'
- raised_ts = \
- raised_fmt % self._ns_to_hour_nsec(row.raised_ts.value)
+ raised_ts = ' (raised at {})'.format(
+ self._format_timestamp(row.raised_ts.value)
+ )
else:
raised_ts = ''
else:
irqtype = 'SoftIRQ'
- print(fmt.format(self._ns_to_hour_nsec(begin_ts),
- self._ns_to_hour_nsec(end_ts),
+ print(fmt.format(self._format_timestamp(begin_ts),
+ self._format_timestamp(end_ts),
'%0.03f' % ((end_ts - begin_ts) / 1000),
'%d' % cpu_id, irqtype, irq_do.nr,
irq_do.name + raised_ts))