Skip to content

Commit

Permalink
add config for show task metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohahaha committed Jul 24, 2024
1 parent 2e47b58 commit 5c5a2bc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ void WholeStageResultIterator::collectMetrics() {
return;
}

if (veloxCfg_->get<bool>(kDebugModeEnabled, false)) {
if (veloxCfg_->get<bool>(kDebugModeEnabled, false) ||
veloxCfg_->get<bool>(kShowTaskMetricsWhenFinished, kShowTaskMetricsWhenFinishedDefault)) {
auto planWithStats = velox::exec::printPlanWithStats(*veloxPlan_.get(), task_->taskStats(), true);
std::ostringstream oss;
oss << "Native Plan with stats for: " << taskInfo_;
Expand Down
4 changes: 4 additions & 0 deletions cpp/velox/config/VeloxConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const std::string kBloomFilterNumBits = "spark.gluten.sql.columnar.backend.velox
const std::string kBloomFilterMaxNumBits = "spark.gluten.sql.columnar.backend.velox.bloomFilter.maxNumBits";
const std::string kVeloxSplitPreloadPerDriver = "spark.gluten.sql.columnar.backend.velox.SplitPreloadPerDriver";

const std::string kShowTaskMetricsWhenFinished =
"spark.gluten.sql.columnar.backend.velox.showTaskMetricsWhenFinished";
const bool kShowTaskMetricsWhenFinishedDefault = false;

const std::string kEnableUserExceptionStacktrace =
"spark.gluten.sql.columnar.backend.velox.enableUserExceptionStacktrace";
const bool kEnableUserExceptionStacktraceDefault = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,14 @@ object GlutenConfig {
.booleanConf
.createWithDefault(true)

val COLUMNAR_VELOX_SHOW_TASK_METRICS_WHEN_FINISHED =
buildConf("spark.gluten.sql.columnar.backend.velox.showTaskMetricsWhenFinished")
.internal()
.doc("Show velox full task metrics when finished.")
.booleanConf
.createWithDefault(false)


val COLUMNAR_VELOX_MEMORY_USE_HUGE_PAGES =
buildConf("spark.gluten.sql.columnar.backend.velox.memoryUseHugePages")
.internal()
Expand Down

0 comments on commit 5c5a2bc

Please sign in to comment.