criterion.rs icon indicating copy to clipboard operation
criterion.rs copied to clipboard

Add `Throughput::Bits` or equivilent

Open howardjohn opened this issue 1 year ago • 0 comments

This is honestly pretty nitpicky.. but it would be nice to be able to report in Bits instead of Bytes. Its fairly common in networking to report in bits, so I find myself mentally *8ing results quite a bit. It could be nice to have a Throughput::Bits.

one thing I thought of though is to pass Throughput::Bits(bits: usize) may be a bit odd; general bits aren't stored, but bytes. So you would really probably want Throughput::Bits(bytes: usize) which is even more confusing. So I suppose if this was implemented Throughput::Bits(bytesToWrite * 8) would be fairly common which I guess is fine.

(It says a lot about how great criterion is that this is my only complaint :slightly_smiling_face: )

howardjohn avatar Nov 23 '22 00:11 howardjohn