MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / LogStats

Method LogStats

extra/yassl/taocrypt/test/memory.cpp:243–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241
242
243void MemoryTracker::LogStats()
244{
245 log_ << "Number of Allocs: " << Allocs << '\n';
246 log_ << "Number of DeAllocs: " << DeAllocs << '\n';
247 log_ << "Number of bytes used: " << Bytes << '\n';
248
249 log_ << "Alloc size table:\n";
250 log_ << " Bytes " << '\t' << " Times\n";
251
252 for (size_t i = 0; i < size_elements; ++i) {
253 log_ << " " << sizes[i].size_ << " " << '\t';
254 log_ << std::setiosflags(std::ios::right) << std::setw(8);
255 log_ << sizes[i].count_ << '\n';
256 }
257
258 if (Allocs != DeAllocs) {
259 log_<< "Showing new'd allocs with no deletes" << '\n';
260 applyInOrder(Root, show, &log_);
261 }
262 log_.flush();
263}
264
265
266// return power of 2 up to size_tracker elements

Callers

nothing calls this directly

Calls 2

applyInOrderFunction · 0.85
flushMethod · 0.45

Tested by

no test coverage detected