4 // Holds some metrics for basic statistics about uptime, memory usage and such.
12 extern bool uses_mlock;
18 BasicStats(bool verbose, bool use_opengl);
19 void update(int frame_num, int stats_dropped_frames);
22 std::chrono::steady_clock::time_point start;
24 std::unique_ptr<GPUMemoryStats> gpu_memory_stats;
27 std::atomic<int64_t> metric_frames_output_total{0};
28 std::atomic<int64_t> metric_frames_output_dropped{0};
29 std::atomic<double> metric_start_time_seconds{0.0 / 0.0};
30 std::atomic<int64_t> metrics_memory_used_bytes{0};
31 std::atomic<double> metrics_memory_locked_limit_bytes{0.0 / 0.0};
34 // Holds some metrics for GPU memory usage. Currently only exposed for NVIDIA cards
35 // (no-op on all other platforms).
37 class GPUMemoryStats {
39 GPUMemoryStats(bool verbose);
43 bool verbose, supported;
46 std::atomic<int64_t> metric_memory_gpu_total_bytes{0};
47 std::atomic<int64_t> metric_memory_gpu_dedicated_bytes{0};
48 std::atomic<int64_t> metric_memory_gpu_used_bytes{0};
49 std::atomic<int64_t> metric_memory_gpu_evicted_bytes{0};
50 std::atomic<int64_t> metric_memory_gpu_evictions{0};
53 #endif // !defined(_BASIC_STATS_H)