mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Add scripts for setting up benchmarks on linux
This commit is contained in:
parent
f6ed47fec7
commit
b77af78483
2 changed files with 72 additions and 0 deletions
8
scripts/flamegraph-aquatic-on-linux.sh
Executable file
8
scripts/flamegraph-aquatic-on-linux.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Profile
|
||||
perf record --call-graph=dwarf,16384 -e cpu-clock -F 997 target/release/aquatic
|
||||
|
||||
# Generate flamegraph (make sure nginx is installed for stdout path)
|
||||
# Info: https://gist.github.com/dlaehnemann/df31787c41bd50c0fe223df07cf6eb89
|
||||
perf script | stackcollapse-perf.pl | c++filt | flamegraph.pl > /var/www/html/flame.svg
|
||||
64
scripts/setup-bench-on-debian.sh
Executable file
64
scripts/setup-bench-on-debian.sh
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/bash
|
||||
# Run this to setup benchmark prerequisites on debian
|
||||
|
||||
set -e
|
||||
|
||||
echo "This script installs various dependencies for benchmarking aquatic."
|
||||
echo "It is meant for be run on a Debian buster system after OS install."
|
||||
|
||||
read -p "Setup benchmarking prerequisites? [y/N]" -n 1 -r
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
|
||||
fi
|
||||
|
||||
apt-get update && apt-get upgrade -y
|
||||
apt-get install -y vim screen build-essential libz-dev cvs htop curl linux-perf cmake c++filt numactl
|
||||
apt-get install nginx # If you want to easily view flamegraphs
|
||||
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
|
||||
echo 'export RUSTFLAGS="-Ctarget-cpu=native"' >> ~/.profile
|
||||
echo 'export EDITOR=vim' >> ~/.profile
|
||||
echo 'net.core.rmem_max=104857600' >> /etc/sysctl.d/local.conf
|
||||
echo 'net.core.rmem_default=104857600' >> /etc/sysctl.d/local.conf
|
||||
|
||||
sysctl -p
|
||||
|
||||
source ~/.profile
|
||||
|
||||
cd ~
|
||||
mkdir -p projects
|
||||
cd projects
|
||||
|
||||
# Download and compile opentracker and dependencies
|
||||
|
||||
wget https://www.fefe.de/libowfat/libowfat-0.32.tar.xz
|
||||
tar -xf libowfat-0.32.tar.xz
|
||||
rm libowfat-0.32.tar.xz
|
||||
mv libowfat-0.32 libowfat
|
||||
cd libowfat
|
||||
make
|
||||
cd ..
|
||||
|
||||
git clone git://erdgeist.org/opentracker
|
||||
cd opentracker
|
||||
sed -i "s/^OPTS_production=-O3/OPTS_production=-O3 -march=native -mtune=native/g" Makefile
|
||||
make
|
||||
cp opentracker.conf.example config
|
||||
cd ..
|
||||
|
||||
# Download and compile aquatic
|
||||
|
||||
git clone https://github.com/greatest-ape/aquatic.git
|
||||
cd aquatic
|
||||
cargo build --release --bin aquatic
|
||||
cargo build --release --bin aquatic_load_test
|
||||
cd ..
|
||||
|
||||
# Download flamegraph stuff
|
||||
|
||||
git clone https://github.com/brendangregg/FlameGraph
|
||||
cd FlameGraph
|
||||
echo 'export PATH="$HOME/projects/FlameGraph:$PATH"' >> ~/.profile
|
||||
source ~/.profile
|
||||
Loading…
Add table
Add a link
Reference in a new issue