← 返回命令列表

Linux command

gnomon 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Prepend elapsed time

[command] | gnomon

Show total elapsed time

[command] | gnomon --type=elapsed-total

Show absolute timestamps

[command] | gnomon --type=absolute

Highlight lines

[command] | gnomon --high=1.5

Set both high and medium

[command] | gnomon --high=3.0 --medium=1.0

Ignore lines

[command] | gnomon --ignore-blank --high=0.5

说明

gnomon is a command-line utility that prepends timestamp information to the output of another command, piped through stdin. By default, it shows how long each line of output took to appear, making it useful for identifying slow steps in build processes, test suites, or log output. The tool color-codes output based on configurable time thresholds: lines exceeding the --high threshold are shown in red, those exceeding --medium in yellow, and the rest in the default color.

参数

--type _TYPE_
Timestamp type: elapsed-line (default), elapsed-total, or absolute.
--ignore-blank
Do not prepend timestamps to blank lines.
--real-time _THRESHOLD_
Set a threshold in seconds after which gnomon prints output in real time rather than buffering.
--high _SECONDS_
Threshold in seconds for high (red) time coloring. Default: 1.0.
--medium _SECONDS_
Threshold in seconds for medium (yellow) time coloring. Default: 0.5.
--help
Display help information.

FAQ

What is the gnomon command used for?

gnomon is a command-line utility that prepends timestamp information to the output of another command, piped through stdin. By default, it shows how long each line of output took to appear, making it useful for identifying slow steps in build processes, test suites, or log output. The tool color-codes output based on configurable time thresholds: lines exceeding the --high threshold are shown in red, those exceeding --medium in yellow, and the rest in the default color.

How do I run a basic gnomon example?

Run `[command] | gnomon` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --type _TYPE_ do in gnomon?

Timestamp type: elapsed-line (default), elapsed-total, or absolute.