#include "iAguibase_export.h"
#include <string>
|
| class | iAPerformanceHelper |
| | Class for debug output about start and end of an operation call start() to print start message call stop() to print stop message + time call time() in between to show lap times all optionally including memory usage. More...
|
| |
| class | iAPerformanceTimer |
| | Class for simple performance measurements. More...
|
| |
| class | iATimeAdder |
| | class for adding up intervals of time one example use case is if you have a long running procedure with many steps, but only want to measure the contribution of some of the steps; e.g.: do { operationsToMeasure (...) ... some other operations ... } Then you would write: iATimeAdder timer; do { timer.resume(); operationsToMeasure (...) timer.pause(); ... some other operations ... } std::cout << "Elapsed: " << timer.elapsed() << " seconds"; More...
|
| |
| class | iATimeGuard |
| | Simple performance helper class following RAII principle: Instantiate to start timer, destroy to stop timer prints to debug console. More...
|
| |
|
| iAguibase_API QString | formatDuration (double duration, bool showMS=true, bool shortNames=false) |
| | Format the given time in a human-readable format.
|
| |
| size_t | getCurrentRSS () |
| | Helper method for getting the current memory usage.
|
| |
◆ formatDuration()
| iAguibase_API QString formatDuration |
( |
double |
duration, |
|
|
bool |
showMS = true, |
|
|
bool |
shortNames = false |
|
) |
| |
Format the given time in a human-readable format.
- Parameters
-
| duration | the time to format (in seconds) |
| showMS | whether to show the milliseconds part |
| shortNames | if true, use short time span names (s, m, h, d), otherwise (default), use long names (second, minute, hour, day) |
◆ getCurrentRSS()
Helper method for getting the current memory usage.
- Returns
- the number of bytes currently in use by the application
Helper method for getting the current memory usage.