|
14 | 14 | #include "async_simple/coro/Lazy.h"
|
15 | 15 | #include "async_simple/coro/SyncAwait.h"
|
16 | 16 | #include "cinatra/cinatra_log_wrapper.hpp"
|
17 |
| -#include "thread_local_value.hpp" |
18 | 17 | #if __has_include("ylt/coro_io/coro_io.hpp")
|
19 | 18 | #include "ylt/coro_io/coro_io.hpp"
|
20 | 19 | #else
|
@@ -53,6 +52,7 @@ struct metric_filter_options {
|
53 | 52 | class metric_t {
|
54 | 53 | public:
|
55 | 54 | static inline std::atomic<int64_t> g_user_metric_count = 0;
|
| 55 | + |
56 | 56 | metric_t() = default;
|
57 | 57 | metric_t(MetricType type, std::string name, std::string help)
|
58 | 58 | : type_(type),
|
@@ -92,8 +92,6 @@ class metric_t {
|
92 | 92 |
|
93 | 93 | MetricType metric_type() { return type_; }
|
94 | 94 |
|
95 |
| - auto get_created_time() { return metric_created_time_; } |
96 |
| - |
97 | 95 | std::string_view metric_name() {
|
98 | 96 | switch (type_) {
|
99 | 97 | case MetricType::Counter:
|
@@ -197,16 +195,10 @@ inline std::chrono::seconds ylt_label_max_age{0};
|
197 | 195 | inline std::chrono::seconds ylt_label_check_expire_duration{60};
|
198 | 196 |
|
199 | 197 | inline std::atomic<int64_t> ylt_metric_capacity = 10000000;
|
200 |
| -inline int64_t ylt_label_capacity = 20000000; |
201 |
| - |
202 | 198 | inline void set_metric_capacity(int64_t max_count) {
|
203 | 199 | ylt_metric_capacity = max_count;
|
204 | 200 | }
|
205 | 201 |
|
206 |
| -inline void set_label_capacity(int64_t max_label_count) { |
207 |
| - ylt_label_capacity = max_label_count; |
208 |
| -} |
209 |
| - |
210 | 202 | inline void set_label_max_age(
|
211 | 203 | std::chrono::seconds max_age,
|
212 | 204 | std::chrono::seconds check_duration = std::chrono::seconds{60}) {
|
|
0 commit comments