Added IP bandwidth output in pjsua dq report
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1264 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
2adfe29558
commit
427af7d94a
1 changed files with 7 additions and 5 deletions
|
@ -1632,7 +1632,7 @@ static void dump_media_session(const char *indent,
|
||||||
int rem_port;
|
int rem_port;
|
||||||
const char *dir;
|
const char *dir;
|
||||||
char last_update[64];
|
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;
|
pj_time_val media_duration, now;
|
||||||
|
|
||||||
pjmedia_session_get_stream_stat(session, i, &stat);
|
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,
|
len = pj_ansi_snprintf(p, end-p,
|
||||||
"%s RX pt=%d, stat last update: %s\n"
|
"%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 pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)\n"
|
||||||
"%s (msec) min avg max last\n"
|
"%s (msec) min avg max last\n"
|
||||||
"%s loss period: %7.3f %7.3f %7.3f %7.3f\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,
|
indent,
|
||||||
good_number(packets, stat.rx.pkt),
|
good_number(packets, stat.rx.pkt),
|
||||||
good_number(bytes, stat.rx.bytes),
|
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_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,
|
indent,
|
||||||
stat.rx.loss,
|
stat.rx.loss,
|
||||||
stat.rx.loss * 100.0 / (stat.rx.pkt + 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,
|
len = pj_ansi_snprintf(p, end-p,
|
||||||
"%s TX pt=%d, ptime=%dms, stat last update: %s\n"
|
"%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 pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)\n"
|
||||||
"%s (msec) min avg max last\n"
|
"%s (msec) min avg max last\n"
|
||||||
"%s loss period: %7.3f %7.3f %7.3f %7.3f\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,
|
indent,
|
||||||
good_number(packets, stat.tx.pkt),
|
good_number(packets, stat.tx.pkt),
|
||||||
good_number(bytes, stat.tx.bytes),
|
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_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,
|
indent,
|
||||||
stat.tx.loss,
|
stat.tx.loss,
|
||||||
|
|
Loading…
Reference in a new issue