cpu-instructions-reader 0.2.1

perf_event_read package specialized for reading cpu hw instructions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{num::TryFromIntError, result};

use thiserror::Error;

pub type Result<T> = result::Result<T, Error>;

#[derive(Error, Debug)]
pub enum Error {
    #[error("TryFromIntError")]
    TryFromIntError(#[from] TryFromIntError),
    #[error("Failed to create reader")]
    FailedToCreate,
    #[error("Failed to read cpu instruction number")]
    FailedToRead,
    #[error("Cpu core of InstructionNumberInstant are inconsistent and cannot be subtracted")]
    InconsistentCore,
}