mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Always enable SRS_STAT
This commit is contained in:
parent
71f1ccbf90
commit
8e294709b0
5 changed files with 3 additions and 30 deletions
|
@ -609,11 +609,7 @@ srs_error_t SrsGoApiFeatures::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
|
|||
#else
|
||||
features->set("ingest", SrsJsonAny::boolean(false));
|
||||
#endif
|
||||
#ifdef SRS_AUTO_STAT
|
||||
features->set("stat", SrsJsonAny::boolean(true));
|
||||
#else
|
||||
features->set("stat", SrsJsonAny::boolean(false));
|
||||
#endif
|
||||
#ifdef SRS_AUTO_NGINX
|
||||
features->set("nginx", SrsJsonAny::boolean(true));
|
||||
#else
|
||||
|
|
|
@ -903,7 +903,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
// find the max loop
|
||||
int max = srs_max(0, SRS_SYS_TIME_RESOLUTION_MS_TIMES);
|
||||
|
||||
#ifdef SRS_AUTO_STAT
|
||||
max = srs_max(max, SRS_SYS_RUSAGE_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_CPU_STAT_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_DISK_STAT_RESOLUTION_TIMES);
|
||||
|
@ -911,7 +910,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
max = srs_max(max, SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES);
|
||||
#endif
|
||||
|
||||
// for asprocess.
|
||||
bool asprocess = _srs_config->get_asprocess();
|
||||
|
@ -988,7 +986,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
srs_update_system_time_ms();
|
||||
}
|
||||
|
||||
#ifdef SRS_AUTO_STAT
|
||||
if ((i % SRS_SYS_RUSAGE_RESOLUTION_TIMES) == 0) {
|
||||
srs_info("update resource info, rss.");
|
||||
srs_update_system_rusage();
|
||||
|
@ -1023,7 +1020,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
http_heartbeat->heartbeat();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
srs_info("server main thread loop");
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ void show_macro_features()
|
|||
// inge(ingest)
|
||||
ss << ", inge:" << srs_bool2switch(SRS_AUTO_INGEST_BOOL);
|
||||
ss << ", kafka:" << srs_bool2switch(SRS_AUTO_KAFKA_BOOL);
|
||||
ss << ", stat:" << srs_bool2switch(SRS_AUTO_STAT_BOOL);
|
||||
ss << ", stat:" << srs_bool2switch(true);
|
||||
ss << ", nginx:" << srs_bool2switch(SRS_AUTO_NGINX_BOOL);
|
||||
// ff(ffmpeg)
|
||||
ss << ", ff:" << srs_bool2switch(SRS_AUTO_FFMPEG_TOOL_BOOL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue