[][src]Crate nyx

Provides functionality for finding the throughput of iterators, readers, and writers.

Examples

Add this to Cargo.toml:

[dependencies]
nyx = "0.4"

And this to main.rs:

use std::io;

fn main() {
    let mut repeat = nyx::stdout(io::repeat(0));
    io::copy(&mut repeat, &mut io::sink()).unwrap();
}

This will write the amount of bytes copied per second to stdout in one second intervals.

28.06 GiB/s
29.34 GiB/s
30.06 GiB/s
29.33 GiB/s

Structs

Bps

Bytes per second with expected formatting.

Call

A wrapper that yields the bytes by calling the provided function.

Send

A wrapper that yields the bytes by sending it through the provided Sender.

Stderr

A wrapper that yields the bytes by printing it to stderr.

Stdout

A wrapper that yields the bytes by printing it to stdout.

Functions

call

Creates a wrapper that yields the bytes by calling the provided function.

send

Creates a wrapper that yields the bytes by sending it through the provided Sender.

stderr

Creates a wrapper that yields the bytes by printing it to stderr.

stdout

Creates a wrapper that yields the bytes by printing it to stdout.