mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Replace the procfs by libproc
This commit is contained in:
parent
d78ada07b5
commit
02dcaf07db
6 changed files with 100 additions and 90 deletions
|
@ -96,12 +96,12 @@ impl TraceLayer {
|
|||
self.start_time.elapsed()
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
fn memory_stats(&self) -> Option<MemoryStats> {
|
||||
Some(MemoryStats::fetch().unwrap())
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
||||
fn memory_stats(&self) -> Option<MemoryStats> {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue