summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2020-04-27 08:31:37 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2020-04-29 07:48:08 +0200
commit56bababcdfce097a4e08cc3d1de8d798e7999ce7 (patch)
treeaef707d6abdcd86bc1520c668f7e2ee4533a638e /src/map.h
parenta36c9c3e930608386b983ea76158793fe9d622f6 (diff)
downloadminetest-56bababcdfce097a4e08cc3d1de8d798e7999ce7.tar.gz
minetest-56bababcdfce097a4e08cc3d1de8d798e7999ce7.tar.bz2
minetest-56bababcdfce097a4e08cc3d1de8d798e7999ce7.zip
Add MetricsBackend with prometheus counter support
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map.h b/src/map.h
index ff6b20c4f..77ee4da9e 100644
--- a/src/map.h
+++ b/src/map.h
@@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "voxel.h"
#include "modifiedstate.h"
#include "util/container.h"
+#include "util/metricsbackend.h"
#include "nodetimer.h"
#include "map_settings_manager.h"
#include "debug.h"
@@ -45,6 +46,7 @@ class NodeMetadata;
class IGameDef;
class IRollbackManager;
class EmergeManager;
+class MetricsBackend;
class ServerEnvironment;
struct BlockMakeData;
@@ -324,7 +326,7 @@ public:
/*
savedir: directory to which map data should be saved
*/
- ServerMap(const std::string &savedir, IGameDef *gamedef, EmergeManager *emerge);
+ ServerMap(const std::string &savedir, IGameDef *gamedef, EmergeManager *emerge, MetricsBackend *mb);
~ServerMap();
s32 mapType() const
@@ -449,6 +451,8 @@ private:
bool m_map_metadata_changed = true;
MapDatabase *dbase = nullptr;
MapDatabase *dbase_ro = nullptr;
+
+ MetricCounterPtr m_save_time_counter;
};