Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor improvements of tg-reporting::print-copiler-diff

  • Loading branch information...
commit e0fdca2a9be524cb32a63400d4aff8c1754d0f72 1 parent 908cebf
@avodonosov avodonosov authored
Showing with 35 additions and 32 deletions.
  1. +1 −1  reporting/README.md
  2. +34 −31 reporting/compiler-diff.lisp
View
2  reporting/README.md
@@ -239,7 +239,7 @@ Lets say we want to compare new version of a compiler with an old version,
to ensure there are no regressions in the new version.
This is easy to do using the tools introduced above. The apporach:
-- select two subsets of results: of the old compiler and of the new one<
+- select two subsets of results: of the old compiler and of the new one
- compute `exclusive-or` of these two subsets
- print the resut as a pivot where results of two compilers
are represented side by side
View
65 reporting/compiler-diff.lisp
@@ -6,41 +6,44 @@
(defun print-compiler-diff (report-file
all-results
- last-quicklisp
- old-lisp new-lisp)
+ quicklisp1
+ lisp1
+ lisp2
+ &optional (quicklisp2 quicklisp1))
"Prints pivot with difference between results
of two copilers - NEW-LISP and OLD-LISP - on the
lib-world specified by LAST-QUICKLISP. The
resulting .html file is save to
reports-generated/<REPORT-FILE>."
- (let* ((new-lisp-results (or (subset all-results
- (lambda (result)
- (and (string= (lib-world result) last-quicklisp)
- (search new-lisp (lisp result)))))
- (cerror "Continue with empty result set."
- "No results found for ~A and ~A."
- new-lisp last-quicklisp)))
- (old-lisp-results (or (subset all-results
- (lambda (result)
- (and (string= (lib-world result) last-quicklisp)
- (search old-lisp (lisp result)))))
- (cerror "Continue with empty result set."
- "No results found for ~A and ~A."
- old-lisp last-quicklisp)))
- (diff (fast-exclusive-or new-lisp-results
- old-lisp-results
+ (let* ((lisp1-results (or (subset all-results
+ (lambda (result)
+ (and (string= (lib-world result) quicklisp1)
+ (search lisp1 (lisp result)))))
+ (cerror "Continue with empty result set."
+ "No results found for ~A and ~A."
+ lisp1 quicklisp1)))
+ (lisp2-results (or (subset all-results
+ (lambda (result)
+ (and (string= (lib-world result) quicklisp2)
+ (search lisp2 (lisp result)))))
+ (cerror "Continue with empty result set."
+ "No results found for ~A and ~A."
+ lisp2 quicklisp2)))
+ (diff (fast-exclusive-or lisp1-results
+ lisp2-results
:test #'equal
:key (lambda (result)
- (list (libname result) (result-spec result)))))
- ;; we can not be sure that (string< old-lisp new-lisp) == t,
- ;; so create another comparator function whch guarantees that
- ;; the old-lisp is always in the left column.
- (two-lisps (list old-lisp new-lisp))
- (lisp-comparator (lambda (lisp-a lisp-b)
- (< (position lisp-a two-lisps :test #'string=)
- (position lisp-b two-lisps :test #'string=)))))
- (print-pivot report-file
- diff
- :rows '((libname string<))
- :cols `((lib-world string>) (lisp ,lisp-comparator))
- :cell-printer #'results-cell-printer)))
+ (list (libname result) (result-spec result))))))
+ ;; We can not be sure that (string< lisp1 lisp2) == t,
+ ;; so create another comparator function whch guarantees that
+ ;; the lisp1 is always in the left column. The same for lib-worlds.
+ (flet ((make-comparator (ordering-list)
+ (lambda (val-a val-b)
+ (< (position val-a ordering-list :test #'string=)
+ (position val-b ordering-list :test #'string=)))))
+ (print-pivot report-file
+ diff
+ :rows '((libname string<))
+ :cols `((lib-world ,(make-comparator (list quicklisp1 quicklisp2)))
+ (lisp ,(make-comparator (list lisp1 lisp2))))
+ :cell-printer #'results-cell-printer))))
Please sign in to comment.
Something went wrong with that request. Please try again.