aboutsummaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h
index 21e3dbd6c..1e5499586 100644
--- a/src/map.h
+++ b/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;
};