sumtimes

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 7 Imported by: 0

README

sumtimes

Sum the outputs of gnu time -p

E.g. you want to time multiple stages of a pipeline and sum them to get an overall runtime:

❯ time -p -o foo.time sleep 2
❯ time -p -o bar.time sleep 12

❯ cat foo.time
real 2.01
user 0.00
sys 0.00

❯ cat bar.time
real 12.00
user 0.00
sys 0.00

❯ sumtimes foo.time bar.time
real 14.01s
user 0s
sys  0s

Installation

If you haven't already, install go,

then either:

❯ go install github.com/benjamincjackson/sumtimes

(might get built in ~/go/bin/)

or:

❯ git clone https://github.com/benjamincjackson/sumtimes.git
❯ cd sumtimes
❯ go build -o sumtimes

(gets built in the current working directory)

Help

❯ sumtimes -h
Sum the outputs of gnu time -p

e.g.:

time -p -o foo.time echo "foo"
time -p -o bar.time echo "bar"

sumtimes foo.time bar.time

Usage:
  sumtimes [flags]

Flags:
  -h, --help      help for sumtimes
      --human     print time in human readable format
  -v, --version   version for sumtimes

License / dependencies / acknowledgements

sumtimes is distributed under the MIT license

It incorporates other software distributed under licence:

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL