xentrace-parser 0.1.4

A XenTrace files parser with a study purpose
Documentation

XenTrace binary data parser (RUST LANG) GitHub Latest Tag Crates.io Downloads

This library parses XenTrace binary files by producing a list of events sorted by their TSC.
This is the Rust lang version of a project made for the final three-year degree exam at the University of Turin.

Usage

use xentrace_parser::{Parser, /*Record,*/ Event, Domain, DomainType};

fn main() -> std::io::Result<()> {
    let parser = Parser::new("/absolute/path/trace_xen.bin")?;
    let records = parser.get_records(); // Vec<Record>

    for r in records {
        let _cpu: u8 = r.get_cpu(); // Host CPU
        let _domain: Domain = r.get_domain();
        let _domType: DomainType = _domain.get_type();
        let _event: Event = r.get_event();

        println!("{:?}", r);
    }

    println!(); // Blank

    let rec_count = records.len();
    let cpu_count = parser.cpu_count();

    println!("Records count: {:?}", rec_count);
    println!("Host CPU count:  {:?}", cpu_count);

    Ok(())
}

License

This library is released under the GNU Lesser General Public License v2.1 (or later).