dsum

command
v3.9.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Command dsum (short for d-summarize) helps keep good developer UX while running a command with potentially noisy output.

Running `dsum SHORTNAME TIMEOUT CMD...` is functionally equivalent to invoking `CMD...` directly, however it provides an enhanced UX.

The motivating command is `docker build`. Building any given Dockerfile can range from really fast (<1s if it is cached) to really really slow (e.g. 15 minutes) if entirely uncached. When the build is really fast, it can be tempting to use the `-q` (quiet) option for `docker build` in order to reduce noise. The trouble is, if you change something early in the Dockerfile or you run the build on a new machine, that `-q` option suddenly appears as the build hanging entirely since it will happily run for the full uncached build time (e.g. 15 minutes) generating no output. Running `dsum 'my build' 3s docker build ...` fixes this problem by behaving like `docker build -q` for any build that is faster than 3 seconds, but behaving like a normal docker build for any build that takes longer than 3 seconds.

Jump to

Keyboard shortcuts

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