Skip to content

Commit

Permalink
Remove unused TableScan::ioWaitNanos_
Browse files Browse the repository at this point in the history
Summary: This field is unused so clean it up.

Differential Revision: D56479031
  • Loading branch information
Yuhta authored and facebook-github-bot committed Apr 23, 2024
1 parent a362a67 commit 8ee66a4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
4 changes: 0 additions & 4 deletions velox/exec/TableScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ RowVectorPtr TableScan::getOutput() {
const auto connectorStats = dataSource_->runtimeStats();
auto lockedStats = stats_.wlock();
for (const auto& [name, counter] : connectorStats) {
if (name == "ioWaitNanos") {
ioWaitNanos_ += counter.value - lastIoWaitNanos_;
lastIoWaitNanos_ = counter.value;
}
if (FOLLY_UNLIKELY(lockedStats->runtimeStats.count(name) == 0)) {
lockedStats->runtimeStats.emplace(
name, RuntimeMetric(counter.unit));
Expand Down
14 changes: 0 additions & 14 deletions velox/exec/TableScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ class TableScan : public SourceOperator {
column_index_t outputChannel,
const std::shared_ptr<common::Filter>& filter) override;

/// Returns process-wide cumulative IO wait time for all table
/// scan. This is the blocked time. If running entirely from memory
/// this would be 0.
static uint64_t ioWaitNanos() {
return ioWaitNanos_;
}

private:
// Checks if this table scan operator needs to yield before processing the
// next split.
Expand All @@ -76,9 +69,6 @@ class TableScan : public SourceOperator {
// done, it will be made when needed.
void preload(std::shared_ptr<connector::ConnectorSplit> split);

// Process-wide IO wait time.
inline static std::atomic<uint64_t> ioWaitNanos_;

const std::shared_ptr<connector::ConnectorTableHandle> tableHandle_;
const std::
unordered_map<std::string, std::shared_ptr<connector::ColumnHandle>>
Expand Down Expand Up @@ -129,9 +119,5 @@ class TableScan : public SourceOperator {
// Holds the current status of the operator. Used when debugging to understand
// what operator is doing.
std::atomic<const char*> curStatus_{""};

// The last value of the IO wait time of 'this' that has been added to the
// global static 'ioWaitNanos_'.
uint64_t lastIoWaitNanos_{0};
};
} // namespace facebook::velox::exec
2 changes: 1 addition & 1 deletion velox/exec/tests/TableScanTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ TEST_F(TableScanTest, allColumns) {
auto it = planStats.find(scanNodeId);
ASSERT_TRUE(it != planStats.end());
ASSERT_TRUE(it->second.peakMemoryBytes > 0);
EXPECT_LT(0, exec::TableScan::ioWaitNanos());
ASSERT_LT(0, it->second.customStats.at("ioWaitNanos").sum);
}

TEST_F(TableScanTest, connectorStats) {
Expand Down

0 comments on commit 8ee66a4

Please sign in to comment.