From 72d8f242c32f19963ab2f3d407ffe6713a5703d9 Mon Sep 17 00:00:00 2001 From: Karol Sobczak Date: Wed, 6 Sep 2023 11:23:04 +0200 Subject: [PATCH] Add getCurrentLeafSplitsSize metric --- .../executor/timesharing/TimeSharingTaskExecutor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/trino-main/src/main/java/io/trino/execution/executor/timesharing/TimeSharingTaskExecutor.java b/core/trino-main/src/main/java/io/trino/execution/executor/timesharing/TimeSharingTaskExecutor.java index d9b623481bfb9..4536d9437af13 100644 --- a/core/trino-main/src/main/java/io/trino/execution/executor/timesharing/TimeSharingTaskExecutor.java +++ b/core/trino-main/src/main/java/io/trino/execution/executor/timesharing/TimeSharingTaskExecutor.java @@ -669,6 +669,12 @@ public DistributionStat getLeafSplitsSize() return leafSplitsSize; } + @Managed + public synchronized int getCurrentLeafSplitsSize() + { + return allSplits.size() - intermediateSplits.size(); + } + @Managed public int getRunningSplits() {