diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-03-05 16:28:48 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-03-07 21:50:29 +0100 |
commit | 5f09cc0bbb5c72774431638b3a52cde59d089831 (patch) | |
tree | 3878f9760a3b5507fb6382c0a36a59a20530c845 | |
parent | 3d8dc565f9de9466f0e049d28101e6a1d64bba17 (diff) |
Use the bytesize crate to format size of memory nicely
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | src/commands/endpoint.rs | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -15,6 +15,7 @@ anyhow = "1" aquamarine = "0.1.6" ascii_table = ">= 3.0.2" atty = "0.2" +bytesize = "1" chrono = "0.4" clap = "3.0.0-beta.2" clap_generate = "3.0.0-beta.2" diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index 128613a..41dae04 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -183,7 +183,7 @@ async fn stats(endpoint_names: Vec<String>, stat.containers.to_string(), stat.images.to_string(), stat.kernel_version, - stat.mem_total.to_string(), + bytesize::ByteSize::b(stat.mem_total).to_string(), stat.memory_limit.to_string(), stat.n_cpu.to_string(), stat.operating_system.to_string(), |