Skip to content

Commit 6b05a98

Browse files
committed
Split the Sampler into procfs and cgroup focus
This commit splits the Sampler so that cgroup collection is in a separate implementation from procfs, which has gotten sprawling. I have maintained the existing Sampler interface and hidden the two new implementations inside of it, although we might choose to expose them at some point in the future. Signed-off-by: Brian L. Troutwine <[email protected]>
1 parent 130c415 commit 6b05a98

File tree

4 files changed

+626
-503
lines changed

4 files changed

+626
-503
lines changed

lading/src/observer.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ impl Server {
112112
let target_pid = target_pid.expect("observer cannot be used in no-target mode");
113113

114114
let mut sample_delay = tokio::time::interval(Duration::from_secs(1));
115-
let mut sampler = Sampler::new(target_pid)?;
115+
let mut sampler = Sampler::new(
116+
target_pid,
117+
vec![(String::from("focus"), String::from("target"))],
118+
)?;
116119

117120
let shutdown_wait = self.shutdown.recv();
118121
tokio::pin!(shutdown_wait);

0 commit comments

Comments
 (0)