userver: userver/utils/statistics/writer.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
writer.hpp File Reference

Class for writing metrics. More...

#include <atomic>
#include <string_view>
#include <type_traits>
#include <userver/utils/statistics/labels.hpp>
#include <userver/utils/statistics/rate.hpp>
+ Include dependency graph for writer.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  utils::statistics::Writer
 Class for writing metrics. More...
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<class Metric >
void utils::statistics::DumpMetric (Writer &writer, const std::atomic< Metric > &m)
 

Variables

template<class Metric >
constexpr bool utils::statistics::kHasWriterSupport = impl::HasDumpMetricWriter<Metric>()
 Returns true, if the Metric could be written by utils::statistics::Writer.
 

Detailed Description

Class for writing metrics.

Definition in file writer.hpp.

Function Documentation

◆ DumpMetric()

template<class Metric >
void utils::statistics::DumpMetric ( Writer writer,
const std::atomic< Metric > &  m 
)

Definition at line 191 of file writer.hpp.

Variable Documentation

◆ kHasWriterSupport

template<class Metric >
constexpr bool utils::statistics::kHasWriterSupport = impl::HasDumpMetricWriter<Metric>()
inlineconstexpr

Returns true, if the Metric could be written by utils::statistics::Writer.

In other words, checks that the DumpMetric for the Metric is provided or that the metric could be written without providing one.

Definition at line 44 of file writer.hpp.