LLFIO v2.00
Loading...
Searching...
No Matches
llfio_v2_xxx::utils::process_cpu_usage Struct Reference

CPU usage statistics for a process. More...

#include "utils.hpp"

Public Member Functions

process_cpu_usage operator- (const process_cpu_usage &o) const noexcept
 Subtracts an earlier result from a later result.
 
process_cpu_usageoperator-= (const process_cpu_usage &o) noexcept
 Subtracts an earlier result from a later result.
 

Public Attributes

uint64_t system_ns_in_user_mode {0}
 The amount of nanoseconds all processes ever have spent in user mode.
 
uint64_t system_ns_in_kernel_mode {0}
 The amount of nanoseconds all processes ever have spent in kernel mode.
 
uint64_t system_ns_in_idle_mode {0}
 The amount of nanoseconds all processes ever have spent in idle mode.
 
uint64_t process_ns_in_user_mode {0}
 The amount of nanoseconds this process has spent in user mode.
 
uint64_t process_ns_in_kernel_mode {0}
 The amount of nanoseconds this process has spent in kernel mode.
 

Detailed Description

CPU usage statistics for a process.

Member Function Documentation

◆ operator-()

process_cpu_usage llfio_v2_xxx::utils::process_cpu_usage::operator- ( const process_cpu_usage o) const
inlinenoexcept

Subtracts an earlier result from a later result.

293 {
294 return {system_ns_in_user_mode - o.system_ns_in_user_mode, system_ns_in_kernel_mode - o.system_ns_in_kernel_mode,
295 system_ns_in_idle_mode - o.system_ns_in_idle_mode, process_ns_in_user_mode - o.process_ns_in_user_mode,
296 process_ns_in_kernel_mode - o.process_ns_in_kernel_mode};
297 }
uint64_t system_ns_in_idle_mode
The amount of nanoseconds all processes ever have spent in idle mode.
Definition utils.hpp:284
uint64_t process_ns_in_user_mode
The amount of nanoseconds this process has spent in user mode.
Definition utils.hpp:287
uint64_t system_ns_in_kernel_mode
The amount of nanoseconds all processes ever have spent in kernel mode.
Definition utils.hpp:282
uint64_t process_ns_in_kernel_mode
The amount of nanoseconds this process has spent in kernel mode.
Definition utils.hpp:289
uint64_t system_ns_in_user_mode
The amount of nanoseconds all processes ever have spent in user mode.
Definition utils.hpp:280

◆ operator-=()

process_cpu_usage & llfio_v2_xxx::utils::process_cpu_usage::operator-= ( const process_cpu_usage o)
inlinenoexcept

Subtracts an earlier result from a later result.

300 {
301 system_ns_in_user_mode -= o.system_ns_in_user_mode;
302 system_ns_in_kernel_mode -= o.system_ns_in_kernel_mode;
303 system_ns_in_idle_mode -= o.system_ns_in_idle_mode;
304 process_ns_in_user_mode -= o.process_ns_in_user_mode;
305 process_ns_in_kernel_mode -= o.process_ns_in_kernel_mode;
306 return *this;
307 }

Member Data Documentation

◆ process_ns_in_kernel_mode

uint64_t llfio_v2_xxx::utils::process_cpu_usage::process_ns_in_kernel_mode {0}

The amount of nanoseconds this process has spent in kernel mode.

289{0};

◆ process_ns_in_user_mode

uint64_t llfio_v2_xxx::utils::process_cpu_usage::process_ns_in_user_mode {0}

The amount of nanoseconds this process has spent in user mode.

287{0};

◆ system_ns_in_idle_mode

uint64_t llfio_v2_xxx::utils::process_cpu_usage::system_ns_in_idle_mode {0}

The amount of nanoseconds all processes ever have spent in idle mode.

284{0};

◆ system_ns_in_kernel_mode

uint64_t llfio_v2_xxx::utils::process_cpu_usage::system_ns_in_kernel_mode {0}

The amount of nanoseconds all processes ever have spent in kernel mode.

282{0};

◆ system_ns_in_user_mode

uint64_t llfio_v2_xxx::utils::process_cpu_usage::system_ns_in_user_mode {0}

The amount of nanoseconds all processes ever have spent in user mode.

280{0};

The documentation for this struct was generated from the following file: