Open ialokim opened 3 years ago
Hi @ialokim I'm also trying to compile benchmarks on one machine and run them on another.
After compiling with --target arm-unknown-linux-gnueabihf
do you than copy the whole project folder to the Pi or is there a way to benchmark with only the binaries?
You can definitely run the benchmark binary directly on your target machine. You can find it under ./target/arm-unknown-linux-gnueabihf/release/deps/{name}-*
, with the name used in the Cargo.toml
file.
So just copy that binary to, let's say, the Pi and execute it with ./{name}.* --bench --noplot
(noplot
if you want to disable plot generation which I'd strongly recommend for constrained devices).
This approach does not use cargo-criterion
at all, just the criterion
crate.
Awesome, thanks for the help @ialokim!
Hello! Thanks for the suggestion.
This is an interesting idea. It probably won't be a priority for me to implement, but I'll leave this open as a note for future development.
Thanks a lot for your great benchmarking library!
Now that analyzing and plotting of results has been moved to
cargo-criterion
, I wonder if there is already some easy way to do benchmarks on a remote machine. Currently, I'm cross-compiling my criterion benchmarks for a Raspberry Pi Zero viacargo bench --target arm-unknown-linux-gnueabihf
which successfully generates binaries that I can run on the Pi with--bench
. Due to the very limited resources of this device I don't want to installrust
andcargo
on the Pi itself and thus cannot usecargo-criterion
directly. Also report generation (especially plotting) is very slow on the Pi, so I would like to shift that part of the task to my work machine.I already know that I can disable plot generation via
--noplot
. Is there some way to generate the reports afterwards on another computer using the raw data from the Pi? Or even better, doescargo-criterion
support benchmarking on a remote machine?