open_iA 2025.6
Loading...
Searching...
No Matches
iAPerformanceHelper.cpp File Reference
#include "iAPerformanceHelper.h"
#include "iALog.h"
#include <QString>
#include <chrono>

Classes

class  iAPerfHelperImpl
 internal data encapsulation class for iAPerformanceHelper (PIMPL idiom). More...
 
class  iAPerfTimerImpl
 internal data encapsulation class for iAPerformanceTimer (PIMPL idiom). More...
 

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.