Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use datafusion_common_runtime::SpawnedTask;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use sysinfo::System;
use sysinfo::{ProcessRefreshKind, ProcessesToUpdate, System};
use tokio::time::{interval, Duration};

use datafusion::prelude::{SessionConfig, SessionContext};
Expand Down Expand Up @@ -62,7 +62,11 @@ where

loop {
interval.tick().await;
sys.refresh_all();
sys.refresh_processes_specifics(
ProcessesToUpdate::Some(&[pid]),
true,
ProcessRefreshKind::nothing().with_memory(),
);
if let Some(process) = sys.process(pid) {
let rss_bytes = process.memory();
max_rss_clone
Expand Down Expand Up @@ -116,8 +120,8 @@ where
/// # Example
///
/// utils::validate_query_with_memory_limits(
/// 40_000_000 * 2,
/// Some(40_000_000),
/// 40_000_000 * 2,
/// Some(40_000_000),
/// "SELECT * FROM generate_series(1, 100000000) AS t(i) ORDER BY i",
/// "SELECT * FROM generate_series(1, 10000000) AS t(i) ORDER BY i"
/// );
Expand Down