https://github.com/coder/gott
go test timer
https://github.com/coder/gott
Last synced: 2 months ago
JSON representation
go test timer
- Host: GitHub
- URL: https://github.com/coder/gott
- Owner: coder
- Created: 2019-07-02T21:30:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-21T20:19:06.000Z (over 5 years ago)
- Last Synced: 2025-02-16T11:56:40.029Z (2 months ago)
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Test Timer
`gott` finds the most time-consuming tests in large suites.
## Install
`go install go.coder.com/gott`
## Example
```
go test -v | gott✔ --- TestA/A 20ms
✔ --- --- TestA/B/BB 10ms
✔ --- TestA/B 20ms 10ms
✔ TestA 40ms 40ms
✖ --- TestB/BigFail 50ms
✖ TestB 10ms 50ms
✖ TOTAL 562ms
```## Usage
```
Usage: gott [flags]Parses go test verbose output and produces a list of tests sorted by how time consuming they are.
gott flags:
-c omit entries that take less than this much time (0s)
-p pass through go test output (false)
```## Parallel Children
`go test` reports how long a test function takes to return. Test functions don't wait on their
parallel children, so it can be difficult to answer the question _"How long did this test and
all of its children take?"_.In `gott`,
The first column of durations show how long the test functions took to return.
The second column shows long it took for all children to return.
## Ranking Algorithm
`gott` orders outputted tests by `max(testTook, childrenTook)`.
The longest test cases are at the bottom to reduce scrolling.