Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
98751: scripts: use pprofme for pprof-post r=pavelkalinnikov a=tbg

They've changed their endpoints and the script no longer works. But they
now have a `cli`. Make the script a wrapper around the cli so that
anyone who uses pprof-post will find out it exists.

Epic: none
Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Mar 20, 2023
2 parents 6839729 + e829627 commit dd7766e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions scripts/pprof-post.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail

# Usage: $0 "optional description, defaults to current date" < somefile.pb.gz
out=$(curl -s 'https://api.polarsignals.com/api/share/v1/profiles' \
-X POST \
-F "description=${1-$(date -u)}" \
-F "profile=@-")
echo -n "https://share.polarsignals.com/"
grep -Eo '[0-9a-f]{4,}' <<< "${out}"

if ! which pprofme; then
echo "pprofme missing, setup instructions: https://github.com/polarsignals/pprofme#install"
exit 1
fi

pprofme upload "$@"

0 comments on commit dd7766e

Please sign in to comment.