Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const std::string kPreloadSplits = "readyPreloadedSplits";
const std::string kPageLoadTime = "pageLoadTimeNs";
const std::string kDataSourceAddSplitWallNanos = "dataSourceAddSplitWallNanos";
const std::string kWaitForPreloadSplitNanos = "waitForPreloadSplitNanos";
const std::string kPreloadSplitPrepareTimeNanos = "preloadSplitPrepareTimeNanos";
const std::string kDataSourceReadWallNanos = "dataSourceReadWallNanos";
const std::string kNumWrittenFiles = "numWrittenFiles";
const std::string kWriteIOTime = "writeIOWallNanos";
Expand Down Expand Up @@ -514,7 +515,8 @@ void WholeStageResultIterator::collectMetrics() {
metrics_->get(Metrics::kPageLoadTime)[metricIndex] = runtimeMetric("sum", second->customStats, kPageLoadTime);
metrics_->get(Metrics::kDataSourceAddSplitWallNanos)[metricIndex] =
runtimeMetric("sum", second->customStats, kDataSourceAddSplitWallNanos) +
runtimeMetric("sum", second->customStats, kWaitForPreloadSplitNanos);
runtimeMetric("sum", second->customStats, kWaitForPreloadSplitNanos) +
runtimeMetric("sum", second->customStats, kPreloadSplitPrepareTimeNanos);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall that kWaitForPreloadSplitNanos was intentionally excluded. cc: @FelixYBW Not sure if this might impact any metric comparisons in your script.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, kWaitForPreloadSplitNanos includes the duration of bloom-filter initialization, it's costly in current Gluten version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kDataSourceAddSplitWallNanos is used to breakdown the elapsed time of table scan. It should count the time waiting in main thread only.

kDataSourceAddSplitWallNanos count the time when there is no pending split in queue, we need to start a new split fetch.

kWaitForPreloadSplitNanos counts the time when a split is already prefetched but not returned yet.

kPreloadSplitPrepareTimeNanos counts the sum time of all outstanding prefetched splits time. It doesn't include the ondemand split fetch.

So here

      metrics_->get(Metrics::kDataSourceAddSplitWallNanos)[metricIndex] =
          runtimeMetric("sum", second->customStats, kDataSourceAddSplitWallNanos) +
          runtimeMetric("sum", second->customStats, kWaitForPreloadSplitNanos)

metrics_->get(Metrics::kDataSourceReadWallNanos)[metricIndex] =
runtimeMetric("sum", second->customStats, kDataSourceReadWallNanos);
metrics_->get(Metrics::kNumWrittenFiles)[metricIndex] =
Expand Down
2 changes: 1 addition & 1 deletion dev/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from util import attrdict
import util

EXTENSIONS = "cpp,h,inc,prolog"
EXTENSIONS = "cc,cpp,h,inc,prolog"
SCRIPTS = util.script_path()


Expand Down
Loading