Skip to content

Commit 9c4e018

Browse files
tanjialiangxiaoxmeng
authored andcommitted
[prestissimo] Fix memory push back latency unit
1 parent b7814df commit 9c4e018

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

presto-native-execution/presto_cpp/main/PeriodicMemoryChecker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ void PeriodicMemoryChecker::pushbackMemory() {
169169
const uint64_t bytesToShrink = currentMemBytes - targetMemBytes;
170170
VELOX_CHECK_GT(bytesToShrink, 0);
171171

172-
uint64_t latencyMs{0};
172+
uint64_t latencyUs{0};
173173
uint64_t freedBytes{0};
174174
{
175-
velox::MicrosecondTimer timer(&latencyMs);
175+
velox::MicrosecondTimer timer(&latencyUs);
176176
auto* cache = velox::cache::AsyncDataCache::getInstance();
177177
auto systemConfig = SystemConfig::instance();
178178
freedBytes = cache != nullptr ? cache->shrink(bytesToShrink) : 0;
@@ -208,7 +208,7 @@ void PeriodicMemoryChecker::pushbackMemory() {
208208
}
209209
}
210210
RECORD_HISTOGRAM_METRIC_VALUE(
211-
kCounterMemoryPushbackLatencyMs, latencyMs * 1000);
211+
kCounterMemoryPushbackLatencyMs, latencyUs / 1000);
212212
LOG(INFO) << "Shrunk " << velox::succinctBytes(freedBytes);
213213
}
214214
} // namespace facebook::presto

0 commit comments

Comments
 (0)