2025-03-14 21:59:59 -06:00
|
|
|
# gnomon
|
|
|
|
|
|
|
|
|
|
> Utility to annotate console logging statements with timestamps and find slow processes.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://github.com/paypal/gnomon#options>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Use UNIX (or DOS) pipes to pipe `stdout` of any command through gnomon:
|
|
|
|
|
|
|
|
|
|
`{{npm test}} | gnomon`
|
|
|
|
|
|
|
|
|
|
- Show number of seconds since the start of the process:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`{{npm test}} | gnomon {{[-t|--type]}} elapsed-total`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Show an absolute timestamp in UTC:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`{{npm test}} | gnomon {{[-t|--type]}} absolute`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Use a high threshold of 0.5 seconds, exceeding which the timestamp will be colored bright red:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`{{npm test}} | gnomon {{[-h|--high]}} 0.5`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Use a medium threshold of 0.2 seconds, exceeding which the timestamp will be colored bright yellow:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`{{npm test}} | gnomon {{[-m|--medium]}} 0.2`
|