1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine kbps, provides 30s,1m,5m,60m kbps. 0.9.97

This commit is contained in:
winlin 2014-05-14 13:56:12 +08:00
parent 830f0b5eb6
commit b175821b62
6 changed files with 188 additions and 21 deletions

View file

@ -172,9 +172,12 @@ int SrsEdgeIngester::ingest()
// pithy print
if (pithy_print.can_print()) {
kbps->sample();
srs_trace("<- "SRS_LOG_ID_EDGE_PLAY
" time=%"PRId64", okbps=%d, ikbps=%d",
pithy_print.age(), kbps->get_send_kbps(), kbps->get_recv_kbps());
" time=%"PRId64", okbps=%d,%d,%d, ikbps=%d,%d,%d",
pithy_print.age(),
kbps->get_send_kbps(), kbps->get_send_kbps_sample_high(), kbps->get_send_kbps_sample_medium(),
kbps->get_recv_kbps(), kbps->get_recv_kbps_sample_high(), kbps->get_recv_kbps_sample_medium());
}
// read from client.
@ -464,9 +467,12 @@ int SrsEdgeForwarder::cycle()
// pithy print
if (pithy_print.can_print()) {
kbps->sample();
srs_trace("-> "SRS_LOG_ID_EDGE_PUBLISH
" time=%"PRId64", msgs=%d, okbps=%d, ikbps=%d",
pithy_print.age(), count, kbps->get_send_kbps(), kbps->get_recv_kbps());
" time=%"PRId64", msgs=%d, okbps=%d,%d,%d, ikbps=%d,%d,%d",
pithy_print.age(), count,
kbps->get_send_kbps(), kbps->get_send_kbps_sample_high(), kbps->get_send_kbps_sample_medium(),
kbps->get_recv_kbps(), kbps->get_recv_kbps_sample_high(), kbps->get_recv_kbps_sample_medium());
}
// ignore when no messages.