Files
wifi-densepose/crates/profiling/scripts/install_tools.sh
ruv d803bfe2b1 Squashed 'vendor/ruvector/' content from commit b64c2172
git-subtree-dir: vendor/ruvector
git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
2026-02-28 14:39:40 -05:00

61 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Install profiling and benchmarking tools
set -e
echo "Installing Ruvector profiling tools..."
# Install perf (Linux performance tools)
if ! command -v perf &> /dev/null; then
echo "Installing perf..."
sudo apt-get update
sudo apt-get install -y linux-tools-common linux-tools-generic linux-tools-$(uname -r) || true
fi
# Install valgrind
if ! command -v valgrind &> /dev/null; then
echo "Installing valgrind..."
sudo apt-get install -y valgrind
fi
# Install heaptrack
if ! command -v heaptrack &> /dev/null; then
echo "Installing heaptrack..."
sudo apt-get install -y heaptrack || echo "heaptrack not available, skipping..."
fi
# Install flamegraph tools
if ! command -v cargo-flamegraph &> /dev/null; then
echo "Installing cargo-flamegraph..."
cargo install flamegraph
fi
# Install cargo benchmarking tools
if ! command -v cargo-criterion &> /dev/null; then
echo "Installing cargo-criterion..."
cargo install cargo-criterion || echo "cargo-criterion installation failed, using built-in criterion"
fi
# Install hyperfine for command-line benchmarking
if ! command -v hyperfine &> /dev/null; then
echo "Installing hyperfine..."
cargo install hyperfine
fi
# Install cargo-bench-cmp for comparing benchmarks
if ! command -v cargo-bench-cmp &> /dev/null; then
echo "Installing cargo-bench-cmp..."
cargo install cargo-bench-cmp || echo "cargo-bench-cmp not available, skipping..."
fi
echo "✅ Profiling tools installation complete!"
echo ""
echo "Available tools:"
echo " - perf: CPU profiling"
echo " - valgrind: Memory profiling"
echo " - heaptrack: Heap profiling"
echo " - cargo-flamegraph: Flamegraph generation"
echo " - hyperfine: Command-line benchmarking"
echo ""
echo "Note: Some tools may require sudo privileges to run."