mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add MetricsBackend with prometheus counter support
This commit is contained in:
parent
a36c9c3e93
commit
56bababcdf
16 changed files with 427 additions and 25 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue