mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 17:43:12 +02:00
Fix ps sys units (#2967)
* Fix the units for sys and ps * Better conversion
This commit is contained in:
@ -100,10 +100,10 @@ pub fn mem(sys: &mut System, tag: Tag) -> Option<UntaggedValue> {
|
||||
let total_swap = sys.get_total_swap();
|
||||
let free_swap = sys.get_free_swap();
|
||||
|
||||
dict.insert_untagged("total", UntaggedValue::filesize(total_mem));
|
||||
dict.insert_untagged("free", UntaggedValue::filesize(free_mem));
|
||||
dict.insert_untagged("swap total", UntaggedValue::filesize(total_swap));
|
||||
dict.insert_untagged("swap free", UntaggedValue::filesize(free_swap));
|
||||
dict.insert_untagged("total", UntaggedValue::filesize(total_mem * 1000));
|
||||
dict.insert_untagged("free", UntaggedValue::filesize(free_mem * 1000));
|
||||
dict.insert_untagged("swap total", UntaggedValue::filesize(total_swap * 1000));
|
||||
dict.insert_untagged("swap free", UntaggedValue::filesize(free_swap * 1000));
|
||||
|
||||
Some(dict.into_untagged_value())
|
||||
}
|
||||
|
Reference in New Issue
Block a user