Commit f15977bd authored by Raymond Toy's avatar Raymond Toy
Browse files

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.
parent 22b8fc9f
Pipeline #1800 passed with stage
in 11 minutes and 43 seconds
......@@ -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@a" "Benchmark" "Reference")
......
......@@ -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 ~<..~:>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment