Skip to main content

benchmark_throughput

Function benchmark_throughput 

Source
pub fn benchmark_throughput(n: usize) -> Result<BatchResult>
Expand description

Returns the throughput of a no-op pipeline to measure overhead.

Creates n temporary files and streams them through stream_copy. Returns the measured throughput in files/second.

ยงExamples

use ssg::stream::benchmark_throughput;

let result = benchmark_throughput(5).unwrap();
assert_eq!(result.files_processed, 5);