joule-profiler-source-rapl 1.1.0

Intel RAPL energy measurement source for joule-profiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Result;

/// Checks if the operating system is Linux.
#[allow(clippy::unnecessary_wraps)]
pub fn check_os() -> Result<()> {
    #[cfg(target_os = "linux")]
    {
        Ok(())
    }

    #[cfg(not(target_os = "linux"))]
    {
        let os = std::env::consts::OS;
        Err(RaplError::UnsupportedOS(os.to_string()).into())
    }
}