Skip to content

Commit

Permalink
Use human readable byte values for info (ordinals#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Feb 19, 2022
1 parent afa0920 commit 454be10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/subcommand/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pub(crate) fn run() -> Result {

println!("tree height: {}", stats.tree_height());
println!("free pages: {}", stats.free_pages());
println!("stored bytes: {}", stats.stored_bytes());
println!("overhead bytes: {}", stats.overhead_bytes());
println!("fragmented bytes: {}", stats.fragmented_bytes());
println!("stored: {}", Bytes(stats.stored_bytes()));
println!("overhead: {}", Bytes(stats.overhead_bytes()));
println!("fragmented: {}", Bytes(stats.fragmented_bytes()));

Ok(())
}
6 changes: 3 additions & 3 deletions tests/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ fn basic() -> Result {
r"
tree height: \d+
free pages: \d+
stored bytes: \d+
overhead bytes: \d+
fragmented bytes: \d+
stored: .* bytes
overhead: .* bytes
fragmented: .* KiB
"
.unindent(),
)
Expand Down

0 comments on commit 454be10

Please sign in to comment.