buildkite / terminal-to-html

Converts arbitrary shell output (with ANSI) into beautifully rendered HTML
http://buildkite.github.io/terminal-to-html
MIT License
642 stars 45 forks source link

Report resource and processing stats to stderr #129

Closed DrJosh9000 closed 4 months ago

DrJosh9000 commented 4 months ago

More data is needed in order to quantify the impact of changes like #126 on real-world terminal output.

Pass --log-stats-to-stderr, receive JSON object with stats on stderr.

Example:

% cat fixtures/npm.sh.raw | go run ./cmd/terminal-to-html --log-stats-to-stderr > /dev/null 
{"Rtime":19621916,"Utime":21790000,"Stime":7932000,"MaxRSS":24461312,"MinorFaults":1720,"MajorFaults":0,"FSInBlocks":0,"FSOutBlocks":0,"InputBytes":558760,"OutputBytes":933880,"LinesScrolledOut":0,"CursorUpOOB":0,"CursorBackOOB":0,"TotalAlloc":19199720,"HeapAlloc":10241080,"HeapInuse":11411456,"Mallocs":160501,"Frees":136811,"PauseTotalNs":220376,"NumGC":4,"GCCPUFraction":0.019161677967035995}