#include "Define.h"
#include "Duration.h"
#include "MPSCQueue.h"
#include <functional>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
Go to the source code of this file.
|
#define | sMetric Metric::instance() |
|
#define | METRIC_TAG(name, value) { name, value } |
|
#define | METRIC_DO_CONCAT(a, b) a##b |
|
#define | METRIC_CONCAT(a, b) METRIC_DO_CONCAT(a, b) |
|
#define | METRIC_UNIQUE_NAME(name) METRIC_CONCAT(name, __LINE__) |
|
#define | METRIC_EVENT(category, title, description) |
|
#define | METRIC_VALUE(category, value, ...) |
|
#define | METRIC_TIMER(category, ...) |
|
#define | METRIC_DETAILED_EVENT(category, title, description) ((void)0) |
|
#define | METRIC_DETAILED_TIMER(category, ...) ((void)0) |
|
#define | METRIC_DETAILED_NO_THRESHOLD_TIMER(category, ...) ((void)0) |
|
|
typedef std::pair< std::string, std::string > | MetricTag |
|
◆ METRIC_CONCAT
◆ METRIC_DETAILED_EVENT
#define METRIC_DETAILED_EVENT |
( |
|
category, |
|
|
|
title, |
|
|
|
description |
|
) |
| ((void)0) |
◆ METRIC_DETAILED_NO_THRESHOLD_TIMER
#define METRIC_DETAILED_NO_THRESHOLD_TIMER |
( |
|
category, |
|
|
|
... |
|
) |
| ((void)0) |
◆ METRIC_DETAILED_TIMER
#define METRIC_DETAILED_TIMER |
( |
|
category, |
|
|
|
... |
|
) |
| ((void)0) |
◆ METRIC_DO_CONCAT
#define METRIC_DO_CONCAT |
( |
|
a, |
|
|
|
b |
|
) |
| a##b |
◆ METRIC_EVENT
#define METRIC_EVENT |
( |
|
category, |
|
|
|
title, |
|
|
|
description |
|
) |
| |
Value: __pragma(warning(push)) \
__pragma(warning(disable:4127)) \
do { \
sMetric->LogEvent(category, title, description); \
} while (0) \
__pragma(warning(pop))
#define sMetric
Definition: Metric.h:130
◆ METRIC_TAG
#define METRIC_TAG |
( |
|
name, |
|
|
|
value |
|
) |
| { name, value } |
◆ METRIC_TIMER
#define METRIC_TIMER |
( |
|
category, |
|
|
|
... |
|
) |
| |
Value:
{ \
sMetric->LogValue(category, std::chrono::steady_clock::now() - start, { __VA_ARGS__ }); \
});
MetricStopWatch< LoggerType > MakeMetricStopWatch(LoggerType &&loggerFunc)
Definition: Metric.h:154
#define METRIC_UNIQUE_NAME(name)
Definition: Metric.h:163
std::chrono::steady_clock::time_point TimePoint
time_point shorthand typedefs
Definition: Duration.h:69
◆ METRIC_UNIQUE_NAME
◆ METRIC_VALUE
#define METRIC_VALUE |
( |
|
category, |
|
|
|
value, |
|
|
|
... |
|
) |
| |
Value: __pragma(warning(push)) \
__pragma(warning(disable:4127)) \
do { \
sMetric->LogValue(category, value, { __VA_ARGS__ }); \
} while (0) \
__pragma(warning(pop))
◆ sMetric
◆ MetricTag
typedef std::pair<std::string, std::string> MetricTag |
◆ MetricDataType
Enumerator |
---|
METRIC_DATA_VALUE | |
METRIC_DATA_EVENT | |
37{
40};
@ METRIC_DATA_EVENT
Definition: Metric.h:39
@ METRIC_DATA_VALUE
Definition: Metric.h:38
◆ MakeMetricStopWatch()
template<typename LoggerType >
MetricStopWatch< LoggerType > MakeMetricStopWatch |
( |
LoggerType && |
loggerFunc | ) |
|
155{
156 return { std::forward<LoggerType>(loggerFunc) };
157}