Easier graph maker

This commit is contained in:
Jay McCarthy 2010-11-05 13:24:10 -06:00
parent 3de1b31eaf
commit aaf7e32a11
2 changed files with 28 additions and 18 deletions

View File

@ -0,0 +1,26 @@
#lang scheme
(require scheme/system
"config.ss"
"path-utils.ss"
"dirstruct.ss")
(define rebaser
(rebase-path (plt-data-directory) "/data"))
(define (main filename)
(define prefix
(path-timing-png-prefix filename))
(system*/exit-code
(path->string
(build-path (plt-directory) "plt" "bin" "mred-text"))
"-t"
(path->string (build-path (drdr-directory) "graphs" "build-graph.ss"))
"--"
"-l" (string-append "http://drdr.racket-lang.org/~a/" (path->string* filename)) ; XXX
"--image-loc" "/graph-images/"
(path->string (path-timing-log filename))
(path->string prefix)
(path->string (rebaser prefix))
(path->string (path-timing-html filename))))
(provide main)

View File

@ -1,9 +1,9 @@
#lang scheme
(require (planet jaymccarthy/job-queue)
scheme/system
(prefix-in graph-one: "graph.ss")
"config.ss"
"notify.ss"
"path-utils.ss"
"dirstruct.ss"
"sema.ss"
"cache.ss")
@ -28,17 +28,12 @@
(init-revisions!)
(set! start-revision (newest-revision)))
(define rebaser
(rebase-path (plt-data-directory) "/data"))
(define count-sema (make-semaphore 0))
(define (make-log! filename)
(submit-job!
test-workers
(lambda ()
(define prefix
(path-timing-png-prefix filename))
(unless just-graphs?
(notify! "Dropping timing for ~a" filename)
(apply
@ -55,18 +50,7 @@
(list
(path->string filename)))))
(notify! "Generating graph for ~a" filename)
(system*/exit-code
(path->string
(build-path (plt-directory) "plt" "bin" "mred-text"))
"-t"
(path->string (build-path (drdr-directory) "graphs" "build-graph.ss"))
"--"
"-l" (string-append "http://drdr.racket-lang.org/~a/" (path->string* filename)) ; XXX
"--image-loc" "/graph-images/"
(path->string (path-timing-log filename))
(path->string prefix)
(path->string (rebaser prefix))
(path->string (path-timing-html filename)))
(graph-one:main filename)
(notify! "Done with ~a" filename)
(semaphore-post count-sema))))