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 #lang scheme
(require (planet jaymccarthy/job-queue) (require (planet jaymccarthy/job-queue)
scheme/system scheme/system
(prefix-in graph-one: "graph.ss")
"config.ss" "config.ss"
"notify.ss" "notify.ss"
"path-utils.ss"
"dirstruct.ss" "dirstruct.ss"
"sema.ss" "sema.ss"
"cache.ss") "cache.ss")
@ -28,17 +28,12 @@
(init-revisions!) (init-revisions!)
(set! start-revision (newest-revision))) (set! start-revision (newest-revision)))
(define rebaser
(rebase-path (plt-data-directory) "/data"))
(define count-sema (make-semaphore 0)) (define count-sema (make-semaphore 0))
(define (make-log! filename) (define (make-log! filename)
(submit-job! (submit-job!
test-workers test-workers
(lambda () (lambda ()
(define prefix
(path-timing-png-prefix filename))
(unless just-graphs? (unless just-graphs?
(notify! "Dropping timing for ~a" filename) (notify! "Dropping timing for ~a" filename)
(apply (apply
@ -55,18 +50,7 @@
(list (list
(path->string filename))))) (path->string filename)))))
(notify! "Generating graph for ~a" filename) (notify! "Generating graph for ~a" filename)
(system*/exit-code (graph-one:main filename)
(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)))
(notify! "Done with ~a" filename) (notify! "Done with ~a" filename)
(semaphore-post count-sema)))) (semaphore-post count-sema))))