summaryrefslogtreecommitdiff
path: root/iowatcher/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'iowatcher/main.c')
-rw-r--r--iowatcher/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/iowatcher/main.c b/iowatcher/main.c
index a419324..694304c 100644
--- a/iowatcher/main.c
+++ b/iowatcher/main.c
@@ -426,17 +426,16 @@ static void read_trace_events(void)
trace = tf->trace;
first_record(trace);
- while (1) {
+ do {
+ if (SECONDS(get_record_time(trace)) > tf->max_seconds)
+ continue;
check_record(trace);
add_tput(trace, tf->tput_writes_gld, tf->tput_reads_gld);
add_iop(trace, tf->iop_gld);
add_io(trace, tf);
add_pending_io(trace, tf->queue_depth_gld);
add_completed_io(trace, tf->latency_gld);
- ret = next_record(trace);
- if (ret)
- break;
- }
+ } while (!(ret = next_record(trace)));
}
list_for_each_entry(tf, &all_traces, list) {
trace = tf->trace;