Skip to main content

Execution Time

Whatโ€‹

Displays the execution time of the previously executed command.

Sample Configurationโ€‹

{
"type": "executiontime",
"style": "powerline",
"powerline_symbol": "๎‚ฐ",
"foreground": "#ffffff",
"background": "#8800dd",
"template": " <#fefefe>๎ฎข</> {{ .FormattedMs }} ",
"properties": {
"threshold": 500,
"style": "austin",
"always_enabled": true
}
}

Propertiesโ€‹

NameTypeDefaultDescription
always_enabledbooleanfalsealways show the duration
thresholdnumber500minimum duration (milliseconds) required to enable this segment
styleenumaustinone of the available format options

Styleโ€‹

Style specifies the format in which the time will be displayed. The table below shows some example times in each option.

format0.001s2.1s3m2.1s4h3m2.1s
austin1ms2.1s3m 2.1s4h 3m 2.1s
roundrock1ms2s 100ms3m 2s 100ms4h 3m 2s 100ms
dallas0.0012.13:2.14:3:2.1
galveston00:00:0000:00:0200:03:0204:03:02
galvestonms00:00:00:00100:00:02:10000:03:02:10004:03:02:100
houston00:00:00.00100:00:02.100:03:02.104:03:02.1
amarillo0.001s2.1s182.1s14,582.1s
round1ms2s3m 2s4h 3m
lucky7ย ย ย ย 1msย 2.00sย ย 3m ย 2sย 4h ย 3m

Template (info)โ€‹

default template
{{ .FormattedMs }}

Propertiesโ€‹

NameTypeDescription
.Msnumberthe execution time in milliseconds
.FormattedMsstringthe formatted value based on the style above