Megatest

Check-in [e13bddd3c6]
Login
Overview
Comment:dashboard compiles now
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.61
Files: files | file ages | folders
SHA1: e13bddd3c6ba7cde91dfb38cfe70098a36f26c07
User & Date: matt on 2016-07-15 00:18:27
Other Links: branch diff | manifest | tags
Context
2016-07-16
06:19
Tests now show up on time line check-in: 9aaa15bf91 user: matt tags: v1.61
2016-07-15
00:18
dashboard compiles now check-in: e13bddd3c6 user: matt tags: v1.61
2016-07-14
23:31
Fixed getting extents check-in: e32e49b9ab user: matt tags: v1.61
Changes

Modified dashboard.scm from [0961e0974f] to [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
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")))
	       (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
		(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
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)))
			       (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: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))
		   
		 
		 
		      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))
       ))
	    (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" "%")

Modified vg-test.scm from [af708285e8] to [9e155d6a1a].

38
39
40
41
42
43
44
45
46


47
48
49
50
51
52
53
38
39
40
41
42
43
44


45
46
47
48
49
50
51
52
53







-
-
+
+








;; get extents of all objects and put rectangle around it
;;
(define big-xtnts (vg:instances-get-extents d1))
(vg:add-objs-to-comp c2 (apply vg:make-rect big-xtnts))
(vg:instantiate d1 "firstlib" "secondcomp" "inst3" 0 0)

(vg:drawing-scalex-set! d1 1.8)
(vg:drawing-scaley-set! d1 1.1)
(vg:drawing-scalex-set! d1 1.5)
(vg:drawing-scaley-set! d1 1.5)

(define cnv #f)
(define the-cnv (canvas 
		 #:size "500x400"
		 #:expand "YES"
		 #:scrollbar "YES"
		 #:posx "0.5"

Modified vg.scm from [12a91a7e84] to [873f3428fe].

244
245
246
247
248
249
250
251

252
253
254
255
256
257
258
244
245
246
247
248
249
250

251
252
253
254
255
256
257
258







-
+







;; Unravel and draw the objects
;;======================================================================

;; with get-extents = #t return the extents
;; with draw = #f don't actually draw the object
;;
(define (vg:draw-obj drawing obj #!key (draw #t))
  (print "obj type: " (vg:obj-type obj))
  ;; (print "obj type: " (vg:obj-type obj))
  (case (vg:obj-type obj)
    ((r)(vg:draw-rect drawing obj draw: draw))))

;; given a rect obj draw it on the canvas applying first the drawing
;; scale and offset
;;
(define (vg:draw-rect drawing obj #!key (draw #t))
270
271
272
273
274
275
276
277

278
279
280

281
282

283
284
285
286
287
288
270
271
272
273
274
275
276

277
278
279

280
281

282
283
284
285
286
287
288







-
+


-
+

-
+






	(res   '()))
    (for-each 
     (lambda (instname)
       (let* ((inst     (hash-table-ref insts instname))
	      (libname  (vg:inst-libname inst))
	      (compname (vg:inst-compname inst))
	      (comp     (vg:get-component drawing libname compname)))
	 (print "comp: " comp)
	 ;; (print "comp: " comp)
	 (for-each
	  (lambda (obj)
	    (print "obj: " (vg:obj-pts obj))
	    ;; (print "obj: " (vg:obj-pts obj))
	    (let ((obj-xfrmd (vg:map-obj drawing inst obj)))
	      (print "obj-xfrmd: " (vg:obj-pts obj-xfrmd))
	      ;; (print "obj-xfrmd: " (vg:obj-pts obj-xfrmd))
	      (set! res (cons (vg:draw-obj drawing obj-xfrmd draw: draw-mode) res)))) ;;
	  (vg:comp-objs comp))))
     (if (null? instnames)
	 (hash-table-keys insts)
	 instnames))
    res)) ;;  (hash-table-values insts))))