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:
parent
ab53c34945
commit
b5f2c842fe
1 changed files with 17 additions and 0 deletions
|
@ -651,6 +651,23 @@ srs_error_t SrsStatistic::dumps_perf_sendmmsg(SrsJsonObject* 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)
|
||||
{
|
||||
// The range for stat:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue