Skip to content

Commit

Permalink
Fix perf api bug
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Apr 15, 2020
1 parent ab53c34 commit b5f2c84
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions trunk/src/app/srs_app_statistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b5f2c84

Please sign in to comment.