-#!/usr/bin/env python2.7
+#!/usr/bin/python2.7
"""
Utility for converting *_clat_hist* files generated by fio into latency statistics.
if ctx.job_file:
try:
- from configparser import SafeConfigParser
+ from configparser import SafeConfigParser, NoOptionError
except ImportError:
- from ConfigParser import SafeConfigParser
+ from ConfigParser import SafeConfigParser, NoOptionError
cp = SafeConfigParser(allow_no_value=True)
with open(ctx.job_file, 'r') as fp:
- cp.read(fp)
+ cp.readfp(fp)
if ctx.interval is None:
# Auto detect --interval value
for s in cp.sections():
try:
- hist_msec = cp[s]['log_hist_msec']
+ hist_msec = cp.get(s, 'log_hist_msec')
if hist_msec is not None:
ctx.interval = int(hist_msec)
- except KeyError:
+ except NoOptionError:
pass
if ctx.interval is None:
help='print warning messages to stderr')
arg('--group_nr',
- default=19,
+ default=29,
type=int,
help='FIO_IO_U_PLAT_GROUP_NR as defined in stat.h')