Due to the bash args used, collect-profiles.sh would fail if which ipfs failed to find an ipfs binary on the path, like when running ipfs in docker.
Fixes that by using a check for the command that wont error if it's not found.
Also
- adds a commment to explains when to use the script and what it does.
- be less chatty. Simpify the output so it's clearer what it's doing. Experts can read the script or set the -x flag themselves.
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
With an empty API headers config like
```js
"API": {
"HTTPHeaders": {}
},
```
running collect-profiles.sh shows connection errors when trying to POST to `/debug/pprof-mutex/` end point when using `localhost`.
The same errors do not occur when using `127.0.0.1`
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
The version of `date` that ships with darwin does not support the `-Iseconds` flag.
Use a pattern with `date` to achieve the same thing but should have better cross platform support.
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>