mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix build fail
This commit is contained in:
parent
2aa94c643c
commit
b7c7d6566f
2 changed files with 11 additions and 7 deletions
|
@ -28,6 +28,10 @@ using namespace std;
|
|||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_kernel_log.hpp>
|
||||
|
||||
#include <srs_protocol_kbps.hpp>
|
||||
|
||||
SrsPps* _srs_pps_timer = new SrsPps(_srs_clock);
|
||||
|
||||
ISrsHourGlass::ISrsHourGlass()
|
||||
{
|
||||
}
|
||||
|
@ -36,8 +40,9 @@ ISrsHourGlass::~ISrsHourGlass()
|
|||
{
|
||||
}
|
||||
|
||||
SrsHourGlass::SrsHourGlass(ISrsHourGlass* h, srs_utime_t resolution)
|
||||
SrsHourGlass::SrsHourGlass(string label, ISrsHourGlass* h, srs_utime_t resolution)
|
||||
{
|
||||
label_ = label;
|
||||
handler = h;
|
||||
_resolution = resolution;
|
||||
total_elapse = 0;
|
||||
|
@ -99,6 +104,8 @@ srs_error_t SrsHourGlass::cycle()
|
|||
srs_utime_t interval = it->second;
|
||||
|
||||
if (interval == 0 || (total_elapse % interval) == 0) {
|
||||
++_srs_pps_timer->sugar;
|
||||
|
||||
if ((err = handler->notify(event, interval, total_elapse)) != srs_success) {
|
||||
return srs_error_wrap(err, "notify");
|
||||
}
|
||||
|
|
|
@ -225,14 +225,11 @@ srs_error_t SrsHybridServer::notify(int event, srs_utime_t interval, srs_utime_t
|
|||
// Resident Set Size: number of pages the process has in real memory.
|
||||
int memory = (int)(u->rss * 4 / 1024);
|
||||
|
||||
_srs_pps_cids_get->update(); _srs_pps_cids_set->update();
|
||||
_srs_pps_timer->update(); _srs_pps_pub->update(); _srs_pps_conn->update(); _srs_pps_dispose->update();
|
||||
_srs_pps_timer->update(); _srs_pps_pub->update(); _srs_pps_conn->update();
|
||||
|
||||
srs_trace("Hybrid cpu=%.2f%%,%dMB, cid=%d,%d, timer=%d,%d,%d, free=%d",
|
||||
srs_trace("Hybrid cpu=%.2f%%,%dMB, timer=%d,%d,%d",
|
||||
u->percent * 100, memory,
|
||||
_srs_pps_cids_get->r10s(), _srs_pps_cids_set->r10s(),
|
||||
_srs_pps_timer->r10s(), _srs_pps_pub->r10s(), _srs_pps_conn->r10s(),
|
||||
_srs_pps_dispose->r10s()
|
||||
_srs_pps_timer->r10s(), _srs_pps_pub->r10s(), _srs_pps_conn->r10s()
|
||||
);
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue