From 0d774cdfd4c9ccb5d7612eb4dc2dcf26fbd48974 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Thu, 21 Nov 2019 12:50:03 +0300 Subject: [PATCH] multitime: init at 1.4 --- pkgs/tools/misc/multitime/default.nix | 39 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/tools/misc/multitime/default.nix diff --git a/pkgs/tools/misc/multitime/default.nix b/pkgs/tools/misc/multitime/default.nix new file mode 100644 index 00000000000..a46ee2b7c9c --- /dev/null +++ b/pkgs/tools/misc/multitime/default.nix @@ -0,0 +1,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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7a2fb63008e..af339dae4a1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5035,6 +5035,8 @@ in mt-st = callPackage ../tools/backup/mt-st {}; + multitime = callPackage ../tools/misc/multitime { }; + multitran = recurseIntoAttrs (let callPackage = newScope pkgs.multitran; in { multitrandata = callPackage ../tools/text/multitran/data { };