Skip to main content

Crate chase_seq

Crate chase_seq 

Source
Expand description

ChaseSeq: A pointer chasing benchmark library.

A Rust port of MemoryLatencyTest’s pointer chasing benchmark.¹

§Quick Start

Add this to your Cargo.toml:

[dependencies]
chase_seq = "^0.2"

Use it in your code:

use chase_seq::{ChaseSeqBuilder, KB};

// `size` is in KiB
let chase_seq = ChaseSeqBuilder::default().size(64 * KB)?.build();

let results = chase_seq.chase(10)?;

for (i, result) in results.iter().enumerate() {
   println!("Iteration {}: {:.3} ns", i, result);
}

¹ the assembly parts are not ported.

Structs§

ChaseSeq
ChaseSeq provides pointer chasing benchmark functionality.
ChaseSeqBuilder
Builder for ChaseSeq.

Enums§

ChaseSeqBuilderError
ChaseSeqError
CommonError

Constants§

KB
From bytes, divide to get KiB. From KiB, multiply to get bytes
MB
From bytes, divide to get MiB. From MiB, multiply to get bytes
PTR_SIZE
Size of pointer in bytes