Giter Site home page Giter Site logo

trace-events's Introduction

trace-events

Trace-events parses event information from trace.out (output by runtime/trace) and outputs it to csv.

Who is it for?

  • Beginning Go users unfamiliar with goroutine
  • People who have too much information in go tool trace

Usage

  1. Run your Go program and get trace.out (see official documentation for how to output trace.out).
  2. Copy trace.out to the trace-events directory.
  3. Execute main.go (go run . or go run main.go).
  4. You will get output.csv.

Output Csv Format

  • The first column represents the timestamp.
  • The second and subsequent columns represent event information for each goroutine.
  • The first line shows the id of the goroutine.

Caution

  • This program has been tested only on go1.20.5.
  • It is very likely that other versions will not work because this program uses a copy-paste of go's internal process.

Example Output

,18,0,2,3,4,17,1,19
0,,GoCreate,,,,,Created,
2942,,GoCreate,Created,,,,,
3026,,,GoWaiting,,,,,
5635,,GoCreate,,Created,,,,
5663,,,,GoWaiting,,,,
5857,,GoCreate,,,Created,,,
5913,,,,,GoWaiting,,,
6107,,GoCreate,,,,Created,,
6163,,,,,,GoWaiting,,
6218,,ProcStart,,,,,,
6329,,,,,,,GoStart,
8023,,,,,,,Gomaxprocs,
31676,Created,,,,,,GoCreate,
39616,,,,,,,GoCreate,Created
43030,,,,,,,GoBlockRecv,
51276,,,,,,,,GoStart
51692,,,,,,,Unblocked,GoUnblock
58799,,,,,,,,GoEnd
59299,,,,,,,GoStart,
66878,,,,,,,HeapAlloc,
80398,,,,,,,GoSysCall,
81758,,ProcStart,,,,,,
87644,GoStart,,,,,,,
89226,GoSysCall,,,,,,,
102940,,ProcStart,,,,,,
104051,GoSysBlock,,,,,,,
104245,,ProcStop,,,,,,
105050,,ProcStop,,,,,,
117321,,,,,,,GoSched,
18 0 2 3 4 17 1 19
0 GoCreate Created
2942 GoCreate Created
3026 GoWaiting
5635 GoCreate Created
5663 GoWaiting
5857 GoCreate Created
5913 GoWaiting
6107 GoCreate Created
6163 GoWaiting
6218 ProcStart
6329 GoStart
8023 Gomaxprocs
31676 Created GoCreate
39616 GoCreate Created
43030 GoBlockRecv
51276 GoStart
51692 Unblocked GoUnblock
58799 GoEnd
59299 GoStart
66878 HeapAlloc
80398 GoSysCall
81758 ProcStart
87644 GoStart
89226 GoSysCall
102940 ProcStart
104051 GoSysBlock
104245 ProcStop
105050 ProcStop
117321 GoSched
  • The content of the cell represents an event (the content of the event is defined in internal/trace)
  • Information written in the goroutines that are the target of the event, such as "Created", "Unblocked", etc., is added by trace-events.

License

MIT

trace-events's People

Contributors

zukain5 avatar

Stargazers

mado avatar

Watchers

 avatar

trace-events's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.