1
0
Fork 0
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:
winlin 2014-07-28 13:51:54 +08:00
parent c16d3585a5
commit 792a6f944f

View file

@ -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;