summaryrefslogtreecommitdiff
path: root/gnu/packages/benchmark.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-03-30 22:59:53 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-03-30 22:59:53 +0200
commit84157bb8bf2c610584e0836047da4c710f8eaf76 (patch)
treebe5d8c7238e32802221db55a3ee83e7f6a58affb /gnu/packages/benchmark.scm
parentfa63939acba69e11df44073a7eb687bd2ba48349 (diff)
parent03d0aa8b22223b67ec9bbd363c4d5800efdbaf82 (diff)
Merge branch 'master' into core-updates
Most conflicts are from 6fd52309b8f52c9bb59fccffac53e029ce94b698.
Diffstat (limited to 'gnu/packages/benchmark.scm')
-rw-r--r--gnu/packages/benchmark.scm33
1 files changed, 24 insertions, 9 deletions
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index ff5715d578..4dab620993 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -24,7 +24,8 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages linux)
#:use-module (gnu packages maths)
- #:use-module (gnu packages python))
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages storage))
(define-public fio
(package
@@ -64,15 +65,29 @@
(let ((out (assoc-ref outputs "out")))
(zero? (system* "./configure"
(string-append "--prefix=" out))))))
- (add-after
- 'install 'wrap-python-scripts
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (wrap-program (string-append out "/bin/fiologparser_hist.py")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
- #t))))))
+ ;; The main `fio` executable is fairly small and self contained.
+ ;; Moving the auxiliary python and gnuplot scripts to a separate
+ ;; output saves almost 400 MiB on the closure.
+ (add-after 'install 'move-outputs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((oldbin (string-append (assoc-ref outputs "out") "/bin"))
+ (newbin (string-append (assoc-ref outputs "utils") "/bin")))
+ (mkdir-p newbin)
+ (for-each (lambda (file)
+ (let ((src (string-append oldbin "/" file))
+ (dst (string-append newbin "/" file)))
+ (link src dst)
+ (delete-file src)))
+ '("fio2gnuplot" "fio_latency2csv.py"
+ "fiologparser_hist.py" "fiologparser.py"))
+ ;; Make sure numpy et.al is found.
+ (wrap-program (string-append newbin "/fiologparser_hist.py")
+ `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ #t))))))
+ (outputs '("out" "utils"))
(inputs
- `(("libaio" ,libaio)
+ `(("ceph" ,ceph "lib")
+ ("libaio" ,libaio)
("gnuplot" ,gnuplot)
("zlib" ,zlib)
("python-numpy" ,python2-numpy)