Commit Graph

6 Commits

Author SHA1 Message Date
Oli Evans
982bc38a51
fix: allow profiling of remote node via https
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2020-01-16 14:19:58 +00:00
Oli Evans
4eb380a58b
fix: dont fail to collect profiles if no ipfs bin
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>
2020-01-16 11:42:24 +00:00
Oli Evans
75240599c9
fix: prefer 127.0.0.1
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>
2019-09-24 11:20:32 +01:00
Oli Evans
0316abc7d6
fix: make collect-profiles.sh work on mac
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>
2019-09-24 11:06:23 +01:00
Steven Allen
2198bf377d debug: copy ipfs binary as well 2019-07-08 05:34:46 -07:00
Jakub Sztandera
e575c93dcd misc: add collect-profiles.sh script, update gitignore
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00