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

Fix perf api bug

This commit is contained in:
winlin 2020-04-15 10:50:56 +08:00
parent ab53c34945
commit b5f2c842fe

View file

@ -651,6 +651,23 @@ srs_error_t SrsStatistic::dumps_perf_sendmmsg(SrsJsonObject* obj)
return dumps_perf(perf_sendmmsg, obj); return dumps_perf(perf_sendmmsg, obj);
} }
void SrsStatistic::reset_perf()
{
srs_freep(perf_iovs);
srs_freep(perf_msgs);
srs_freep(perf_sendmmsg);
srs_freep(perf_gso);
srs_freep(perf_rtp);
srs_freep(perf_rtc);
perf_iovs = new SrsStatisticCategory();
perf_msgs = new SrsStatisticCategory();
perf_sendmmsg = new SrsStatisticCategory();
perf_gso = new SrsStatisticCategory();
perf_rtp = new SrsStatisticCategory();
perf_rtc = new SrsStatisticCategory();
}
void SrsStatistic::perf_on_packets(SrsStatisticCategory* p, int nb_msgs) void SrsStatistic::perf_on_packets(SrsStatisticCategory* p, int nb_msgs)
{ {
// The range for stat: // The range for stat: