I'm gonna have to rework some of the error types.
Why did I need this? Because one of the benchmarks I run is the test suite, and running the test suite thousands of times generates a lot of useless output when it is verbose by default.
Like...
❯ cargo bench -q -p iocaine-vial -- tests 2>/dev/null | wc -l
1998432
That's almost two million completely useless loglines.
With quiet tests, the performance is up by 30% too. But the best thing is that the logs are useful now, because only the Criterion progress is shown, and errors - no noise.
Given the following output():
fn output(request: Request, decision: Decision) -> Result[Response, Report] {
let response = Response.empty();
Ok(response)
}
iocaine 4 benchmarks the http::Request + http::Response variant at ~77ns, while the dummy variant is ~17ns.
I'll go and benchmark iocaine3's output() too, out of curiosity.
God daaamn, iocaine3 is glacial to compile in release mode. All that LTO and codegen-units = 1 is really eating into the compilation time. Also, ~3GiB of RAM gobbled up by rustc ain't fun.
iocaine4's release profile is... less aggressive.
Oh. Okay, neat. iocaine3's no-op output() clocks in at ~120ns / response, so slower than iocaine4's! That's nice.
...and the "dummy" script in the iocaine repo uses ai.robots.txt's haproxy-block-ai-bots.txt, and excludes some of the too-generic bots.
First steps towards new NSoE!
Bwaahahaha.