Home
last modified time | relevance | path

Searched refs:cp_times (Results 1 – 2 of 2) sorted by relevance

/libuv/src/unix/
H A Dnetbsd.c190 u_int64_t* cp_times; in uv_cpu_info() local
213 size = numcpus * CPUSTATES * sizeof(*cp_times); in uv_cpu_info()
214 cp_times = uv__malloc(size); in uv_cpu_info()
215 if (cp_times == NULL) in uv_cpu_info()
218 if (sysctlbyname("kern.cp_time", cp_times, &size, NULL, 0)) in uv_cpu_info()
223 uv__free(cp_times); in uv_cpu_info()
230 cpu_info->cpu_times.user = (uint64_t)(cp_times[CP_USER+cur]) * multiplier; in uv_cpu_info()
231 cpu_info->cpu_times.nice = (uint64_t)(cp_times[CP_NICE+cur]) * multiplier; in uv_cpu_info()
232 cpu_info->cpu_times.sys = (uint64_t)(cp_times[CP_SYS+cur]) * multiplier; in uv_cpu_info()
234 cpu_info->cpu_times.irq = (uint64_t)(cp_times[CP_INTR+cur]) * multiplier; in uv_cpu_info()
[all …]
H A Dfreebsd.c191 long* cp_times; in uv_cpu_info() local
245 cp_times = uv__malloc(size); in uv_cpu_info()
246 if (cp_times == NULL) { in uv_cpu_info()
251 if (sysctlbyname(cptimes_key, cp_times, &size, NULL, 0)) { in uv_cpu_info()
252 uv__free(cp_times); in uv_cpu_info()
260 cpu_info->cpu_times.user = (uint64_t)(cp_times[CP_USER+cur]) * multiplier; in uv_cpu_info()
261 cpu_info->cpu_times.nice = (uint64_t)(cp_times[CP_NICE+cur]) * multiplier; in uv_cpu_info()
262 cpu_info->cpu_times.sys = (uint64_t)(cp_times[CP_SYS+cur]) * multiplier; in uv_cpu_info()
263 cpu_info->cpu_times.idle = (uint64_t)(cp_times[CP_IDLE+cur]) * multiplier; in uv_cpu_info()
264 cpu_info->cpu_times.irq = (uint64_t)(cp_times[CP_INTR+cur]) * multiplier; in uv_cpu_info()
[all …]

Completed in 10 milliseconds