MCPcopy Create free account
hub / github.com/bytedance/bolt / taskSpilledStats

Function taskSpilledStats

bolt/exec/tests/HashJoinTest.cpp:90–113  ·  view source on GitHub ↗

Returns aggregated spilled stats by build and probe operators from 'task'.

Source from the content-addressed store, hash-verified

88
89// Returns aggregated spilled stats by build and probe operators from 'task'.
90std::pair<common::SpillStats, common::SpillStats> taskSpilledStats(
91 const exec::Task& task) {
92 common::SpillStats buildStats;
93 common::SpillStats probeStats;
94 auto stats = task.taskStats();
95 for (auto& pipeline : stats.pipelineStats) {
96 for (auto op : pipeline.operatorStats) {
97 if (op.operatorType == "HashBuild") {
98 buildStats.spilledInputBytes += op.spilledInputBytes;
99 buildStats.spilledBytes += op.spilledBytes;
100 buildStats.spilledRows += op.spilledRows;
101 buildStats.spilledPartitions += op.spilledPartitions;
102 buildStats.spilledFiles += op.spilledFiles;
103 } else if (op.operatorType == "HashProbe") {
104 probeStats.spilledInputBytes += op.spilledInputBytes;
105 probeStats.spilledBytes += op.spilledBytes;
106 probeStats.spilledRows += op.spilledRows;
107 probeStats.spilledPartitions += op.spilledPartitions;
108 probeStats.spilledFiles += op.spilledFiles;
109 }
110 }
111 }
112 return {buildStats, probeStats};
113}
114
115// Returns aggregated spilled runtime stats by build and probe operators from
116// 'task'.

Callers 4

runTestMethod · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85
DEBUG_ONLY_TEST_FFunction · 0.85

Calls 1

taskStatsMethod · 0.80

Tested by

no test coverage detected