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

Method clear

src/protocol/buffer_pool.rs:293–303  ·  view source on GitHub ↗

Clear all buffers from the pool

(&self)

Source from the content-addressed store, hash-verified

291
292 /// Clear all buffers from the pool
293 pub fn clear(&self) {
294 let mut inner = self.inner.lock();
295 let cleared_count = inner.buffers.len();
296 inner.buffers.clear();
297 inner.stats.buffers_discarded += cleared_count as u64;
298 inner.stats.current_pool_size = 0;
299
300 if self.config.enable_monitoring {
301 info!("Cleared all {} buffers from pool", cleared_count);
302 }
303 }
304}
305
306impl Default for BufferPool {

Callers 4

resetMethod · 0.45
resetMethod · 0.45
pg_array_to_jsonMethod · 0.45

Calls 2

buffer_mutMethod · 0.80
lenMethod · 0.45

Tested by 1