@ 260802.2

240104.1 · e2eed5b1bddafc3f871ad0baf4cb8b690b564480

bin: add samply scripts

`perf` has been quite finnicky and/or slow lately. So I'm going to try to switch over to `samply` for most of my profiling needs. The downside of `samply` is that it works by serving HTTP. So if I'm working on a remote machine (which I usually do, e.g., my workstation at home from my laptop in the other room), then I need to do some port forwarding to make that server accessible to me. This requires agreement on port numbers and other things. So let's make it simple with some scripts.

reading declarations

Changes to bin/sr-forward. All files

bin/sr-forward

new file mode 100755@@ -0,0 +1,10 @@+#!/bin/sh++set -e+if [ $# != 1 ]; then+  echo "Usage: sr-forward <host>" >&2+  exit 1+fi+host="$1"+port="$(sr-port "$host")"+ssh -L $port:127.0.0.1:$port "$host"