From 4c7e8c234d7d1729adf7290a8bb761e3a0cc4b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= Date: Fri, 14 Jun 2019 23:07:56 +0200 Subject: gnu: Add benchmark. * gnu/packages/benchmark.scm(benchmark): New variable. * gnu/packages/patches/benchmark-unbundle-googletest.patch: New file. * gnu/local.mk(dist_patch_DATA): Add it. --- gnu/packages/benchmark.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/benchmark.scm') diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index 970df735aa..c513370e74 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; Copyright © 2019 Eric Bavier +;;; Copyright © 2019 Gábor Boskovits ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,7 +26,10 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages linux) #:use-module (gnu packages maths) @@ -193,3 +197,27 @@ extension to @code{time} which runs a command multiple times and prints the timing means, standard deviations, mins, medians, and maxes having done so. This can give a much better understanding of the command's performance.") (license license:expat))) + +(define-public benchmark + (package + (name "benchmark") + (version "1.5.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/benchmark.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0r9dbg4cbk47gwmayys31a83m3y67k0kh1f6pl8i869rbd609ndh")) + (patches (search-patches "benchmark-unbundle-googletest.patch")))) + (build-system cmake-build-system) + (native-inputs + `(("googletest" ,googletest))) + (home-page "https://github.com/google/benchmark") + (synopsis "Microbenchmark support library") + (description + "Benchmark is a library to benchmark code snippets, +similar to unit tests.") + (license license:asl2.0))) -- cgit v1.2.3