]> git.sesse.net Git - nageru/blobdiff - disk_space_estimator.h
Add the GPU memory metrics to the Grafana dashboard.
[nageru] / disk_space_estimator.h
index b585bc37b83ba2324f749599ebfeef70687d453c..73b392cc586e43c57c82fa4c6195d20d294c82bf 100644 (file)
@@ -10,7 +10,8 @@
 // The bitrate is measured over a simple 30-second sliding window.
 
 #include <stdint.h>
-
+#include <sys/types.h>
+#include <atomic>
 #include <deque>
 #include <functional>
 #include <string>
@@ -43,6 +44,10 @@ private:
                off_t size;
        };
        std::deque<MeasurePoint> measure_points;
+       uint64_t last_pts_reported = 0;
+
+       // Metrics.
+       std::atomic<int64_t> metric_disk_free_bytes{-1};
 };
 
 extern DiskSpaceEstimator *global_disk_space_estimator;