@@ -80,20 +80,20 @@ (define *db* (open-db)) (define toplevel #f) (define dlg #f) (define max-test-num 0) -(define *keys* (get-keys *db*)) +(define *keys* (rdb:get-keys *db*)) (define *dbkeys* (map (lambda (x)(vector-ref x 0)) (append *keys* (list (vector "runname" "blah"))))) (define *header* #f) (define *allruns* '()) (define *buttondat* (make-hash-table)) ;; (define *alltestnamelst* '()) (define *searchpatts* (make-hash-table)) (define *num-runs* 8) -(define *tot-run-count* (db:get-num-runs *db* "%")) +(define *tot-run-count* (rdb:get-num-runs *db* "%")) (define *last-update* (current-seconds)) (define *num-tests* 15) (define *start-run-offset* 0) (define *start-test-offset* 0) (define *examine-test-dat* (make-hash-table)) @@ -121,59 +121,10 @@ (define-inline (dboard:uidat-get-keycol vec)(vector-ref vec 0)) (define-inline (dboard:uidat-get-lftcol vec)(vector-ref vec 1)) (define-inline (dboard:uidat-get-header vec)(vector-ref vec 2)) (define-inline (dboard:uidat-get-runsvec vec)(vector-ref vec 3)) -;; (megatest-dashboard) - -;(define img1 (iup:image/palette 16 16 (u8vector->blob (u8vector -; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 -; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 -; 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 -; 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 -; 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 -; 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 -; 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 -; 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 -; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 0 2 0 2 0 2 2 0 2 2 2 0 0 -; 2 2 2 0 2 0 0 2 0 0 2 0 2 0 2 2 -; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 2 2 -; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 0 0 -; 2 2 2 0 2 0 2 2 0 2 2 0 2 0 2 1)))) -; -;(define img2 (iup:image/palette 16 16 (u8vector->blob (u8vector -; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 -; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 -; 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 -; 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 -; 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 -; 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 -; 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 -; 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 -; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 -; 2 2 2 0 2 0 2 0 2 2 0 2 2 2 0 0 -; 2 2 2 0 2 0 0 2 0 0 2 0 2 0 2 2 -; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 2 2 -; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 0 0 -; 2 2 2 0 2 0 2 2 0 2 2 0 2 0 2 1)))) -; -;(iup:handle-name-set! img1 "img1") -;(iup:attribute-set! img1 "0" "0 0 0") -;(iup:attribute-set! img1 "1" "BGCOLOR") -;(iup:attribute-set! img1 "2" "255 0 0") -; -;(iup:handle-name-set! img2 "img2") -;(iup:attribute-set! img2 "0" "0 0 0") -;(iup:attribute-set! img2 "1" "BGCOLOR") -;(iup:attribute-set! img2 "2" "255 0 0") (define (message-window msg) (iup:show (iup:dialog (iup:vbox @@ -207,11 +158,11 @@ (> *delayed-update* 0)) (begin (set! *please-update-buttons* #t) (set! *last-db-update-time* modtime) (set! *delayed-update* (- *delayed-update* 1)) - (let* ((allruns (db:get-runs *db* runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) + (let* ((allruns (rdb:get-runs *db* runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) *start-run-offset* keypatts)) (header (db:get-header allruns)) (runs (db:get-rows allruns)) (result '()) (maxtests 0) @@ -219,16 +170,16 @@ (statuses (hash-table-keys *status-ignore-hash*))) (debug:print 6 "update-rundat, got " (length runs) " runs") (if (> (+ *last-update* 300) (current-seconds)) ;; every five minutes (begin (set! *last-update* (current-seconds)) - (set! *tot-run-count* (db:get-num-runs *db* runnamepatt)))) + (set! *tot-run-count* (rdb:get-num-runs *db* runnamepatt)))) (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) - (tests (let ((tsts (db-get-tests-for-run *db* run-id testnamepatt itemnamepatt states statuses))) + (tests (let ((tsts (rdb:get-tests-for-run *db* run-id testnamepatt itemnamepatt states statuses))) (if *tests-sort-reverse* (reverse tsts) tsts))) - (key-vals (get-key-vals *db* run-id))) + (key-vals (rdb:get-key-vals *db* run-id))) (if (> (length tests) maxtests) (set! maxtests (length tests))) (if (or (not *hide-empty-runs*) ;; this reduces the data burden when set (not (null? tests))) (set! result (cons (vector run tests key-vals) result))))) @@ -295,22 +246,10 @@ (if (equal? (vector-ref x 1) "") (vector-ref x 0) (conc (vector-ref x 0) "(" (vector-ref x 1) ")"))) vlst-s2))) - ;; (sort newlst (lambda (a b) - ;; (let* ((partsa (string-split a "(")) - ;; (partsb (string-split b "(")) - ;; (lena (length partsa)) - ;; (lenb (length partsb))) - ;; (if (or (and (eq? lena 1)(> lenb 1)) - ;; (and (eq? lenb 1)(> lena 1))) - ;; (if (equal? (car partsa)(car partsb)) ;; same test - ;; (> lenb lena) - ;; #t) - ;; #t)))))) - (define (update-labels uidat) (let* ((rown 0) (keycol (dboard:uidat-get-keycol uidat)) (lftcol (dboard:uidat-get-lftcol uidat)) (numcols (vector-length lftcol))