mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add network bytes to api summaries. 0.9.125
This commit is contained in:
parent
8822bface3
commit
d0b08d0d51
6 changed files with 151 additions and 3 deletions
|
@ -78,6 +78,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// SRS_SYS_CYCLE_INTERVAL * SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES
|
||||
#define SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES 90
|
||||
|
||||
// update network devices info interval:
|
||||
// SRS_SYS_CYCLE_INTERVAL * SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES
|
||||
#define SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES 90
|
||||
|
||||
SrsListener::SrsListener(SrsServer* server, SrsListenerType type)
|
||||
{
|
||||
fd = -1;
|
||||
|
@ -646,6 +650,7 @@ int SrsServer::do_cycle()
|
|||
max = srs_max(max, SRS_SYS_CPU_STAT_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_MEMINFO_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES);
|
||||
|
||||
// the deamon thread, update the time cache
|
||||
while (true) {
|
||||
|
@ -656,7 +661,7 @@ int SrsServer::do_cycle()
|
|||
int __max = max;
|
||||
__max = srs_max(__max, heartbeat_max_resolution);
|
||||
|
||||
for (int i = 1; i < __max + 1; i++) {
|
||||
for (int i = 0; i < __max; i++) {
|
||||
st_usleep(SRS_SYS_CYCLE_INTERVAL * 1000);
|
||||
|
||||
// for gperf heap checker,
|
||||
|
@ -698,6 +703,9 @@ int SrsServer::do_cycle()
|
|||
if ((i % SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES) == 0) {
|
||||
srs_update_platform_info();
|
||||
}
|
||||
if ((i % SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES) == 0) {
|
||||
srs_update_network_devices();
|
||||
}
|
||||
#ifdef SRS_AUTO_HTTP_PARSER
|
||||
if (_srs_config->get_heartbeat_enabled()) {
|
||||
if ((i % heartbeat_max_resolution) == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue