chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
92dcf83
)
Compute rate over a longer interval.
author
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 11 Apr 2009 15:46:27 +0000
(16:46 +0100)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Sat, 11 Apr 2009 15:46:27 +0000
(16:46 +0100)
clients/rtpmon.c
patch
|
blob
|
blame
|
history
diff --git
a/clients/rtpmon.c
b/clients/rtpmon.c
index cf83328e0e1a76a1157f9ccda1af9632db95ee07..070d21c0077a56ebc9a17b864b86761af14027a6 100644
(file)
--- a/
clients/rtpmon.c
+++ b/
clients/rtpmon.c
@@
-61,7
+61,7
@@
static unsigned bpf = 4;
static uint32_t serial;
/** @brief Size of ring buffer */
static uint32_t serial;
/** @brief Size of ring buffer */
-#define RINGSIZE 1
6384
+#define RINGSIZE 1
31072
/** @brief Ring buffer */
static struct entry ring[RINGSIZE];
/** @brief Ring buffer */
static struct entry ring[RINGSIZE];
@@
-112,7
+112,15
@@
static void frames(const struct timeval *when, size_t n) {
ringtail = (ringtail + 1) % RINGSIZE;
// Report once a second
if(prev != when->tv_sec) {
ringtail = (ringtail + 1) % RINGSIZE;
// Report once a second
if(prev != when->tv_sec) {
- if(printf("%8.2f %8.2f %8.2f\n",
+ if(printf("%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n",
+ rate((ringtail - RINGSIZE / 128) % RINGSIZE,
+ (ringtail - 1) % RINGSIZE),
+ rate((ringtail - RINGSIZE / 64) % RINGSIZE,
+ (ringtail - 1) % RINGSIZE),
+ rate((ringtail - RINGSIZE / 32) % RINGSIZE,
+ (ringtail - 1) % RINGSIZE),
+ rate((ringtail - RINGSIZE / 16) % RINGSIZE,
+ (ringtail - 1) % RINGSIZE),
rate((ringtail - RINGSIZE / 8) % RINGSIZE,
(ringtail - 1) % RINGSIZE),
rate((ringtail - RINGSIZE / 4) % RINGSIZE,
rate((ringtail - RINGSIZE / 8) % RINGSIZE,
(ringtail - 1) % RINGSIZE),
rate((ringtail - RINGSIZE / 4) % RINGSIZE,