Struct hbs::Heartbeat
[−]
[src]
pub struct Heartbeat { pub hb: HeartbeatContext, pub hbr: Vec<HeartbeatRecord>, pub log: Option<File>, }
Contains the Heartbeat and its window data buffer.
Fields
hb: HeartbeatContext
hbr: Vec<HeartbeatRecord>
log: Option<File>
Methods
impl Heartbeat
[src]
fn new(
window_size: usize,
hwc_callback: Option<HeartbeatWindowComplete>,
log: Option<File>
) -> Result<Heartbeat, &'static str>
window_size: usize,
hwc_callback: Option<HeartbeatWindowComplete>,
log: Option<File>
) -> Result<Heartbeat, &'static str>
Allocate and initialize a new Heartbeat
.
fn heartbeat(&mut self, tag: u64, work: u64, start_time: u64, end_time: u64)
Issue a heartbeat
fn log_to_buffer_index(&mut self) -> Result<()>
Rust-only function that logs the buffer (up to buffer_index) to a file.