#!/usr/bin/env bash # set -euo pipefail IFS=$'\n\t' DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" : ${PROFILE:="perf"} cd "$DIR/../" cargo build --profile "$PROFILE" --no-default-features perf record --freq=2000 --call-graph dwarf --output=perf.data target/${PROFILE}/compare # Convert to a format firefox will read # flags to consider --show-info perf script -F +pid --input perf.data > perf.firefox echo "You probably want to go to https://profiler.firefox.com/" echo "Either that or run hotspot"