alamb commented on code in PR #6182:
URL: https://github.com/apache/arrow-rs/pull/6182#discussion_r1701891915
##########
parquet/examples/write_parquet.rs:
##########
@@ -61,8 +61,16 @@ fn now() -> String {
}
fn mem(system: &mut System) -> String {
- let pid = Pid::from(std::process::id() as usize);
- system.refresh_process_specifics(pid,
ProcessRefreshKind::new().with_memory());
+ let pid = match sysinfo::get_current_pid() {
Review Comment:
I updated the example to use the new sysinfo API, and double checked it
still works on my mac by running:
```
andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ cargo run --example
write_parquet --all-features -- /tmp/foo.parquet
Blocking waiting for file lock on build directory
Compiling pyo3-build-config v0.22.2
Compiling pyo3-ffi v0.22.2
Compiling pyo3 v0.22.2
Compiling arrow v52.2.0 (/Users/andrewlamb/Software/arrow-rs/arrow)
Compiling parquet v52.2.0 (/Users/andrewlamb/Software/arrow-rs/parquet)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.16s
Running `target/debug/examples/write_parquet /tmp/foo.parquet`
2024-08-02 09:58:29 Writing 1000 batches of 1000000 rows. RSS = 6MB
2024-08-02 09:58:40 Iteration 19/1000. RSS = 281MB
2024-08-02 09:58:50 Iteration 38/1000. RSS = 327MB
2024-08-02 09:59:00 Iteration 57/1000. RSS = 360MB
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]