1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
|
;; userdata: (conc "run-id: " run-id))))
(hash-table-set! (dboard:tabdat-path-run-ids tabdat) run-path run-id)
;; (set! colnum (+ colnum 1))
))))
run-ids)))
(define (dashboard:tests-ht->tests-dat tests-ht)
(let ((oldest-item (make-hash-table))) ;;
;; populate the oldest-item table
(for-each
(lambda (tdat)
(let ((tname (db:test-get-testname tdat))
(etime (db:test-get-event_time tdat)))
(if (hash-table-exists? oldest-item tname)
(if (< (hash-table-ref oldest-item tname) etime)
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
|
;; userdata: (conc "run-id: " run-id))))
(hash-table-set! (dboard:tabdat-path-run-ids tabdat) run-path run-id)
;; (set! colnum (+ colnum 1))
))))
run-ids)))
(define (dashboard:tests-ht->tests-dat tests-ht)
(reverse
(sort
(hash-table-values tests-ht)
(lambda (a b)
(let ((a-test-name (db:test-get-testname a))
(a-item-path (db:test-get-item-path a))
(b-test-name (db:test-get-testname b))
(b-item-path (db:test-get-item-path b))
(a-event-time (db:test-get-event_time a))
(b-event-time (db:test-get-event_time b)))
(if (not (equal? a-test-name b-test-name))
(> a-event-time b-event-time)
(cond
((< 0 (string-compare3 a-test-name b-test-name)) #t)
((> 0 (string-compare3 a-test-name b-test-name)) #f)
((< 0 (string-compare3 a-item-path b-item-path)) #t)
(else #f))))))))
#;(let ((oldest-item (make-hash-table))) ;;
;; populate the oldest-item table
(for-each
(lambda (tdat)
(let ((tname (db:test-get-testname tdat))
(etime (db:test-get-event_time tdat)))
(if (hash-table-exists? oldest-item tname)
(if (< (hash-table-ref oldest-item tname) etime)
|
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
|
(b-test-name (db:test-get-testname b))
(b-item-path (db:test-get-item-path b))
(a-event-time (db:test-get-event_time a))
(b-event-time (db:test-get-event_time b)))
(if (equal? a-test-name b-test-name)
(> a-event-time b-event-time)
(> (hash-table-ref oldest-item a-test-name)
(hash-table-ref oldest-item b-test-name)))))))))
;; (if (not (equal? a-test-name b-test-name))
;; (> a-event-time b-event-time)
;; (cond
;; ((< 0 (string-compare3 a-test-name b-test-name)) #t)
;; ((> 0 (string-compare3 a-test-name b-test-name)) #f)
;; ((< 0 (string-compare3 a-item-path b-item-path)) #t)
;; (else #f)))))))))
(define (dashboard:run-id->tests-mindat run-id tabdat runs-hash)
(let* ((run (hash-table-ref/default runs-hash run-id #f))
(key-vals (rmt:get-key-vals run-id))
(testnamepatt (or (dboard:tabdat-test-patts tabdat) "%/%"))
(tests-ht (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals))
(tests-dat (dashboard:tests-ht->tests-dat tests-ht))
|
|
<
|
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
|
(b-test-name (db:test-get-testname b))
(b-item-path (db:test-get-item-path b))
(a-event-time (db:test-get-event_time a))
(b-event-time (db:test-get-event_time b)))
(if (equal? a-test-name b-test-name)
(> a-event-time b-event-time)
(> (hash-table-ref oldest-item a-test-name)
(hash-table-ref oldest-item b-test-name))))))))
;; (if (not (equal? a-test-name b-test-name))
;; (> a-event-time b-event-time)
;; (cond
;; ((< 0 (string-compare3 a-test-name b-test-name)) #t)
;; ((> 0 (string-compare3 a-test-name b-test-name)) #f)
;; ((< 0 (string-compare3 a-item-path b-item-path)) #t)
;; (else #f)))))))))
(define (dashboard:run-id->tests-mindat run-id tabdat runs-hash)
(let* ((run (hash-table-ref/default runs-hash run-id #f))
(key-vals (rmt:get-key-vals run-id))
(testnamepatt (or (dboard:tabdat-test-patts tabdat) "%/%"))
(tests-ht (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals))
(tests-dat (dashboard:tests-ht->tests-dat tests-ht))
|
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
|
(for-each (lambda (ind)
(let* ((name (car ind))
(num (cadr ind))
(key (conc "0:" num)))
(if (not (equal? (iup:attribute run-matrix key) name))
(begin
(set! changed #t)
(iup:attribute-set! run-matrix key name) ;; (list->string (intersperse (string->list name) #\newline))) ;; name)
#;(if (<= num max-col)
(iup:attribute-set! run-matrix "FITTOTEXT" (conc "C" num)))))))
col-indices)
(if (and (eq? pass-num 0) changed)
(loop 1 #t)) ;; force second pass due to column labels changing
;; (debug:print 0 *default-log-port* "runs-summary-updater, changed: " changed " pass-num: " pass-num)
|
|
|
|
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
|
(for-each (lambda (ind)
(let* ((name (car ind))
(num (cadr ind))
(key (conc "0:" num)))
(if (not (equal? (iup:attribute run-matrix key) name))
(begin
(set! changed #t)
(iup:attribute-set! run-matrix key name)
(if (<= num max-col)
(iup:attribute-set! run-matrix "FITTOTEXT" (conc "C" num)))))))
col-indices)
(if (and (eq? pass-num 0) changed)
(loop 1 #t)) ;; force second pass due to column labels changing
;; (debug:print 0 *default-log-port* "runs-summary-updater, changed: " changed " pass-num: " pass-num)
|