about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/multitime/default.nix
blob: a46ee2b7c9c1dce0410fbb6e0e2d22e8a85ba7fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv, fetchFromGitHub, autoreconfHook }:

stdenv.mkDerivation rec {
  pname = "multitime";
  version = "1.4";

  src = fetchFromGitHub {
    owner = "ltratt";
    repo = pname;
    rev = "${pname}-${version}";
    sha256 = "1p6m4gyy6dw7nxnpsk32qiijagmiq9vwch0fbc25qvmybwqp8qc0";
  };

  nativeBuildInputs = [ autoreconfHook ];

  meta = {
    description = "Time command execution over multiple executions";

    longDescription = ''
      Unix's `time` utility is a simple and often effective way of measuring
      how long a command takes to run. Unfortunately, running a command once
      can give misleading timings: the process may create a cache on its first
      execution, running faster subsequently; other processes may cause the
      command to be starved of CPU or IO time; etc. It is common to see people
      run `time` several times and take whichever values they feel most
      comfortable with. Inevitably, this causes problems.

      `multitime` is, in essence, a simple extension to time which runs a
      command multiple times and prints the timing means (with confidence
      intervals), standard deviations, minimums, medians, and maximums having
      done so. This can give a much better understanding of the command's
      performance.
    '';

    license = stdenv.lib.licenses.mit;
    homepage = "https://tratt.net/laurie/src/multitime/";
    platforms = stdenv.lib.platforms.unix;
  };
}