projects
/
can-benchmark.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d160440
)
Gather some statistics
author
Michal Sojka
<sojkam1@fel.cvut.cz>
Fri, 3 Dec 2010 17:15:18 +0000
(18:15 +0100)
committer
Michal Sojka
<sojkam1@fel.cvut.cz>
Fri, 3 Dec 2010 17:15:18 +0000
(18:15 +0100)
latester/latester.c
patch
|
blob
|
history
diff --git
a/latester/latester.c
b/latester/latester.c
index
f57de3a
..
d178e1e
100644
(file)
--- 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__); \