diff options
author | Alan D. Brunelle <alan.brunelle@hp.com> | 2009-08-14 13:00:27 -0400 |
---|---|---|
committer | Alan D. Brunelle <alan.brunelle@hp.com> | 2009-08-14 13:00:27 -0400 |
commit | dbb8d92dc5d3d61fca94c8eef3636bc4044deda2 (patch) | |
tree | d0ce988973c023e3363851eb535eff174462d6f8 /btt/trace_complete.c | |
parent | 1e09f6e9012826fca69fa07222b7bc53c3e629ee (diff) | |
download | blktrace-dbb8d92dc5d3d61fca94c8eef3636bc4044deda2.tar.gz blktrace-dbb8d92dc5d3d61fca94c8eef3636bc4044deda2.tar.bz2 |
Added in running stats for btt
Create an overall system and per-device statistics file containing
MB-per-second and I/Os-per-second values. Format for each file is first
column contains an (integer) time stamp (seconds since start of run)
and a (double) value.
File names are:
sys_mbps_fp.dat - system-wide mbps (for all devices watched, of course)
sys_iops_fp.dat - I/Os per sec
Each device watched will have a file with the device preceeding the
_mbps or _iops section of the above file names.
Diffstat (limited to 'btt/trace_complete.c')
-rw-r--r-- | btt/trace_complete.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/btt/trace_complete.c b/btt/trace_complete.c index 6f616bc..d34fbd0 100644 --- a/btt/trace_complete.c +++ b/btt/trace_complete.c @@ -55,13 +55,15 @@ static void handle_complete(struct io *c_iop) struct list_head *p, *q; __u64 d_time = (__u64)-1; FILE *pit_fp = c_iop->dip->pit_fp; + double cur = BIT_TIME(c_iop->t.time); update_blks(c_iop); update_cregion(&all_regions, c_iop->t.time); update_cregion(&c_iop->dip->regions, c_iop->t.time); if (c_iop->pip) update_cregion(&c_iop->pip->regions, c_iop->t.time); - aqd_complete(c_iop->dip->aqd_handle, BIT_TIME(c_iop->t.time)); + aqd_complete(c_iop->dip->aqd_handle, cur); + rstat_add(c_iop->dip->rstat_handle, cur, c_iop->t.bytes >> 9); dip_foreach_list(c_iop, IOP_Q, &head); list_for_each_safe(p, q, &head) { |