You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I dont know how to get the advertised 3kb ram usage and also dont see how this is possible considering you are using tokio.
I tested this using the sysinfo (0.30.8) crate and added these lines to src/service/server in fn service.
tokio::spawn(async{letmut system = sysinfo::System::new_all();let pid = sysinfo::get_current_pid().unwrap();loop{
system.refresh_all();ifletSome(process) = system.process(pid){println!("phisical {} kb, {} mb ; virtual {} kb, {} mb",
process.memory() / 1000,
process.memory() / 1000_000,
process.virtual_memory() / 1000,
process.virtual_memory() / 1000_000);}else{println!("Failed to get process information.");}
tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;}});
When compiled on Windows 10 in release i get ~20500kb physical and ~14000kb virtual Memory
When compiled on Arch Linux i get:
using glibc ~5000kb physical and ~188500kb virtual Memory
using musl ~3000kb physical and ~70500kb virtual Memory
(compiled using cargo b --release)
Now dont get me wrong 3mb is extremly little ram, but still it isnt 3kb.
Am i doing something wrong or may there be a Typo in the README?
The text was updated successfully, but these errors were encountered:
thisRedH
changed the title
How to get the advertised ram usage
How to get the advertised ram usage?
Apr 4, 2024
I dont know how to get the advertised 3kb ram usage and also dont see how this is possible considering you are using tokio.
I tested this using the sysinfo (0.30.8) crate and added these lines to src/service/server in fn service.
(compiled using
cargo b --release
)Now dont get me wrong 3mb is extremly little ram, but still it isnt 3kb.
Am i doing something wrong or may there be a Typo in the README?
The text was updated successfully, but these errors were encountered: