MCPcopy Create free account
hub / github.com/erans/pgsqlite / reset_stats

Method reset_stats

src/protocol/memory_monitor.rs:383–391  ·  view source on GitHub ↗

Reset all statistics

(&self)

Source from the content-addressed store, hash-verified

381
382 /// Reset all statistics
383 pub fn reset_stats(&self) {
384 self.buffer_pool_bytes.store(0, Ordering::Relaxed);
385 self.message_bytes.store(0, Ordering::Relaxed);
386 self.query_bytes.store(0, Ordering::Relaxed);
387 self.cleanup_events.store(0, Ordering::Relaxed);
388
389 let mut stats = self.stats.lock();
390 *stats = MemoryStats::default();
391 }
392}
393
394impl Default for MemoryMonitor {

Callers 2

test_memory_deallocationFunction · 0.45
test_stats_resetFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_memory_deallocationFunction · 0.36
test_stats_resetFunction · 0.36