18 lines
472 B
Rust
18 lines
472 B
Rust
|
|
use crate::lsm_storage::MiniLsm;
|
||
|
|
|
||
|
|
impl MiniLsm {
|
||
|
|
pub fn dump_structure(&self) {
|
||
|
|
let snapshot = self.inner.state.read();
|
||
|
|
if !snapshot.l0_sstables.is_empty() {
|
||
|
|
println!(
|
||
|
|
"L0 ({}): {:?}",
|
||
|
|
snapshot.l0_sstables.len(),
|
||
|
|
snapshot.l0_sstables,
|
||
|
|
);
|
||
|
|
}
|
||
|
|
for (level, files) in &snapshot.levels {
|
||
|
|
println!("L{level} ({}): {:?}", files.len(), files);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|