Skip to content

Commit edc6daf

Browse files
committed
Migrate procfs memory module under procfs/
In practice the `memory.rs` is only used by the procfs sampler. This commit migrates the code to match its use. Signed-off-by: Brian L. Troutwine <[email protected]>
1 parent 2d8f756 commit edc6daf

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lading/src/observer.rs

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ use serde::Deserialize;
1616
#[cfg(target_os = "linux")]
1717
mod linux;
1818

19-
#[cfg(target_os = "linux")]
20-
mod memory;
21-
2219
#[allow(dead_code)] // used on Linux
2320
/// Expose the process' current RSS consumption, allowing abstractions to be
2421
/// built on top in the Target implementation.

lading/src/observer/linux/procfs.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/// Sampler implementation for procfs filesystems
2+
mod memory;
3+
24
use std::{collections::VecDeque, io, sync::atomic::Ordering};
35

46
use metrics::gauge;
@@ -8,8 +10,8 @@ use procfs::{process::Process, Current};
810
use rustc_hash::{FxHashMap, FxHashSet};
911
use tracing::{error, warn};
1012

11-
use crate::observer::memory::{Regions, Rollup};
1213
use crate::observer::RSS_BYTES;
14+
use memory::{Regions, Rollup};
1315

1416
const BYTES_PER_KIBIBYTE: u64 = 1024;
1517

File renamed without changes.

0 commit comments

Comments
 (0)