MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / get_counts

Method get_counts

tiledb/common/memory_tracker.cc:232–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232std::tuple<uint64_t, std::unordered_map<MemoryType, uint64_t>>
233MemoryTracker::get_counts() const {
234 std::lock_guard<std::mutex> lg(mutex_);
235
236 auto total = total_counter_.load(std::memory_order_relaxed);
237 std::unordered_map<MemoryType, uint64_t> by_type;
238 std::vector<MemoryType> to_del;
239 for (auto& [mem_type, resource] : resources_) {
240 by_type[mem_type] = resource->get_count();
241 }
242
243 return {total, by_type};
244}
245
246uint64_t MemoryTracker::generate_id() {
247 static std::atomic<uint64_t> curr_id{0};

Callers

nothing calls this directly

Calls 2

get_countMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected