Created
October 28, 2022 08:45
-
-
Save rsanheim/57c74b9d4e073e4bc06c01da12a122fb to your computer and use it in GitHub Desktop.
little script to try and run turbo benchmarks
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
#!/usr/bin/env bash | |
# this all assumes you have homebrew and a working node 16+ setup | |
# get prereqs for rust / turbo | |
brew install sponge jq protobuf protoc-gen-go protoc-gen-go-grpc golang | |
# install rustup to bootstrap rust (installing rust via brew didn't work for me and seems to be not recommended) | |
brew install rustup | |
# make sure you are within your checked out copy of turbo, and then | |
# install rust via the self-guided installer, make sure to pick the 'nightly' release channel for rust | |
rustup-init | |
# reload your shell so rust is setup, then build the world according to turbo. This will take | |
# at least 20 mins | |
cargo build | |
# set some things to match how Turbo's benchmarks are setup on GitHub actions | |
export TURBOPACK_BENCH_COUNTS=100 | |
export NODE_OPTIONS="--max-old-space-size=32768" | |
# Finally, run a benchmark! | |
cargo bench -p next-dev -- "(Turbopack CSR/100|Vite CSR)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment