Open thomaseizinger opened 4 months ago
Hey @thomaseizinger, thank you for checking out Bencher.
I have to admit, I'm embarrassingly uninformed about iperf3
. From some quick googling, it seems to be for testing the performance of the network itself? That is, you are benchmarking the network and not a service on the network per say?
I'm curious about your use case, if you're able to provide any details.
As for contributing an adapter, I would be open to a PR for iperf3
. If I'm understanding things correctly, I think it would make sense to create a new category of adapters called "network". So the adapter name would be network_iperf3
.
What is your plan for mapping the iperf3
output to BFM JSON? We should make sure to get this agreed upon before you work on a PR.
I've created a tracking issue for how to contribute an adapter: https://github.com/bencherdev/bencher/issues/455
In the meantime, check out this PR for a good example: https://github.com/bencherdev/bencher/pull/319
When you do start working on the PR, make sure to target the devel
branch.
I'm curious about your use case, if you're able to provide any details.
We are building a VPN (https://github.com/firezone/firezone) and currently have a homegrown benchmarking suite to measure TCP and UDP throughput through the tunnel.
iperf3 is only about network testing so "network_iperf3" feels a bit redundant to me. I am not fussed though, happy to follow your naming suggestions.
Iperf supports TCP and UDP upload and download. My thinking was to create benchmark names out of that, i.e. 1 test run is:
{
"tcp_upload": {
"throughput": {
"value": "..." // bits per second from above
}
}
}
Same for UDP upload, TCP download and UDP download.
We can also extract latency and create custom metrics like jitter etc. I'd start with the basic ones though.
Looking at the code, it appears to be pretty simple. We just need to define a struct, use serde_json
and maybe convert a few things? I'd probably convert to bytes / s for example.
We are building a VPN (https://github.com/firezone/firezone) and currently have a homegrown benchmarking suite to measure TCP and UDP throughput through the tunnel.
Ah, that totally makes sense, and cool product 🔥
iperf3 is only about network testing so "network_iperf3" feels a bit redundant to me. I am not fussed though, happy to follow your naming suggestions.
Yes, it is a bit redundant. However, I prefer to namespace the adapters. For example, the hyperfine
adapter is shell_hyperfine
. This stems from supporting a lot of benchmark harnesses and needing to disambiguate between go_bench
and rust_bench
for example. A future name collision is unlikely in this case, but I prefer consistency over brevity for public facing names.
Iperf supports TCP and UDP upload and download. My thinking was to create benchmark names out of that, i.e. 1 test run is
This looks good to me. Which of the bits_per_second
does this come from though? sum_sent
or sum_received
and why not the other? Also, why are they different?
We can also extract latency and create custom metrics like jitter etc. I'd start with the basic ones though.
I think we should do both throughput
and latency
, as they are both available.
Is jitter
a derived measure? I don't see it in the example above.
Looking at the code, it appears to be pretty simple. We just need to define a struct, use serde_json and maybe convert a few things? I'd probably convert to bytes / s for example.
Yep, it should be pretty straight forward. Please, make sure to add tests similar to the other adapters. You only need to update the English version of the docs. I will handle running things through GPT-4 and translating to the other languages.
Okay cool! I want to set things up with the JSON adapter first but if that all works out, I'll get back to this!
iperf3
has a json mode that outputs a lot of data about a test run. It would be nice to directly feed the resulting JSON into bencher instead of using the JSON adapter.Here is an example output:
I think the most useful bits out of this are:
Are there some docs on how to create an adapter? I am open to contributing one with some guidance! :)