open_iA 2023.02
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Loading...
Searching...
No Matches
Classes | Functions
iAPerformanceHelper.cpp File Reference
#include "iAPerformanceHelper.h"
#include "iALog.h"
#include <QString>
#include <chrono>

Classes

class  iAPerfHelperImpl
 
class  iAPerfTimerImpl
 

Functions

QString formatDuration (double duration, bool showMS, bool shortNames)
 Format the given time in a human-readable format.
 
QString formatWithCaption (long part, QString const &caption, QString const &shortCap, bool useShort)
 
size_t getCurrentRSS ()
 Returns the current resident set size (physical memory use) measured in bytes, or zero if the value cannot be determined on this OS.
 

Function Documentation

◆ formatDuration()

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)

◆ formatWithCaption()

QString formatWithCaption ( long  part,
QString const &  caption,
QString const &  shortCap,
bool  useShort 
)

◆ getCurrentRSS()

size_t getCurrentRSS ( )

Returns the current resident set size (physical memory use) measured in bytes, or zero if the value cannot be determined on this OS.

Helper method for getting the current memory usage.