MCPcopy Create free account
hub / github.com/apache/impala / GetTopNQueries

Method GetTopNQueries

be/src/runtime/mem-tracker.cc:392–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392void MemTracker::GetTopNQueries(
393 priority_queue<pair<int64_t, string>, vector<pair<int64_t, string>>,
394 greater<pair<int64_t, string>>>& min_pq,
395 int limit) {
396 lock_guard<SpinLock> l(child_trackers_lock_);
397 for (MemTracker* tracker : child_trackers_) {
398 if (!tracker->is_query_mem_tracker_) {
399 tracker->GetTopNQueries(min_pq, limit);
400 } else {
401 min_pq.push(pair<int64_t, string>(tracker->consumption(), tracker->LogUsage(0)));
402 if (min_pq.size() > limit) min_pq.pop();
403 }
404 }
405}
406
407// Update the memory consumption related fields in pool_stats.
408void MemTracker::UpdatePoolStatsForMemoryConsumed(

Callers

nothing calls this directly

Calls 4

pushMethod · 0.80
LogUsageMethod · 0.80
consumptionMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected