summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-05-11 10:36:40 +0000
committerBenny Prijono <bennylp@teluu.com>2007-05-11 10:36:40 +0000
commitc7b1c88b23e55ca897ebacfdeabb9c17c4cd8f34 (patch)
tree0958ceb96696aae83c8b86668162c660b0d0ff3f
parente9237554f3341a370bc37582f72f652c05c591a2 (diff)
Added IP bandwidth output in pjsua dq report
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1264 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 47dbaa72..0f4f470b 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -1632,7 +1632,7 @@ static void dump_media_session(const char *indent,
int rem_port;
const char *dir;
char last_update[64];
- char packets[32], bytes[32], ipbytes[32], avg_bps[32];
+ char packets[32], bytes[32], ipbytes[32], avg_bps[32], avg_ipbps[32];
pj_time_val media_duration, now;
pjmedia_session_get_stream_stat(session, i, &stat);
@@ -1685,7 +1685,7 @@ static void dump_media_session(const char *indent,
len = pj_ansi_snprintf(p, end-p,
"%s RX pt=%d, stat last update: %s\n"
- "%s total %spkt %sB (%sB +IP hdr) @avg=%sbps\n"
+ "%s total %spkt %sB (%sB +IP hdr) @avg=%sbps/%sbps\n"
"%s pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)\n"
"%s (msec) min avg max last\n"
"%s loss period: %7.3f %7.3f %7.3f %7.3f\n"
@@ -1695,8 +1695,9 @@ static void dump_media_session(const char *indent,
indent,
good_number(packets, stat.rx.pkt),
good_number(bytes, stat.rx.bytes),
- good_number(ipbytes, stat.rx.bytes + stat.rx.pkt * 32),
+ good_number(ipbytes, stat.rx.bytes + stat.rx.pkt * 40),
good_number(avg_bps, stat.rx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)),
+ good_number(avg_ipbps, (stat.rx.bytes + stat.rx.pkt * 40) * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)),
indent,
stat.rx.loss,
stat.rx.loss * 100.0 / (stat.rx.pkt + stat.rx.loss),
@@ -1740,7 +1741,7 @@ static void dump_media_session(const char *indent,
len = pj_ansi_snprintf(p, end-p,
"%s TX pt=%d, ptime=%dms, stat last update: %s\n"
- "%s total %spkt %sB (%sB +IP hdr) @avg %sbps\n"
+ "%s total %spkt %sB (%sB +IP hdr) @avg %sbps/%sbps\n"
"%s pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)\n"
"%s (msec) min avg max last\n"
"%s loss period: %7.3f %7.3f %7.3f %7.3f\n"
@@ -1754,8 +1755,9 @@ static void dump_media_session(const char *indent,
indent,
good_number(packets, stat.tx.pkt),
good_number(bytes, stat.tx.bytes),
- good_number(ipbytes, stat.tx.bytes + stat.tx.pkt * 32),
+ good_number(ipbytes, stat.tx.bytes + stat.tx.pkt * 40),
good_number(avg_bps, stat.tx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)),
+ good_number(avg_ipbps, (stat.tx.bytes + stat.tx.pkt * 40) * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)),
indent,
stat.tx.loss,