coastline 0.0.4
Loading...
Searching...
No Matches
coastline::PerformanceStats Class Reference

Frame timings and system statistics, with memory and GPU sampling on a separate thread. More...

#include <performance.h>

Public Member Functions

 PerformanceStats (std::string gpuName, bool allowNvml)
 Sample the active adapter only when its identity permits NVML.
 ~PerformanceStats ()
 Stop sampling and release provider resources before destruction completes.
 PerformanceStats (const PerformanceStats &)=delete
 Prevent copying the collector's GPU sampling thread.
PerformanceStats & operator= (const PerformanceStats &)=delete
 Prevent assignment of the collector's GPU sampling thread.
void Frame (std::uint64_t workNanoseconds)
 Record frame work and elapsed frame intervals, and sample once a second has passed.
std::vector< std::string > Lines (std::uint64_t gameGpuBytes) const

Detailed Description

Frame timings and system statistics, with memory and GPU sampling on a separate thread.

Constructor & Destructor Documentation

◆ PerformanceStats() [1/2]

coastline::PerformanceStats::PerformanceStats ( std::string gpuName,
bool allowNvml )

Sample the active adapter only when its identity permits NVML.

Parameters
gpuNameThe active adapter identifier for an exact NVML device match.
allowNvmlWhether the renderer permits NVML for the active adapter.

◆ ~PerformanceStats()

coastline::PerformanceStats::~PerformanceStats ( )

Stop sampling and release provider resources before destruction completes.

◆ PerformanceStats() [2/2]

coastline::PerformanceStats::PerformanceStats ( const PerformanceStats & )
delete

Prevent copying the collector's GPU sampling thread.

Member Function Documentation

◆ operator=()

PerformanceStats & coastline::PerformanceStats::operator= ( const PerformanceStats & )
delete

Prevent assignment of the collector's GPU sampling thread.

◆ Frame()

void coastline::PerformanceStats::Frame ( std::uint64_t workNanoseconds)

Record frame work and elapsed frame intervals, and sample once a second has passed.

Parameters
workNanosecondsCPU-side frame time excluding presentation waits and software pacing.

◆ Lines()

std::vector< std::string > coastline::PerformanceStats::Lines ( std::uint64_t gameGpuBytes) const
Parameters
gameGpuBytesThe bytes of the textures and buffers the game has created.
Returns
The lines of the overlay in capitals, with PCT for a percent sign, each statistic omitted until it is known and where the system does not report it.

The documentation for this class was generated from the following file: