1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00

3 Commits

Author SHA1 Message Date
23d35184c3 fix: use http.Error for sending errors
This sets a few headers that prevent browsers from misinterpreting the error
text.
2019-05-25 10:45:17 -07:00
1f293eff1b chore: fix a bunch of issues caught by golangci-lint
Most of these are probably harmless but a few looked like they might actually be
bugs. Most of them are just faulty tests.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-03-29 11:57:45 +00:00
50fffa2973 pprof: create HTTP endpoint for setting MutexProfileFraction
Allows to dynamically change the MutexProfileFraction to enable and
disable mutex profiling. It should be very useful for detecting
deadlocks, lock contention and general concurrency problems.

How to use:
To enable run: curl -X POST -v 'localhost:5001/debug/pprof-mutex/?fraction=10
To disable: curl -X POST -v 'localhost:5001/debug/pprof-mutex/?fraction=0'

Fraction defines which fraction of events will be profiled. Higher it is
the lower performance impact but less reliable the result.

To fetch the result use:
go tool pprof $PATH_TO_IPFS_BIN http://localhost:5001/debug/pprof/mutex

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-09-26 21:24:49 +02:00