Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: silverbullet233 <3675229+silverbullet233@users.noreply.github.com>
  • Loading branch information
silverbullet233 committed Dec 12, 2024
1 parent e01a363 commit 5696287
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion be/src/exec/pipeline/pipeline_driver_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ void GlobalDriverExecutor::_worker_thread() {
Status status = maybe_state.status();
this->_driver_queue->update_statistics(driver);
int64_t end_time = driver->get_active_time();
// _driver_execution_ns += end_time - start_time;
_metrics->driver_execution_time.increment(end_time - start_time);
_metrics->exec_running_tasks.increment(-1);
_metrics->exec_finished_tasks.increment(1);
Expand Down
1 change: 0 additions & 1 deletion be/src/exec/pipeline/pipeline_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ struct DriverExecutorMetrics {
void register_all_metrics(MetricRegistry* registry);
};

// scan
struct PipelineExecutorMetrics {
public:
PollerMetrics poller_metrics;
Expand Down
2 changes: 1 addition & 1 deletion be/src/io/io_profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ void IOProfiler::_add_tls_read(int64_t bytes, int64_t latency_ns) {
tls_io_stat.read_ops += 1;
tls_io_stat.read_bytes += bytes;
tls_io_stat.read_time_ns += latency_ns;
// update metrics
auto* metrics = StarRocksMetrics::instance()->system_metrics()->get_io_metrics_by_tag(current_io_tag);
if (UNLIKELY(metrics == nullptr)) {
// some r/w operations may be performed before metrics are initialized, in which case updating metrics is ignored.
return;
}
metrics->read_ops.increment(1);
Expand Down
3 changes: 1 addition & 2 deletions be/src/runtime/local_tablets_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include "util/faststring.h"
#include "util/starrocks_metrics.h"
#include "util/stopwatch.hpp"
#include "util/starrocks_metrics.h"

namespace starrocks {

Expand Down Expand Up @@ -226,7 +225,7 @@ void LocalTabletsChannel::add_chunk(Chunk* chunk, const PTabletWriterAddChunkReq
}
}

size_t chunk_size = chunk != nullptr ? chunk->bytes_usage(): 0;
size_t chunk_size = chunk != nullptr ? chunk->bytes_usage() : 0;

auto res = _create_write_context(chunk, request, response);
if (!res.ok()) {
Expand Down
3 changes: 2 additions & 1 deletion be/src/util/table_metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
namespace starrocks {

void TableMetrics::install(MetricRegistry* registry, const std::string& table_id) {
#define REGISTER_TABLE_METRIC(name) registry->register_metric("table_"#name, MetricLabels().add("table_id", table_id), &name)
#define REGISTER_TABLE_METRIC(name) \
registry->register_metric("table_" #name, MetricLabels().add("table_id", table_id), &name)

REGISTER_TABLE_METRIC(scan_read_bytes);
REGISTER_TABLE_METRIC(scan_read_rows);
Expand Down

0 comments on commit 5696287

Please sign in to comment.