[][src]Crate nyx

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

Examples

Add this to Cargo.toml:

[dependencies]
nyx = "1"

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.0 GiB/s
29.3 GiB/s
30.1 GiB/s

Structs

Bps

Bytes per second with expected formatting.

Send

Yields the bytes by sending through a channel.

Slot

Yields the bytes by calling the provided function.

Stderr

Yields the bytes by printing to stderr.

Stdout

Yields the bytes by printing to stdout.

Functions

send

Creates a wrapper that yields the bytes by sending through a channel.

slot

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

stderr

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

stdout

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