Megatest

Diff
Login

Differences From Artifact [0961e0974f]:

To Artifact [bfb156a634]:


1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918

1919
1920
1921
1922
1923
1924
1925
  ;; each test is an object in the run component
  ;; each run is a component
  ;; all runs stored in runslib library
  (let ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num)))
    (if tabdat
	(let* ((row-height 10)
	       (drawing    (dboard:tabdat-drawing tabdat))
	       (runslib    (vg:get/create-lib drawing "runslib")))
	  (update-rundat tabdat
			 "%" ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") 
			 100  ;; (dboard:tabdat-numruns tabdat)
			 "%" ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%")
			 ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%")
			 (let ((res '()))
			   (for-each (lambda (key)
				       (if (not (equal? key "runname"))
					   (let ((val (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) key #f)))
					     (if val (set! res (cons (list key val) res))))))
				     (dboard:tabdat-dbkeys tabdat))
			   res))
	  (let ((allruns (dboard:tabdat-allruns tabdat))
		(rowhash (make-hash-table))) ;; store me in tabdat

	    (print "allruns: " allruns)
	    (for-each
	     (lambda (rundat)
	       (if (vector? rundat)
		   (let* ((run      (vector-ref rundat 0))
			  (testsdat  (sort (vector-ref rundat 1)
					   (lambda (a b)







|













|
>







1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
  ;; each test is an object in the run component
  ;; each run is a component
  ;; all runs stored in runslib library
  (let ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num)))
    (if tabdat
	(let* ((row-height 10)
	       (drawing    (dboard:tabdat-drawing tabdat))
	       (runslib    (vg:get/create-lib drawing "runslib"))) ;; creates and adds lib
	  (update-rundat tabdat
			 "%" ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") 
			 100  ;; (dboard:tabdat-numruns tabdat)
			 "%" ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%")
			 ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%")
			 (let ((res '()))
			   (for-each (lambda (key)
				       (if (not (equal? key "runname"))
					   (let ((val (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) key #f)))
					     (if val (set! res (cons (list key val) res))))))
				     (dboard:tabdat-dbkeys tabdat))
			   res))
	  (let ((allruns (dboard:tabdat-allruns tabdat))
		(rowhash (make-hash-table)) ;; store me in tabdat
		(cnv     (dboard:tabdat-cnv tabdat)))
	    (print "allruns: " allruns)
	    (for-each
	     (lambda (rundat)
	       (if (vector? rundat)
		   (let* ((run      (vector-ref rundat 0))
			  (testsdat  (sort (vector-ref rundat 1)
					   (lambda (a b)
1939
1940
1941
1942
1943
1944
1945
1946

1947
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
1980
1981
1982
1983
1984
1985
1986
		     ;; get tests in list sorted by event time ascending
		     (for-each 
		      (lambda (testdat)
			(let* ((event-time   (/ (db:test-get-event_time   testdat) 60.0))
			       (run-duration (/ (db:test-get-run_duration testdat) 60.0))
			       (end-time     (+ event-time run-duration))
			       (test-name    (db:test-get-testname     testdat))
			       (item-path    (db:test-get-item-path    testdat)))

			  (let loop ((rownum 0))
			    (if (dashboard:row-collision rowhash rownum event-time end-time)
				(loop (+ rownum 1))
				(let* ((lly (* rownum row-height))
				       (uly (+ lly row-height)))
				  (dashboard:add-bar rowhash rownum event-time end-time)
				  (vg:add-objs-to-comp runcomp (vg:make-rect event-time lly end-time uly)))))
			  ;; (print "test-name: " test-name " event-time: " event-time " run-duration: " run-duration)
			  ))
		      testsdat)))
	       ;; instantiate the component 
	       (let-values (((sizex sizey sizexmm sizeymm) (canvas-size cnv))
			    ((originx originy)             (canvas-origin cnv)))
		 (let* ((extents (vg:component-get-extents runcomp))
			(llx     (list-ref extents 0))
			(lly     (list-ref extents 1))
			(ulx     (list-ref extents 2))
			(uly     (list-ref extents 3))
			;; move the following into mapping functions in vg.scm
			(deltax  (- llx ulx))
			(scalex  (/ sizex deltax))
			(sllx    (* scalex llx))
			(offx    (- sllx originx))
		   
		 
		 
	       
	       )
	     allruns)
       (vg:drawing-cnv-set! (dboard:tabdat-drawing tabdat)(dboard:tabdat-cnv tabdat)) ;; cnv-obj)
       (canvas-clear! (dboard:tabdat-cnv tabdat)) ;; -obj)
       (vg:draw (dboard:tabdat-drawing tabdat))
       ))
	(print "no tabdat for run-times-tab-updater"))))

(define (dashboard:runs-tab-updater commondat tab-num)
  (let ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num)))
    (update-rundat tabdat (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") (dboard:tabdat-numruns tabdat)
		   (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%")
		   ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%")







|
>









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<

|
|
|
|







1940
1941
1942
1943
1944
1945
1946
1947
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
1980
1981
1982
1983
1984
1985
1986
		     ;; get tests in list sorted by event time ascending
		     (for-each 
		      (lambda (testdat)
			(let* ((event-time   (/ (db:test-get-event_time   testdat) 60.0))
			       (run-duration (/ (db:test-get-run_duration testdat) 60.0))
			       (end-time     (+ event-time run-duration))
			       (test-name    (db:test-get-testname     testdat))
			       (item-path    (db:test-get-item-path    testdat))
			       (test-fullname (conc test-name "/" item-path)))
			  (let loop ((rownum 0))
			    (if (dashboard:row-collision rowhash rownum event-time end-time)
				(loop (+ rownum 1))
				(let* ((lly (* rownum row-height))
				       (uly (+ lly row-height)))
				  (dashboard:add-bar rowhash rownum event-time end-time)
				  (vg:add-objs-to-comp runcomp (vg:make-rect event-time lly end-time uly)))))
			  ;; (print "test-name: " test-name " event-time: " event-time " run-duration: " run-duration)
			  ))
		      testsdat)
		     ;; instantiate the component 
		     (let-values (((sizex sizey sizexmm sizeymm) (canvas-size cnv))
				  ((originx originy)             (canvas-origin cnv)))
		       (let* ((extents (vg:components-get-extents runcomp))
			      (llx     (list-ref extents 0))
			      (lly     (list-ref extents 1))
			      (ulx     (list-ref extents 2))
			      (uly     (list-ref extents 3))
			      ;; move the following into mapping functions in vg.scm
			      (deltax  (- llx ulx))
			      (scalex  (/ sizex deltax))
			      (sllx    (* scalex llx))
			      (offx    (- sllx originx)))
			 (print "llx: " llx " lly: " lly "ulx: " ulx " uly: " uly " deltax: " deltax " scalex: " scalex " sllx: " sllx " offx: " offx)
			 (print " run-full-name: " run-full-name)
			 (vg:instantiate drawing "runslib" run-full-name "wrongname" offx 0 scalex: scalex scaley: 1))))))


	     allruns)
	    (vg:drawing-cnv-set! (dboard:tabdat-drawing tabdat)(dboard:tabdat-cnv tabdat)) ;; cnv-obj)
	    (canvas-clear! (dboard:tabdat-cnv tabdat)) ;; -obj)
	    (vg:draw (dboard:tabdat-drawing tabdat) #t)
	    ))
	(print "no tabdat for run-times-tab-updater"))))

(define (dashboard:runs-tab-updater commondat tab-num)
  (let ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num)))
    (update-rundat tabdat (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") (dboard:tabdat-numruns tabdat)
		   (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%")
		   ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%")