Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

parkghost/log2csv

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

log2csv

Build Status Coverage Status

a simple tool convert Go gctrace to csv

Usage

Usage1: log2csv -i gc.log -o gc.csv
Usage2: GODEBUG=gctrace=1 your-go-program 2>&1 | log2csv -o gc.csv
  -i="stdin": The input file
  -o="stdout": The output file
  -t=true: Add timestamp at line head (the input file must be `stdin`)

Installation

go get github.com/parkghost/log2csv/cmd/log2csv

Example

$ GODEBUG=gctrace=1 godoc -http=:6060  2>&1 | log2csv -o gc.csv
Output
$ head gc.csv
unixtime,numgc,nproc,seq,sweep,mark,wait,heap0,heap1,obj,nmalloc,nfree,goroutines,nspan,nbgsweep,npausesweep,nhandoff,nhandoffcnt,nsteal,nstealcnt,nprocyield,nosyield,nsleep
1421931830.043593,1,1,4,0,123,0,0,0,21,21,0,2,16,0,0,0,0,0,0,0,0,0
1421931830.043797,2,1,0,0,101,0,0,0,40,41,1,3,20,0,0,0,0,0,0,0,0,0
1421931830.043930,3,1,1,0,121,0,0,0,128,144,16,4,30,0,0,0,0,0,0,0,0,0
1421931830.048720,4,1,1,1,129,0,0,0,139,190,51,4,31,0,0,0,0,0,0,0,0,0
1421931830.048840,5,1,0,0,222,0,0,0,179,259,80,4,31,0,0,0,0,0,0,0,0,0
1421931830.049519,6,1,2,0,595,2,0,0,956,1093,137,4,51,0,0,0,0,0,0,0,0,0
1421931830.055207,7,1,2,0,517,0,0,0,2600,3340,740,33,75,1,0,0,0,0,0,0,0,0
1421931830.057955,8,1,1,0,692,0,0,0,4248,6200,1952,116,105,0,0,0,0,0,0,0,0,0
1421931830.059537,9,1,1,0,670,0,0,1,4086,7423,3337,119,113,0,0,0,0,0,0,0,0,0

Author

Brandon Chen

License

This project is licensed under the MIT license

About

A simple tool convert Go gctrace to csv

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages