From: Michal Sojka Date: Fri, 3 Dec 2010 17:15:18 +0000 (+0100) Subject: Gather some statistics X-Git-Tag: fix-allnoconfig~268 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/37e17a5510486edb969a606c05c2c88f8c289a88?hp=d160440e6b0b21e25f6212f0cddf0e03883659b9 Gather some statistics --- diff --git a/latester/latester.c b/latester/latester.c index f57de3a..d178e1e 100644 --- a/latester/latester.c +++ b/latester/latester.c @@ -72,6 +72,10 @@ struct options opt = { .length = 2, }; +struct { + unsigned enobufs; +} stats; + int num_interfaces = 0; int count = 0; /* Number of sent messages */ int completion_pipe[2]; @@ -539,6 +543,7 @@ void *measure_thread(void *arg) ret = send_frame(pfd[0].fd); \ if (ret != sizeof(struct can_frame)) { \ if (ret == -1 && errno == ENOBUFS && opt.period_us == 0 && !opt.oneattime) { \ + stats.enobufs++; \ /* Ignore this error - pfifo_fast qeuue is full */ \ } else \ error(1, errno, "send_frame (line %d)", __LINE__); \