Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmarking on remote maschine / Report generation off-line #30

Open
ialokim opened this issue May 31, 2021 · 4 comments
Open

Benchmarking on remote maschine / Report generation off-line #30

ialokim opened this issue May 31, 2021 · 4 comments

Comments

@ialokim
Copy link

ialokim commented May 31, 2021

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 via cargo 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 install rust and cargo on the Pi itself and thus cannot use cargo-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, does cargo-criterion support benchmarking on a remote machine?

@Anton-4
Copy link
Contributor

Anton-4 commented Jun 9, 2021

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?

@ialokim
Copy link
Author

ialokim commented Jun 9, 2021

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.

@Anton-4
Copy link
Contributor

Anton-4 commented Jun 9, 2021

Awesome, thanks for the help @ialokim!

@bheisler
Copy link
Owner

bheisler commented Jul 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants