mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 08:18:03 +08:00
Merge pull request #6673 from ipfs/collect-profiles-on-mac
fix: make collect-profiles.sh work on mac
This commit is contained in:
commit
e921121bfe
8
bin/collect-profiles.sh
Normal file → Executable file
8
bin/collect-profiles.sh
Normal file → Executable file
@ -3,7 +3,7 @@ set -x
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
HTTP_API="${1:-localhost:5001}"
|
||||
HTTP_API="${1:-127.0.0.1:5001}"
|
||||
tmpdir=$(mktemp -d)
|
||||
export PPROF_TMPDIR="$tmpdir"
|
||||
pushd "$tmpdir"
|
||||
@ -36,9 +36,5 @@ echo "Disabling mutex profiling"
|
||||
curl -X POST -v "http://$HTTP_API"'/debug/pprof-mutex/?fraction=0'
|
||||
|
||||
popd
|
||||
tar cvzf "./ipfs-profile-$(uname -n)-$(date -Iseconds).tar.gz" -C "$tmpdir" .
|
||||
tar cvzf "./ipfs-profile-$(uname -n)-$(date +'%Y-%m-%dT%H:%M:%S%z').tar.gz" -C "$tmpdir" .
|
||||
rm -rf "$tmpdir"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user