1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add more Prometheus metrics (#12274)

This commit is contained in:
sfan5 2022-05-09 21:20:58 +02:00 committed by GitHub
parent c2898f53bc
commit f5a8593b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 225 additions and 120 deletions

View file

@ -275,6 +275,9 @@ protected:
// This stores the properties of the nodes on the map.
const NodeDefManager *m_nodedef;
// Can be implemented by child class
virtual void reportMetrics(u64 save_time_us, u32 saved_blocks, u32 all_blocks) {}
bool determineAdditionalOcclusionCheck(const v3s16 &pos_camera,
const core::aabbox3d<s16> &block_bounds, v3s16 &check);
bool isOccluded(const v3s16 &pos_camera, const v3s16 &pos_target,
@ -392,6 +395,10 @@ public:
MapSettingsManager settings_mgr;
protected:
void reportMetrics(u64 save_time_us, u32 saved_blocks, u32 all_blocks) override;
private:
friend class LuaVoxelManip;
@ -420,7 +427,10 @@ private:
MapDatabase *dbase = nullptr;
MapDatabase *dbase_ro = nullptr;
// Map metrics
MetricGaugePtr m_loaded_blocks_gauge;
MetricCounterPtr m_save_time_counter;
MetricCounterPtr m_save_count_counter;
};