Last active
December 6, 2023 14:30
-
-
Save timsutton/7b287141540b1f4606eab7a6b5c6c63d to your computer and use it in GitHub Desktop.
Example benchmark of bazel building envoy using hyperfine.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Example of using hyperfine to benchmark bazel-based builds of Envoy proxy: | |
# https://github.com/envoyproxy/envoy/ | |
target="//source/exe:envoy_main_common_lib" | |
# Other examples of targets: | |
# main binary | |
# target="//source/exe:envoy-static" | |
# a smaller target: | |
# target="//source/common/ssl/matching:all" | |
# benchmarking b58d312729 | |
hyperfine \ | |
--min-runs 3 \ | |
--setup "bazel fetch ${target}" \ | |
--prepare "bazel clean" \ | |
"bazel build ${target}" | |
# Results from my M3 Max: | |
# Benchmark 1: bazel build //source/exe:envoy_main_common_lib | |
# Time (mean ± σ): 868.778 s ± 14.420 s [User: 0.067 s, System: 0.076 s] | |
# Range (min … max): 854.784 s … 883.589 s 3 runs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment