]>
git.proxmox.com Git - ceph.git/blob - ceph/src/test/bench/smalliobenchprocessor.py
7 def get_next_line(line
, output
):
9 if val
['type'] not in output
:
10 output
[val
['type']] = {}
11 for (name
, value
) in val
.items():
16 if name
not in output
[val
['type']]:
17 output
[val
['type']][name
] = []
18 output
[val
['type']][name
] += [float(value
)]
20 def wrapgz(gfilename
):
21 gfile
= gzip
.open(gfilename
, 'rb')
22 if sys
.version_info
[0] >= 3:
23 gfile
= io
.TextIOWrapper(gfile
)
26 def read_all_input(filename
):
31 with
openfn(filename
) as fh
:
33 get_next_line(line
, cur
)
36 def write_committed_latency(out
, bins
, **kwargs
):
37 hist(out
['write_committed']['latency'], bins
, **kwargs
)
39 def read_latency(out
):
40 hist(out
['read']['latency'], 100)
42 def com(out
): return out
['write_committed']['latency']
43 def app(out
): return out
['write_applied']['latency']