summaryrefslogtreecommitdiff
path: root/verify_blkparse.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-10-09 12:35:49 +0200
committerJens Axboe <axboe@suse.de>2005-10-09 12:35:49 +0200
commitfd8a68ba0cd00775f3a22d6dd422962353de52a4 (patch)
tree98ce13ff7129c009dbbab037f60ac02666e22ff5 /verify_blkparse.c
parent774a1a10d24094d233175f2aa41fdff4bcf21be9 (diff)
downloadblktrace-fd8a68ba0cd00775f3a22d6dd422962353de52a4.tar.gz
blktrace-fd8a68ba0cd00775f3a22d6dd422962353de52a4.tar.bz2
[PATCH[ verify_blkparse: dump number of events scanned
Diffstat (limited to 'verify_blkparse.c')
-rw-r--r--verify_blkparse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/verify_blkparse.c b/verify_blkparse.c
index 01e0674..2c39b6b 100644
--- a/verify_blkparse.c
+++ b/verify_blkparse.c
@@ -8,6 +8,7 @@ int main(int argc, char *argv[])
double this_time, last_time;
char line[256], *p;
int major, minor, cpu, seq, nr, alias, last_seq;
+ unsigned long long total_entries;
FILE *f;
if (argc < 2) {
@@ -23,6 +24,7 @@ int main(int argc, char *argv[])
last_time = 0;
last_seq = alias = nr = 0;
+ total_entries = 0;
while ((p = fgets(line, sizeof(line), f)) != NULL) {
if (sscanf(p, "%3d,%3d %2d %8d %lf", &major, &minor, &cpu, &seq, &this_time) != 5)
break;
@@ -39,9 +41,10 @@ int main(int argc, char *argv[])
}
last_seq = seq;
+ total_entries++;
}
- fprintf(stdout, "%d unordered events, %d aliases\n", nr, alias);
+ fprintf(stdout, "Events %Lu: %d unordered, %d aliases\n", total_entries, nr, alias);
fclose(f);
return nr != 0;