diff options
author | Wilfred Hughes <me@wilfred.me.uk> | 2023-10-11 20:30:01 -0700 |
---|---|---|
committer | Wilfred Hughes <me@wilfred.me.uk> | 2023-10-11 20:30:01 -0700 |
commit | dfe48a29e1e6f2f6bc356ff5ef298da0202a4311 (patch) | |
tree | 0b77a1c542b95ed8ac91f0e5128afd6a6659070e | |
parent | 69060fd6170be584dd26d017a0016bbb685774cb (diff) |
Format bytes counts in logging in a human-friendly manner
-rw-r--r-- | src/diff/dijkstra.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/diff/dijkstra.rs b/src/diff/dijkstra.rs index 577726fb2..7b2f01fd5 100644 --- a/src/diff/dijkstra.rs +++ b/src/diff/dijkstra.rs @@ -59,8 +59,8 @@ fn shortest_vertex_path<'s, 'b>( if seen.len() > graph_limit { info!( - "Reached graph limit, arena consumed {} bytes", - vertex_arena.allocated_bytes(), + "Reached graph limit, arena consumed {}", + humansize::format_size(vertex_arena.allocated_bytes(), humansize::BINARY), ); return Err(ExceededGraphLimit {}); } @@ -70,10 +70,10 @@ fn shortest_vertex_path<'s, 'b>( }; info!( - "Saw {} vertices (a Vertex is {} bytes), arena consumed {} bytes, with {} vertices left on heap.", + "Saw {} vertices (a Vertex is {} bytes), arena consumed {}, with {} vertices left on heap.", seen.len(), std::mem::size_of::<Vertex>(), - vertex_arena.allocated_bytes(), + humansize::format_size(vertex_arena.allocated_bytes(), humansize::BINARY), heap.len(), ); |