mirror of
https://github.com/nushell/nushell.git
synced 2025-08-13 22:38:25 +02:00
Fix ps sys units (#2967)
* Fix the units for sys and ps * Better conversion
This commit is contained in:
@ -35,8 +35,11 @@ pub async fn ps(tag: Tag, long: bool) -> Result<Vec<Value>, ShellError> {
|
||||
"cpu",
|
||||
UntaggedValue::decimal_from_float(process.cpu_usage() as f64, tag.span),
|
||||
);
|
||||
dict.insert_untagged("mem", UntaggedValue::filesize(process.memory()));
|
||||
dict.insert_untagged("virtual", UntaggedValue::filesize(process.virtual_memory()));
|
||||
dict.insert_untagged("mem", UntaggedValue::filesize(process.memory() * 1000));
|
||||
dict.insert_untagged(
|
||||
"virtual",
|
||||
UntaggedValue::filesize(process.virtual_memory() * 1000),
|
||||
);
|
||||
|
||||
if long {
|
||||
if let Some(parent) = process.parent() {
|
||||
|
Reference in New Issue
Block a user