diff --git a/egg-herbie/info.rkt b/egg-herbie/info.rkt index b4818fe6d..5ed7dfab0 100644 --- a/egg-herbie/info.rkt +++ b/egg-herbie/info.rkt @@ -1,7 +1,7 @@ #lang info (define collection "egg-herbie") -(define version "1.6") +(define version "2.0") (define pkg-desc "Racket bindings for simplifying math expressions using egg") (define pkg-authors diff --git a/src/config.rkt b/src/config.rkt index 118531721..d366ad2e3 100644 --- a/src/config.rkt +++ b/src/config.rkt @@ -122,7 +122,7 @@ (if (equal? out "") default out)) default)) -(define *herbie-version* "1.6") +(define *herbie-version* "2.0") (define *hostname* (run-command "hostname")) diff --git a/src/datafile.rkt b/src/datafile.rkt index 59f48faaa..d7a5f438c 100644 --- a/src/datafile.rkt +++ b/src/datafile.rkt @@ -46,7 +46,9 @@ #:unless (null? cost-accuracy)) (match cost-accuracy [(list (list _ initial-accuracy) _ _) initial-accuracy]))]) - (exact->inexact (- 1 (/ initial-accuracies-sum maximum-accuracy))))) + (if (> maximum-accuracy 0) + (exact->inexact (- 1 (/ initial-accuracies-sum maximum-accuracy))) + 1.0))) (define rescaled (for/list ([cost-accuracy (in-list cost-accuracies)] #:unless (null? cost-accuracy)) diff --git a/src/info.rkt b/src/info.rkt index defafdebc..2a3de29a0 100644 --- a/src/info.rkt +++ b/src/info.rkt @@ -1,7 +1,7 @@ #lang info (define collection "herbie") -(define version "1.6") +(define version "2.0") ;; Packaging information @@ -28,7 +28,7 @@ "profile-lib" "rackunit-lib" "web-server-lib" - ("egg-herbie" #:version "1.6") + ("egg-herbie" #:version "2.0") ("rival" #:version "1.7") ("fpbench" #:version "2.0.3"))) diff --git a/src/web/pages.rkt b/src/web/pages.rkt index 4430fd4b6..6f14c2dfe 100644 --- a/src/web/pages.rkt +++ b/src/web/pages.rkt @@ -35,7 +35,7 @@ ["interactive.js" (make-interactive-js result out ctx)] ["timeline.html" - (make-timeline (test-name test) (job-result-timeline result) out)] + (make-timeline (test-name test) (job-result-timeline result) out #:path "..")] ["timeline.json" (write-json (job-result-timeline result) out)] ["points.json" diff --git a/src/web/resources/report.css b/src/web/resources/report.css index 2898cf7a8..fb4a58771 100644 --- a/src/web/resources/report.css +++ b/src/web/resources/report.css @@ -228,10 +228,8 @@ section { display: flow-root; } /* Process / debug info */ -#process-info { background: #ddd; } +#process-info { background: #ddd; padding: 0; } #process-info p.header { font-size: 110%; padding: 1em 1em .5em; margin: 0; } -#process-info p.header .attachment { float: right; margin: 0 0 0 1em; } -#process-info > p { margin: 1em .75em 0; } .timeline { height: 2em; border: 1px solid #888; border-width: 1px 0px; margin-bottom: 1em; diff --git a/src/web/run.rkt b/src/web/run.rkt index bb7b3d9d3..aa5ae9e40 100644 --- a/src/web/run.rkt +++ b/src/web/run.rkt @@ -74,7 +74,7 @@ (call-with-output-file (build-path dir "timeline.html") #:exists 'replace - (λ (out) (make-timeline "Herbie run" timeline out #:info info))) + (λ (out) (make-timeline "Herbie run" timeline out #:info info #:path "."))) ; Delete old files (let* ([expected-dirs (map string->path (filter identity (map table-row-link (report-info-tests info))))] diff --git a/src/web/timeline.rkt b/src/web/timeline.rkt index 211050dac..1bbc6fc2f 100644 --- a/src/web/timeline.rkt +++ b/src/web/timeline.rkt @@ -8,7 +8,7 @@ ;; This first part handles timelines for a single Herbie run -(define (make-timeline name timeline out #:info [info #f]) +(define (make-timeline name timeline out #:info [info #f] #:path [path "."]) (fprintf out "\n") (write-xexpr `(html @@ -20,6 +20,7 @@ (body ,(render-menu (~a name) + #:path path (if info `(("Report" . "index.html")) `(("Details" . "graph.html")))) @@ -32,7 +33,6 @@ (-> timeline? xexpr?) (define time (apply + (map (curryr dict-ref 'time) timeline))) `(section ([id "process-info"]) - (h1 "Details") (p ((class "header")) "Time bar (total: " (span ((class "number")) ,(format-time time)) ")") (div ((class "timeline")) diff --git a/www/doc/2.0/using-cli.html b/www/doc/2.0/using-cli.html index e1c67d4b0..123144fb3 100644 --- a/www/doc/2.0/using-cli.html +++ b/www/doc/2.0/using-cli.html @@ -72,7 +72,7 @@