open_iA 2021.08
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Classes | Functions
iAPerformanceHelper.h File Reference
#include "iAguibase_export.h"
#include <chrono>
#include <string>

Classes

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. More...
 
class  iATimeGuard
 Simple performance helper class following RAII principle: Instantiate to start timer, destroy to stop timer prints to debug console. More...
 

Functions

iAguibase_API QString formatDuration (double duration, bool showMS=true, bool shortNames=false)
 Format the given time in a human-readable format. More...
 
size_t getCurrentRSS ()
 Helper method for getting the current memory usage. More...
 

Function Documentation

◆ formatDuration()

iAguibase_API QString formatDuration ( double  duration,
bool  showMS = true,
bool  shortNames = false 
)

Format the given time in a human-readable format.

Parameters
durationthe time to format (in seconds)
showMSwhether to show the milliseconds part
shortNamesif true, use short time span names (s, m, h, d), otherwise (default), use long names (second, minute, hour, day)

◆ getCurrentRSS()

size_t 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.