fn cachegrind_cli(&self, binary: &str, binargs: &[&OsStr]) -> Result<String, ProfError> {
        // get cachegrind cli output from stdout
        let _ = Command::new("valgrind")
            .arg("--tool=cachegrind")
            .arg("--cachegrind-out-file=cachegrind.out")
            .arg(binary)
            .args(binargs)
            .output()
            .or(Err(ProfError::CliError));

        let cachegrind_output = Command::new("cg_annotate")
            .arg("cachegrind.out")
            .arg(binary)
            .output()
            .or(Err(ProfError::CliError));

        cachegrind_output
            .and_then(|x| String::from_utf8(x.stdout).or(Err(ProfError::UTF8Error)))
            .or(Err(ProfError::CliError))
    }
/// Get profiler output from stdout.
Get profiler output from stdout.
Get profiler output from stdout .
fn cachegrind_cli(&self, binary: &str, binargs: &[&OsStr]) -> Result<String, ProfError> {
        // get cachegrind cli output from stdout
        let _ = Command::new("valgrind")
            .arg("--tool=cachegrind")
            .arg("--cachegrind-out-file=cachegrind.out")
            .arg(binary)
            .args(binargs)
            .output()
            .or(Err(ProfError::CliError));
        let cachegrind_output = Command::new("cg_annotate")
            .arg("cachegrind.out")
            .arg(binary)
            .output()
            .or(Err(ProfError::CliError));
        cachegrind_output
            .and_then(|x| String::from_utf8(x.stdout).or(Err(ProfError::UTF8Error)))
            .or(Err(ProfError::CliError))
    }
fn cachegrind_cli ( & self , binary : & str , binargs : & [ & OsStr ] ) -> Result < String , ProfError > { // get cachegrind cli output from stdout let _ = Command :: new ( " " ) . arg ( " " ) . arg ( " " ) . arg ( binary ) . args ( binargs ) . output ( ) . or ( Err ( ProfError :: CliError ) ) ; let cachegrind_output = Command :: new ( " " ) . arg ( " " ) . arg ( binary ) . output ( ) . or ( Err ( ProfError :: CliError ) ) ; cachegrind_output . and_then ( | x | String :: from_utf8 ( x . stdout ) . or ( Err ( ProfError :: UTF8Error ) ) ) . or ( Err ( ProfError :: CliError ) ) }
Get profiler output from stdout.
Get profiler output from stdout .
&self
binary
&str
binargs
&[&OsStr]
&self
binary
&str
binargs
&[&OsStr]