https://github.com/afbjorklund/go-test-trace
Renders a trace of a go test report
https://github.com/afbjorklund/go-test-trace
command-line-tool go testing-tools
Last synced: 7 months ago
JSON representation
Renders a trace of a go test report
- Host: GitHub
- URL: https://github.com/afbjorklund/go-test-trace
- Owner: afbjorklund
- License: apache-2.0
- Created: 2021-05-04T05:45:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-20T14:47:35.000Z (about 2 years ago)
- Last Synced: 2025-03-20T02:07:09.679Z (7 months ago)
- Topics: command-line-tool, go, testing-tools
- Language: HTML
- Homepage:
- Size: 1.09 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-test-trace
convert go test report JSON into chrome tracing JSON
`go test -json | go-test-trace`
Example from github.com/vakenbolt/go-test-report:

Example:
[test report.json](test_report.json)### Trace Format
The Trace Event Format is the trace data representation that is processed by the Trace Viewer application.
> The JSON Object Format allows for more flexibility in the data passed to Trace Viewer.
```json
{
"traceEvents": [
{"name": "Asub", "cat": "PERF", "ph": "B", "pid": 22630, "tid": 22630, "ts": 829},
{"name": "Asub", "cat": "PERF", "ph": "E", "pid": 22630, "tid": 22630, "ts": 833}
],
"displayTimeUnit": "ns",
}
```Example:
[test trace.json](test_trace.json)### Trace Viewer
Trace-Viewer is the javascript frontend for Chrome `about:tracing` and Android systrace.
(mirrored at )
It provides rich analysis and visualization capabilities for many types of trace files.
```sh
$CATAPULT/tracing/bin/trace2html my_trace.json --output=my_trace.html
```Example:
[test trace.html](test_trace.html)