summaryrefslogtreecommitdiff
path: root/btt
diff options
context:
space:
mode:
authorAlan D. Brunelle <alan.brunelle@hp.com>2008-10-10 08:40:57 -0400
committerAlan D. Brunelle <alan.brunelle@hp.com>2008-10-10 08:40:57 -0400
commitabf63eafd11e42e0f065e56fc4773e6854087d41 (patch)
treee5f77594c1a1eb5c0fee6d391d05f7ccfe3477a1 /btt
parent129babbbb691f87ba66101f0df7ccf463e2e56a6 (diff)
downloadblktrace-abf63eafd11e42e0f065e56fc4773e6854087d41.tar.gz
blktrace-abf63eafd11e42e0f065e56fc4773e6854087d41.tar.bz2
Removed excessive amounts of seek modes (for random sets of I/Os)
When doing a random load, we'd get a LARGE amount of single-seek buckets, this patch just notes that fact, without dumping all the data...
Diffstat (limited to 'btt')
-rw-r--r--btt/output.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/btt/output.c b/btt/output.c
index 3076412..00ffce5 100644
--- a/btt/output.c
+++ b/btt/output.c
@@ -351,8 +351,12 @@ void output_seek_mode_info(FILE *ofp, struct o_seek_info *sip)
"Average", sip->nseeks, sip->mean / sip->nseeks,
sip->median / sip->nseeks, new_list->mode, new_list->nseeks);
- for (p = new_list->next; p != NULL; p = p->next)
- fprintf(ofp, " %lld(%d)", p->mode, p->nseeks);
+ if (new_list->next) {
+ int i = 0;
+ for (p = new_list->next; p != NULL; p = p->next)
+ i++;
+ fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", i);
+ }
}
void add_seek_mode_info(struct o_seek_info *sip, struct mode *mp)
@@ -401,9 +405,13 @@ static void do_output_dip_seek_info(struct d_info *dip, FILE *ofp, int is_q2q)
fprintf(ofp, "%10s | %15lld %15.1lf %15lld | %lld(%d)",
make_dev_hdr(dev_info, 15, dip, 1), nseeks, mean,
median, nmodes > 0 ? m.modes[0] : 0, m.most_seeks);
- for (i = 1; i < nmodes; i++)
- fprintf(ofp, " %lld", m.modes[i]);
- fprintf(ofp, "\n");
+ if (nmodes > 2)
+ fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", nmodes-1);
+ else {
+ for (i = 1; i < nmodes; i++)
+ fprintf(ofp, " %lld", m.modes[i]);
+ fprintf(ofp, "\n");
+ }
if (easy_parse_avgs) {
char *rec = is_q2q ? "QSK" : "DSK";