|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Real-time frame timing and performance metrics. More...
#include <frame_metrics.h>
Public Member Functions | |
| std::string | get01LowString () const |
| Get formatted 0.1% low string. | |
| std::string | get1LowString () const |
| Get formatted 1% low string. | |
| int64_t | getAgeMs () const |
| Get age of metrics in milliseconds. | |
| std::string | getFPSAvgString () const |
| Get formatted average FPS string. | |
| std::string | getFPSString () const |
| Get formatted FPS string. | |
| std::string | getFrametimeString () const |
| Get formatted frametime string. | |
| std::string | getLatencyString () const |
| Get formatted latency string. | |
| bool | isValid (int max_age_ms=2000) const |
| Check if metrics are valid/fresh. | |
Public Attributes | |
| uint16_t | display_refresh = 0 |
| Monitor refresh rate (Hz). | |
| std::string | engine_name |
| Game engine name (if detected). | |
| double | fps = 0.0 |
| Current frames per second. | |
| double | fps_0_1_low = 0.0 |
| 0.1% low FPS (99.9th percentile frametime) | |
| double | fps_1_low = 0.0 |
| 1% low FPS (99th percentile frametime) | |
| double | fps_avg = 0.0 |
| Average FPS over sample window. | |
| double | fps_max = 0.0 |
| Maximum FPS in sample window. | |
| double | fps_min = 0.0 |
| Minimum FPS in sample window. | |
| double | frametime_avg_ms = 0.0 |
| Average frametime over sample window. | |
| double | frametime_max_ms = 0.0 |
| Maximum frametime in sample window. | |
| double | frametime_min_ms = 0.0 |
| Minimum frametime in sample window. | |
| double | frametime_ms = 0.0 |
| Current frame time in milliseconds. | |
| std::vector< double > | frametimeHistory |
| Recent frametimes for graph. | |
| double | latency_ms = 0.0 |
| Input-to-display latency in ms. | |
| uint32_t | output_height = 0 |
| Output resolution height. | |
| uint32_t | output_width = 0 |
| Output resolution width. | |
| uint32_t | sample_count = 0 |
| std::string | source |
| "gamescope", "mangohud", or empty | |
| std::chrono::steady_clock::time_point | timestamp |
Static Public Attributes | |
| static constexpr size_t | GRAPH_HISTORY_SIZE = 60 |
Real-time frame timing and performance metrics.
Contains frame-related metrics that can be displayed in the UI while a game is running. Data is sourced from Gamescope IPC or MangoHud logs.
Definition at line 48 of file frame_metrics.h.
|
inline |
Get formatted 0.1% low string.
Definition at line 153 of file frame_metrics.h.
References fps_0_1_low.
|
inline |
Get formatted 1% low string.
Definition at line 127 of file frame_metrics.h.
References fps_1_low.
|
inline |
Get age of metrics in milliseconds.
Definition at line 166 of file frame_metrics.h.
References timestamp.
|
inline |
Get formatted average FPS string.
Definition at line 176 of file frame_metrics.h.
References fps_avg.
|
inline |
Get formatted FPS string.
Definition at line 105 of file frame_metrics.h.
References fps.
|
inline |
Get formatted frametime string.
Definition at line 116 of file frame_metrics.h.
References frametime_ms.
|
inline |
Get formatted latency string.
Definition at line 140 of file frame_metrics.h.
References latency_ms.
|
inline |
Check if metrics are valid/fresh.
| max_age_ms | Maximum age in milliseconds |
Definition at line 93 of file frame_metrics.h.
References sample_count, and timestamp.
| uint16_t FrameMetrics::display_refresh = 0 |
Monitor refresh rate (Hz).
Definition at line 70 of file frame_metrics.h.
| std::string FrameMetrics::engine_name |
Game engine name (if detected).
Definition at line 76 of file frame_metrics.h.
| double FrameMetrics::fps = 0.0 |
Current frames per second.
Definition at line 51 of file frame_metrics.h.
Referenced by getFPSString().
| double FrameMetrics::fps_0_1_low = 0.0 |
0.1% low FPS (99.9th percentile frametime)
Definition at line 58 of file frame_metrics.h.
Referenced by get01LowString().
| double FrameMetrics::fps_1_low = 0.0 |
1% low FPS (99th percentile frametime)
Definition at line 57 of file frame_metrics.h.
Referenced by get1LowString().
| double FrameMetrics::fps_avg = 0.0 |
Average FPS over sample window.
Definition at line 53 of file frame_metrics.h.
Referenced by getFPSAvgString().
| double FrameMetrics::fps_max = 0.0 |
Maximum FPS in sample window.
Definition at line 62 of file frame_metrics.h.
| double FrameMetrics::fps_min = 0.0 |
Minimum FPS in sample window.
Definition at line 61 of file frame_metrics.h.
| double FrameMetrics::frametime_avg_ms = 0.0 |
Average frametime over sample window.
Definition at line 54 of file frame_metrics.h.
| double FrameMetrics::frametime_max_ms = 0.0 |
Maximum frametime in sample window.
Definition at line 64 of file frame_metrics.h.
| double FrameMetrics::frametime_min_ms = 0.0 |
Minimum frametime in sample window.
Definition at line 63 of file frame_metrics.h.
| double FrameMetrics::frametime_ms = 0.0 |
Current frame time in milliseconds.
Definition at line 52 of file frame_metrics.h.
Referenced by getFrametimeString().
| std::vector<double> FrameMetrics::frametimeHistory |
Recent frametimes for graph.
Definition at line 86 of file frame_metrics.h.
Referenced by FrameMetricsWidget::setMetrics().
|
staticconstexpr |
Definition at line 85 of file frame_metrics.h.
| double FrameMetrics::latency_ms = 0.0 |
Input-to-display latency in ms.
Definition at line 67 of file frame_metrics.h.
Referenced by getLatencyString().
| uint32_t FrameMetrics::output_height = 0 |
Output resolution height.
Definition at line 72 of file frame_metrics.h.
| uint32_t FrameMetrics::output_width = 0 |
Output resolution width.
Definition at line 71 of file frame_metrics.h.
| uint32_t FrameMetrics::sample_count = 0 |
Definition at line 82 of file frame_metrics.h.
Referenced by isValid(), and FrameMetricsWidget::setMetrics().
| std::string FrameMetrics::source |
"gamescope", "mangohud", or empty
Definition at line 75 of file frame_metrics.h.
| std::chrono::steady_clock::time_point FrameMetrics::timestamp |
Definition at line 79 of file frame_metrics.h.
Referenced by getAgeMs(), and isValid().