[Git][cmucl/cmucl][rtoy-issue-87-add-cl-bench] Store the results in our directory instead of /var/tmp
Raymond Toy
gitlab at common-lisp.net
Fri Sep 4 18:03:55 UTC 2020
Raymond Toy pushed to branch rtoy-issue-87-add-cl-bench at cmucl / cmucl
Commits:
f15977bd by Raymond Toy at 2020-09-04T11:03:27-07:00
Store the results in our directory instead of /var/tmp
Adjust where the reports are stored when running the benchmarks and
where the reports are read from.
Instead of /var/tmp, use cl-bench/results. This will make it easier
to find these files in CI.
- - - - -
2 changed files:
- benchmarks/cl-bench/report.lisp
- benchmarks/cl-bench/support.lisp
Changes:
=====================================
benchmarks/cl-bench/report.lisp
=====================================
@@ -14,18 +14,28 @@
(in-package :cl-user)
+(defvar *benchmark-file-directory*
+ (merge-pathnames (make-pathname :directory '(:relative "results"))
+ (make-pathname :directory (pathname-directory *load-truename*)))
+ "Directory where the benchmark report file is stored")
+
(defconstant +implementation+
(concatenate 'string
(lisp-implementation-type) " "
(lisp-implementation-version)))
(defun bench-analysis ()
- (let (data implementations benchmarks)
- (dolist (f (directory "/var/tmp/CL-benchmark*.*"))
+ (let ((benchmark-path (concatenate 'string
+ (namestring *benchmark-file-directory*)
+ "CL-benchmark*.*"))
+ data implementations benchmarks)
+ (dolist (f (directory benchmark-path))
+ (format t "*** f = ~A~%" f)
(ignore-errors
(with-open-file (f f :direction :input)
(let ((*read-eval* nil))
(push (read f) data)))))
+ (format t "*** data = ~A~%" data)
(setq implementations (delete +implementation+ (mapcar #'car data) :test #'string=))
(setq benchmarks (reverse (mapcar #'first (cdr (first data)))))
(format t "~25a~10 at a" "Benchmark" "Reference")
=====================================
benchmarks/cl-bench/support.lisp
=====================================
@@ -21,6 +21,10 @@
(defvar *benchmarks* '())
(defvar *benchmark-results* '())
+(defvar *benchmark-file-directory*
+ (merge-pathnames (make-pathname :directory '(:relative "results"))
+ (make-pathname :directory (pathname-directory *load-truename*)))
+ "Directory where the benchmark report file is stored")
(defvar +implementation+
(concatenate 'string
@@ -117,11 +121,14 @@
(defun benchmark-report-file ()
+ (ensure-directories-exist *benchmark-file-directory*)
(multiple-value-bind (second minute hour date month year)
(get-decoded-time)
(declare (ignore second))
+ ;; Should we use pathnames directly instead of creating a string
+ ;; naming the file?
(format nil "~aCL-benchmark-~d~2,'0d~2,'0dT~2,'0d~2,'0d"
- #+win32 "" #-win32 "/var/tmp/"
+ *benchmark-file-directory*
year month date hour minute)))
;; grr, CLISP doesn't implement ~<..~:>
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/f15977bd7d814fd5ea30cf0884e57cb7eea2d520
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/f15977bd7d814fd5ea30cf0884e57cb7eea2d520
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20200904/90df62c7/attachment-0001.htm>
More information about the cmucl-cvs
mailing list