mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '1.0release'
This commit is contained in:
commit
99ce283aad
3 changed files with 9 additions and 10 deletions
|
@ -387,6 +387,7 @@ Supported operating systems and hardware:
|
||||||
|
|
||||||
## History
|
## History
|
||||||
|
|
||||||
|
* v1.0, 2015-05-22, fix [#397](https://github.com/simple-rtmp-server/srs/issues/397) the USER_HZ maybe not 100. 1.0.32
|
||||||
* v1.0, 2015-03-26, fix hls aac adts bug, in aac mux. 1.0.31.
|
* v1.0, 2015-03-26, fix hls aac adts bug, in aac mux. 1.0.31.
|
||||||
* <strong>v1.0, 2015-03-19, [1.0r3 release(1.0.30)](https://github.com/simple-rtmp-server/srs/releases/tag/1.0r3) released. 59511 lines.</strong>
|
* <strong>v1.0, 2015-03-19, [1.0r3 release(1.0.30)](https://github.com/simple-rtmp-server/srs/releases/tag/1.0r3) released. 59511 lines.</strong>
|
||||||
* v1.0, 2015-03-17, remove the osx for 1.0.30.
|
* v1.0, 2015-03-17, remove the osx for 1.0.30.
|
||||||
|
|
|
@ -292,15 +292,13 @@ bool get_proc_self_stat(SrsProcSelfStat& r)
|
||||||
|
|
||||||
void srs_update_proc_stat()
|
void srs_update_proc_stat()
|
||||||
{
|
{
|
||||||
// always assert the USER_HZ is 1/100ths
|
|
||||||
// @see: http://stackoverflow.com/questions/7298646/calculating-user-nice-sys-idle-iowait-irq-and-sirq-from-proc-stat/7298711
|
// @see: http://stackoverflow.com/questions/7298646/calculating-user-nice-sys-idle-iowait-irq-and-sirq-from-proc-stat/7298711
|
||||||
static bool user_hz_assert = false;
|
// @see https://github.com/simple-rtmp-server/srs/issues/397
|
||||||
if (!user_hz_assert) {
|
static int user_hz = 0;
|
||||||
user_hz_assert = true;
|
if (user_hz <= 0) {
|
||||||
|
user_hz = sysconf(_SC_CLK_TCK);
|
||||||
int USER_HZ = sysconf(_SC_CLK_TCK);
|
srs_trace("USER_HZ=%d", user_hz);
|
||||||
srs_trace("USER_HZ=%d", USER_HZ);
|
srs_assert(user_hz > 0);
|
||||||
srs_assert(USER_HZ == 100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// system cpu stat
|
// system cpu stat
|
||||||
|
@ -345,7 +343,7 @@ void srs_update_proc_stat()
|
||||||
int64_t total = r.sample_time - o.sample_time;
|
int64_t total = r.sample_time - o.sample_time;
|
||||||
int64_t usage = (r.utime + r.stime) - (o.utime + o.stime);
|
int64_t usage = (r.utime + r.stime) - (o.utime + o.stime);
|
||||||
if (total > 0) {
|
if (total > 0) {
|
||||||
r.percent = (float)(usage * 1000 / (double)total / 100);
|
r.percent = (float)(usage * 1000 / (double)total / user_hz);
|
||||||
}
|
}
|
||||||
|
|
||||||
// upate cache.
|
// upate cache.
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 31
|
#define VERSION_REVISION 32
|
||||||
|
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue