memgraph/src/stats/stats.hpp
Marko Culinovic dab95af366 Extract stats to static lib
Reviewers: teon.banek, mferencevic

Reviewed By: teon.banek, mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1546
2018-08-23 10:33:50 +02:00

34 lines
646 B
C++

/// @file
#pragma once
#include <thread>
#include <vector>
#include "gflags/gflags.h"
#include "io/network/endpoint.hpp"
namespace stats {
/**
* Start sending metrics to StatsD server.
*
* @param prefix prefix to prepend to exported keys
*/
void InitStatsLogging(std::string prefix = "");
/**
* Stop sending metrics to StatsD server. This should be called before exiting
* program.
*/
void StopStatsLogging();
/**
* Send a value to StatsD with current timestamp.
*/
void LogStat(const std::string &metric_path, double value,
const std::vector<std::pair<std::string, std::string>> &tags = {});
} // namespace stats