Megatest

Diff
Login

Differences From Artifact [d651eae42e]:

To Artifact [f77a47f8db]:


470
471
472
473
474
475
476
477


478
479
480
481
482
483
484
;; This is roughly the same as dboard:get-tests-dat, should merge them if possible
;;
;; gets all the tests for run-id that match testnamepatt and key-vals, merges them
;;
;;    NOTE: Yes, this is used
;;
(define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals)
  (let* ((num-to-get  100)


	 (states      (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat)))
	 (statuses    (hash-table-keys (dboard:tabdat-status-ignore-hash tabdat)))
	 (sort-info   (get-curr-sort))
	 (sort-by     (vector-ref sort-info 1))
	 (sort-order  (vector-ref sort-info 2))
	 (bubble-type (if (member sort-order '(testname))
			  'testname







|
>
>







470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
;; This is roughly the same as dboard:get-tests-dat, should merge them if possible
;;
;; gets all the tests for run-id that match testnamepatt and key-vals, merges them
;;
;;    NOTE: Yes, this is used
;;
(define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals)
  (let* ((num-to-get  (let ((n (configf:lookup *configdat* "dashboard" "num-to-get")))
			(if n (string->number n)
			    30)))
	 (states      (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat)))
	 (statuses    (hash-table-keys (dboard:tabdat-status-ignore-hash tabdat)))
	 (sort-info   (get-curr-sort))
	 (sort-by     (vector-ref sort-info 1))
	 (sort-order  (vector-ref sort-info 2))
	 (bubble-type (if (member sort-order '(testname))
			  'testname
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
	 (use-new    (dboard:tabdat-hide-not-hide tabdat))
	 (tests-ht   (if (dboard:tabdat-filters-changed tabdat)
			 (let ((ht (make-hash-table)))
			   (dboard:rundat-tests-set! run-dat ht)
			   ht)
			 (dboard:rundat-tests run-dat)))
	 (start-time (current-seconds)))

    ;; to limit the amount of data transferred each cycle use limit of num-to-get and offset
    (dboard:rundat-run-data-offset-set! 
     run-dat 
     (if (< (length tmptests) num-to-get)
	 0
	 (let ((newval (+ num-to-get (dboard:rundat-run-data-offset run-dat))))
	   ;; (print "Incremental get, offset=" (dboard:rundat-run-data-offset run-dat) " retrieved: " (length tmptests) " newval: " newval)







|







514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
	 (use-new    (dboard:tabdat-hide-not-hide tabdat))
	 (tests-ht   (if (dboard:tabdat-filters-changed tabdat)
			 (let ((ht (make-hash-table)))
			   (dboard:rundat-tests-set! run-dat ht)
			   ht)
			 (dboard:rundat-tests run-dat)))
	 (start-time (current-seconds)))
    ;; (dashboard:set-db-update-time tabdat) ;; indicate that we did read the db at this time
    ;; to limit the amount of data transferred each cycle use limit of num-to-get and offset
    (dboard:rundat-run-data-offset-set! 
     run-dat 
     (if (< (length tmptests) num-to-get)
	 0
	 (let ((newval (+ num-to-get (dboard:rundat-run-data-offset run-dat))))
	   ;; (print "Incremental get, offset=" (dboard:rundat-run-data-offset run-dat) " retrieved: " (length tmptests) " newval: " newval)
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
                                        (db-pth (conc db-dir "/" run-id ".db")))
                                   (hash-table-set! (dboard:tabdat-run-db-paths tabdat) run-id db-pth)
                                   db-pth)))
               (tests-dat    (if (or (not run-id)
                                     (configf:lookup *configdat* "setup" "do-not-use-db-file-timestamps")
                                     (not (hash-table-exists? (dboard:tabdat-last-test-dat tabdat) run-id))
                                     (>= (file-modification-time db-path) last-update))
                                 (dboard:get-tests-dat tabdat run-id last-update)
                                 (hash-table-ref (dboard:tabdat-last-test-dat tabdat) run-id)))
               (tests-mindat (dcommon:minimize-test-data tests-dat))
               (indices      (common:sparse-list-generate-index tests-mindat)) ;;  proc: set-cell))
               (row-indices  (cadr indices))
               (col-indices  (car indices))
               (max-row      (if (null? row-indices) 1 (common:max (map cadr row-indices))))
               (max-col      (if (null? col-indices) 1 (common:max (map cadr col-indices))))







|







1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
                                        (db-pth (conc db-dir "/" run-id ".db")))
                                   (hash-table-set! (dboard:tabdat-run-db-paths tabdat) run-id db-pth)
                                   db-pth)))
               (tests-dat    (if (or (not run-id)
                                     (configf:lookup *configdat* "setup" "do-not-use-db-file-timestamps")
                                     (not (hash-table-exists? (dboard:tabdat-last-test-dat tabdat) run-id))
                                     (>= (file-modification-time db-path) last-update))
                                 (dboard:get-tests-dat tabdat run-id 0) ;; last-update) ;; DO NOT USE last-update yet. Need to redesign this to use dboard:get-tests-for-run-duplicate
                                 (hash-table-ref (dboard:tabdat-last-test-dat tabdat) run-id)))
               (tests-mindat (dcommon:minimize-test-data tests-dat))
               (indices      (common:sparse-list-generate-index tests-mindat)) ;;  proc: set-cell))
               (row-indices  (cadr indices))
               (col-indices  (car indices))
               (max-row      (if (null? row-indices) 1 (common:max (map cadr row-indices))))
               (max-col      (if (null? col-indices) 1 (common:max (map cadr col-indices))))