Megatest

Check-in [2a00bcf6b3]
Login
Overview
Comment:Improvements to graph
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.61
Files: files | file ages | folders
SHA1: 2a00bcf6b3e4d01ff2ec3b4a3044ea8d0a654d08
User & Date: mrwellan on 2016-08-03 16:26:05
Other Links: branch diff | manifest | tags
Context
2016-08-04
10:39
Merged fork check-in: 1fb216bede user: mrwellan tags: v1.61
2016-08-03
16:26
Improvements to graph check-in: 2a00bcf6b3 user: mrwellan tags: v1.61
14:43
Added changes for lines to graph check-in: d681096cd6 user: ritikaag tags: v1.61
Changes

Modified dashboard.scm from [334a650ad8] to [ce8f6c98d5].

2707
2708
2709
2710
2711
2712
2713
2714

2715
2716
2717
2718
2719
2720
2721

2722
2723
2724
2725
2726
2727
2728
2707
2708
2709
2710
2711
2712
2713

2714
2715
2716
2717
2718
2719
2720

2721
2722
2723
2724
2725
2726
2727
2728







-
+






-
+







			 (loop (+ mark time-blk)(+ count 1))))))
    (for-each 
     (lambda (cf)
       (let* ((alldat  (dboard:graph-read-data (cadr cf) tstart tend)))
	 (if alldat
	     (for-each
	      (lambda (fieldn)
		(let* ((dat     (hash-table-ref alldat fieldn ))
		(let* ((dat     (hash-table-ref alldat fieldn))
		       (vals    (map (lambda (x)(vector-ref x 2)) dat)))
		  (if (not (null? vals))
		      (let* ((maxval   (apply max vals))
			     (minval   (apply min vals))
			     (yoff     (- minval lly)) ;;  minval))
			     (deltaval (- maxval minval))
			     (yscale   (/ delta-y (if (eq? deltaval 0) 1 deltaval)))
			     (yscale   (/ delta-y (if (zero? deltaval) 1 deltaval)))
			     (yfunc    (lambda (y)(+ lly (* yscale (- y minval)))))) ;; (lambda (y)(* (+ y yoff) yscale))))
			;; (print (car cf) "; maxval: " maxval " minval: " minval " deltaval: " deltaval " yscale: " yscale)
			(vg:add-obj-to-comp
			 cmp 
			 (vg:make-text-obj (- llx 10)(yfunc maxval) (conc maxval)))
			(vg:add-obj-to-comp
			 cmp 
2887
2888
2889
2890
2891
2892
2893
2894

2895
2896
2897
2898
2899
2900
2901



2902
2903


2904
2905
2906
2907
2908
2909
2910
2887
2888
2889
2890
2891
2892
2893

2894
2895
2896
2897
2898



2899
2900
2901


2902
2903
2904
2905
2906
2907
2908
2909
2910







-
+




-
-
-
+
+
+
-
-
+
+







				       (new-test-objs 
					(let loop ((rownum 0)) ;;  new-run-start-row)) ;; (+ start-row 1)))
					  (if (dashboard:row-collision rowhash rownum event-time end-time)
					      (loop (+ rownum 1))
					      (let* ((title   (if iterated (if compact-layout #f item-path) test-name))
						     (lly     (calc-y rownum)) ;; (- sizey (* rownum row-height)))
						     (uly     (+ lly row-height))
						     (use-end (if (< (- end-time event-time) 3)(+ event-time 3) end-time)) ;; if short grow it a little to give the user something to click on
						     (use-end (if (< (- end-time event-time) 2)(+ event-time 2) end-time)) ;; if short grow it a little to give the user something to click on
						     (obj     (vg:make-rect-obj event-time lly use-end uly
										fill-color: (vg:iup-color->number (car name-color))
										text: title
										font: "Helvetica -10")) 
						     (bar-end (+ 5 (max use-end
									(+ 3 event-time 
									   (if compact-layout
						     (bar-end (max use-end
								   (+ event-time 
								      (if compact-layout
									       0
									       (* (string-length title) 10))))))) ;; 8 pixels per letter
									  1
									  (+ 7 (* (string-length title) 10))))))) ;; 8 pixels per letter
						;; (if iterated
						;;     (dashboard:add-bar rowhash (- rownum 1) event-time end-time num-rows: (+ 1 num-items))
						;; (if (not first-rownum)
						;;     (begin
						;;       (dashboard:row-collision rowhash (- rownum 1) event-time end-time num-rows: num-items)
						;;       (set! first-rownum rownum)))
						(dboard:tabdat-max-row-set! tabdat (max (+ curr-run-start-row rownum)

Modified vg.scm from [5fae70cb5b] to [4c32df4c61].

492
493
494
495
496
497
498
499

500
501
502
503
504
505
506
492
493
494
495
496
497
498

499
500
501
502
503
504
505
506







-
+







	      (let* ((prev-font    (canvas-font cnv))
		     (font-changed (and font (not (equal? font prev-font)))))
		(if font-changed (canvas-font-set! cnv font))
		(canvas-text! cnv (+ 2 llx)(+ 2 lly) text)
		(let-values (((xmax ymax)(canvas-text-size cnv text)))
		  (set! text-xmax xmax)(set! text-ymax ymax))
		(if font-changed (canvas-font-set! cnv prev-font))))))
    (print "text-xmax: " text-xmax " text-ymax: " text-ymax)
    ;; (print "text-xmax: " text-xmax " text-ymax: " text-ymax)
    (if (vg:obj-extents obj)
	(vg:obj-extents obj)
	(if (not text)
	    pts
	    (if (and text-xmax text-ymax)
		(let ((xt (list llx lly
				(max ulx (+ llx text-xmax))
551
552
553
554
555
556
557
558

559
560
561
562
563
564
565
551
552
553
554
555
556
557

558
559
560
561
562
563
564
565







-
+







	      (let* ((prev-font    (canvas-font cnv))
		     (font-changed (and font (not (equal? font prev-font)))))
		(if font-changed (canvas-font-set! cnv font))
		(canvas-text! cnv (+ 2 llx)(+ 2 lly) text)
		(let-values (((xmax ymax)(canvas-text-size cnv text)))
		  (set! text-xmax xmax)(set! text-ymax ymax))
		(if font-changed (canvas-font-set! cnv prev-font))))))
    (print "text-xmax: " text-xmax " text-ymax: " text-ymax)
    ;; (print "text-xmax: " text-xmax " text-ymax: " text-ymax)
    (if (vg:obj-extents obj)
	(vg:obj-extents obj)
	(if (not text)
	    pts
	    (if (and text-xmax text-ymax)
		(let ((xt (list llx lly
				(max ulx (+ llx text-xmax))