Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
yiguolei committed Dec 27, 2024
1 parent 3f55f2b commit 55ab168
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions be/src/util/doris_metrics.cpp
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@

#include "common/status.h"
#include "io/fs/local_file_system.h"
#include "runtime/exec_env.h"
#include "util/system_metrics.h"

namespace doris {
@@ -324,6 +325,10 @@ DorisMetrics::DorisMetrics() : _metric_registry(_s_registry_name) {
INT_COUNTER_METRIC_REGISTER(_server_metric_entity, scanner_task_submit_failed);
}

DorisMetrics* DorisMetrics::instance() {
return ExecEnv::GetInstance()->doris_metrics();
}

void DorisMetrics::initialize(bool init_system_metrics, const std::set<std::string>& disk_devices,
const std::vector<std::string>& network_interfaces) {
if (init_system_metrics) {
2 changes: 1 addition & 1 deletion be/src/util/doris_metrics.h
Original file line number Diff line number Diff line change
@@ -248,7 +248,7 @@ class DorisMetrics {
IntCounter* scanner_task_submit_failed = nullptr;
IntCounter* scanner_task_running = nullptr;

static DorisMetrics* instance() { return ExecEnv::GetInstance()->doris_metrics(); }
static DorisMetrics* instance();

// not thread-safe, call before calling metrics
void initialize(

0 comments on commit 55ab168

Please sign in to comment.