userver: userver/utils/statistics/common.hpp Source File
Loading...
Searching...
No Matches
common.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/utils/statistics/common.hpp
4/// @brief Default statistics period constants and duration formatting
5
6#include <chrono>
7#include <string>
8
9USERVER_NAMESPACE_BEGIN
10
11namespace utils::statistics {
12
13/* Graphite stores metrics once per minute,
14 * so we have to store at least 1min */
15constexpr auto kDefaultMaxPeriod = std::chrono::seconds(60);
16
17constexpr auto kDefaultEpochDuration = std::chrono::seconds(5);
18
19std::string DurationToString(std::chrono::seconds duration);
20
21} // namespace utils::statistics
22
23USERVER_NAMESPACE_END