Skip to repository content34 lines · 1.1 KB · text
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T01:25:33.362Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
collab-flamegraph
1#!/usr/bin/env bash
2
3# Notes for fixing this script if it's broken:
4# - if you see an error about "can't find perf_6.1" you need to install `linux-perf` from the
5# version of Debian that matches the host (e.g. apt-get -t bookworm-backports install linux-perf)
6# - if you see an error about `addr2line` you may need to install binutils
7
8set -euo pipefail
9
10source script/lib/deploy-helpers.sh
11
12if [[ $# != 1 ]]; then
13 echo "Usage: $0 <production|staging>"
14 exit 1
15fi
16environment=$1
17
18target_zed_kube_cluster
19
20# 5s in production is ~200Mb..., in staging you probably want to bump this up.
21echo "Running perf on collab, collecting 5s of data..."
22
23kubectl -n $environment exec -it deployments/collab -- perf record -p 1 -g -m 64 --call-graph dwarf -- sleep 5
24
25run="collab-$environment-$(date -Iseconds)"
26echo "Processing data and downloading to '$run.perf'..."
27
28kubectl -n $environment exec -it deployments/collab -- perf --no-pager script > "$run.perf"
29
30which inferno-flamegraph 2>/dev/null || (echo "installing inferno..."; cargo install inferno)
31
32inferno-collapse-perf "$run.perf" | inferno-flamegraph > "$run.svg"
33open "./$run.svg"
34