Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixge/gotraceanalyzer
Command gotraceanalyzer turns golang tracebacks into useful summaries.
https://github.com/felixge/gotraceanalyzer
Last synced: about 2 months ago
JSON representation
Command gotraceanalyzer turns golang tracebacks into useful summaries.
- Host: GitHub
- URL: https://github.com/felixge/gotraceanalyzer
- Owner: felixge
- Created: 2014-04-17T12:25:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-04-21T21:10:51.000Z (over 10 years ago)
- Last Synced: 2024-10-11T15:19:21.483Z (2 months ago)
- Language: Go
- Homepage:
- Size: 148 KB
- Stars: 14
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gotraceanlyzer
Command gotraceanalyzer turns golang tracebacks into useful summaries.
If you ever starred at a go panic that showed thousands of active goroutines,
this tool will help you to make more sense of it.Summaries are created by grouping goroutines that share a common scheduler
state and trace (as determined by file locations) together.## Install
```bash
$ go get github.com/felixge/gotraceanalyzer
```## Usage
Analyze a traceback from a file:
```bash
$ gotraceanalyzer mypanic.txt
```Or use stdin:
```bash
$ gotraceanalyzer < mypanic.txt
```## Example
``` bash
$ curl -s https://raw.githubusercontent.com/felixge/gotraceanalyzer/master/example/output.txt | gotraceanalyzer
Showing 6 unique goroutines out of 230 total:100 goroutines [sleep]:
time.Sleep(0x3b9aca00)
/usr/local/go/src/pkg/runtime/time.goc:31 +0x31
main.Sleep()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:44 +0x26
main.D()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:40 +0x1a
main.C()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:36 +0x1a
main.B()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:32 +0x1a
main.A()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:28 +0x1a
created by main.main
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:9 +0x3750 goroutines [sleep]:
time.Sleep(0x3b9aca00)
/usr/local/go/src/pkg/runtime/time.goc:31 +0x31
main.Sleep()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:44 +0x26
main.D()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:40 +0x1a
main.C()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:36 +0x1a
main.B()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:32 +0x1a
created by main.main
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:11 +0x6434 goroutines [sleep]:
time.Sleep(0x3b9aca00)
/usr/local/go/src/pkg/runtime/time.goc:31 +0x31
main.Sleep()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:44 +0x26
main.D()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:40 +0x1a
main.C()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:36 +0x1a
created by main.main
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:14 +0xab25 goroutines [sleep]:
time.Sleep(0x3b9aca00)
/usr/local/go/src/pkg/runtime/time.goc:31 +0x31
main.Sleep()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:44 +0x26
main.D()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:40 +0x1a
created by main.main
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:17 +0xdc20 goroutines [sleep]:
time.Sleep(0x3b9aca00)
/usr/local/go/src/pkg/runtime/time.goc:31 +0x31
main.Sleep()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:44 +0x26
created by main.main
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:20 +0x1221 goroutines [running]:
goroutine 1 [running]:
runtime.panic(0x26aa0, 0x2100e1050)
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
main.main()
/Users/felix/code/go/src/github.com/felixge/gotraceanalyzer/example/main.go:24 +0x184
```## TODO
* Support ignoring unrelated lines (useful if traceback got mixed up with log messages)
## License
MIT.