mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine utility of cpu, add comment for cpu percent
This commit is contained in:
parent
c16d3585a5
commit
792a6f944f
1 changed files with 1 additions and 0 deletions
|
@ -525,6 +525,7 @@ void srs_update_disk_stat()
|
||||||
&& o.ticks < r.ticks
|
&& o.ticks < r.ticks
|
||||||
) {
|
) {
|
||||||
// @see: print_partition_stats() of iostat.c
|
// @see: print_partition_stats() of iostat.c
|
||||||
|
// TODO: FIXME: the USER_HZ assert to 100, so the total_delta ticks *10 is ms.
|
||||||
double delta_ms = r.cpu.total_delta * 10 / cpuinfo->nb_processors;
|
double delta_ms = r.cpu.total_delta * 10 / cpuinfo->nb_processors;
|
||||||
unsigned int ticks = r.ticks - o.ticks;
|
unsigned int ticks = r.ticks - o.ticks;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue