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:
parent
c2898f53bc
commit
f5a8593b11
10 changed files with 225 additions and 120 deletions
10
src/map.h
10
src/map.h
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue