|
|
lucid
0.0.1
Lifting-based Uncertain Control Invariant Dynamics
|
Collection of metric measuring functions. More...
Enumerations | |
| enum class | MemoryUnit { B , KB , MB , GB } |
| Memory units for conversion. More... | |
| enum class | TimeUnit { MS , S , M , H , D } |
| Time units for conversion. More... | |
Functions | |
| size_t | get_current_rss () |
| Get the current Resident Set Size (RSS) in bytes. | |
| size_t | get_peak_rss () |
| Get the peak Resident Set Size (RSS) in bytes. | |
| double | bytes_to (std::size_t size_in_bytes, MemoryUnit unit) |
| Convert a size in bytes to the specified memory unit. | |
| MemoryUnit | get_suggested_memory_unit (std::size_t size_in_bytes) |
| Suggest the most appropriate memory unit for a given size in bytes. | |
| double | time_to (double duration_in_seconds, TimeUnit unit) |
| Convert a duration in seconds to the specified time unit. | |
| TimeUnit | get_suggested_time_unit (double duration_in_seconds) |
| Suggest the most appropriate time unit for a given duration in seconds. | |
| template<MemoryUnit U> | |
| double | bytes_to (const std::size_t size_in_bytes) |
| Convert a size in bytes to the specified memory unit. | |
| template<TimeUnit U> | |
| double | time_to (const double duration_in_seconds) |
| Convert a duration in seconds to the specified time unit. | |
Collection of metric measuring functions.
|
strong |
|
strong |
| double lucid::metrics::bytes_to | ( | const std::size_t | size_in_bytes | ) |
Convert a size in bytes to the specified memory unit.
| U | memory unit to convert to |
| size_in_bytes | size in bytes |
| double lucid::metrics::bytes_to | ( | std::size_t | size_in_bytes, |
| MemoryUnit | unit ) |
Convert a size in bytes to the specified memory unit.
| unit | memory unit to convert to |
| size_in_bytes | size in bytes |
| std::size_t lucid::metrics::get_current_rss | ( | ) |
Get the current Resident Set Size (RSS) in bytes.
This is the portion of memory occupied by a process that is held in RAM.
| std::size_t lucid::metrics::get_peak_rss | ( | ) |
Get the peak Resident Set Size (RSS) in bytes.
This is the maximum portion of memory occupied by a process that was held in RAM at any point in time.
| MemoryUnit lucid::metrics::get_suggested_memory_unit | ( | std::size_t | size_in_bytes | ) |
Suggest the most appropriate memory unit for a given size in bytes.
The function selects the largest memory unit such that the converted size is at least 1 and less than 1024, provided the size is in the range of known memory units.
| size_in_bytes | size in bytes |
| TimeUnit lucid::metrics::get_suggested_time_unit | ( | double | duration_in_seconds | ) |
Suggest the most appropriate time unit for a given duration in seconds.
The function selects the largest time unit such that the converted duration is around 1 and less than the next larger unit, provided the duration in the range of known time units.
| duration_in_seconds | duration in seconds |
| double lucid::metrics::time_to | ( | const double | duration_in_seconds | ) |
Convert a duration in seconds to the specified time unit.
| U | time unit to convert to |
| duration_in_seconds | duration in seconds |
| double lucid::metrics::time_to | ( | double | duration_in_seconds, |
| TimeUnit | unit ) |
Convert a duration in seconds to the specified time unit.
| duration_in_seconds | duration in seconds |
| unit | time unit to convert to |