diff --git a/src/admin/server/commands.rs b/src/admin/server/commands.rs index eb3ae20c..bd465e22 100644 --- a/src/admin/server/commands.rs +++ b/src/admin/server/commands.rs @@ -95,7 +95,8 @@ pub(super) async fn list_database_files(_body: Vec<&str>) -> Result, message: Vec) -> Result { diff --git a/src/database/rocksdb/mod.rs b/src/database/rocksdb/mod.rs index c9493cab..52fd303d 100644 --- a/src/database/rocksdb/mod.rs +++ b/src/database/rocksdb/mod.rs @@ -238,10 +238,12 @@ impl KeyValueDatabaseEngine for Arc { Err(e) => Ok(String::from(e)), Ok(files) => { let mut res = String::new(); + writeln!(res, "| lev | sst | keys | dels | size | column |").expect("written to string buffer"); + writeln!(res, "| ---: | :--- | ---: | ---: | ---: | :--- |").expect("written to string buffer"); for file in files { writeln!( res, - "L{} {:<13} {:7}+ {:4}- {:9} {}
", + "| {} | {:<13} | {:7}+ | {:4}- | {:9} | {} |", file.level, file.name, file.num_entries, file.num_deletions, file.size, file.column_family_name, ) .expect("should be able to writeln to string buffer");