Megatest

Diff
Login

Differences From Artifact [548de05864]:

To Artifact [5848497358]:


94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

;; ease debugging by loading ~/.dashboardrc
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc")))
  (if (file-exists? debugcontrolf)
      (load debugcontrolf)))

(define *runremote* #f)
(define *data* (make-vector 25 #f))

(dboard:data-set-run-keys! *data* (make-hash-table))

;; List of test ids being viewed in various panels
(dboard:data-set-curr-test-ids! *data* (make-hash-table))

;; Look up test-ids by (key1 key2 ... testname [itempath])
(dboard:data-set-path-test-ids! *data* (make-hash-table))

;; Look up run-ids by ??
(dboard:data-set-path-run-ids! *data* (make-hash-table))

(dboard:data-set-updaters! *data* (make-hash-table))

(define *other* (make-hash-table))
(define *dbdir* (db:dbfile-path #f *area-dat*))
(define *dbstruct-local*  (make-dbr:dbstruct path:  *dbdir*
					     local: #t))
(define *db-file-path* (db:dbfile-path 0 *area-dat*))

;; HACK ALERT: this is a hack, please fix.
(define *read-only* (not (file-read-access? *db-file-path*)))

(debug:setup)

(define *tim* (iup:timer))
(define *ord* #f)

(iup:attribute-set! *tim* "TIME" 300)







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

;; ease debugging by loading ~/.dashboardrc
(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc")))
  (if (file-exists? debugcontrolf)
      (load debugcontrolf)))

(define *runremote* #f)
;; (define *data* (make-vector 25 #f))
;; 
;; (dboard:data-set-run-keys! *data* (make-hash-table))
;; 
;; ;; List of test ids being viewed in various panels
;; (dboard:data-set-curr-test-ids! *data* (make-hash-table))
;; 
;; ;; Look up test-ids by (key1 key2 ... testname [itempath])
;; (dboard:data-set-path-test-ids! *data* (make-hash-table))
;; 
;; ;; Look up run-ids by ??
;; (dboard:data-set-path-run-ids! *data* (make-hash-table))
;; 
;; (dboard:data-set-updaters! *data* (make-hash-table))
;; 
;; (define *other* (make-hash-table))
;; (define *dbdir* (db:dbfile-path #f *area-dat*))
;; (define *dbstruct-local*  (make-dbr:dbstruct path:  *dbdir*
;; 					     local: #t))
;; (define *db-file-path* (db:dbfile-path 0 *area-dat*))
;; 
;; ;; HACK ALERT: this is a hack, please fix.
;; (define *read-only* (not (file-read-access? *db-file-path*)))

(debug:setup)

(define *tim* (iup:timer))
(define *ord* #f)

(iup:attribute-set! *tim* "TIME" 300)
647
648
649
650
651
652
653
654
655
656
657
658
659

660



661
662
663
664
665
    ;; Yes, running iup:show will pop up a new panel
    ;; (iup:show (main-panel my-window-id))
    (iup:callback-set! *tim*
		       "ACTION_CB"
		       (lambda (x)
			 ;; Want to dedicate no more than 50% of the time to this so skip if
			 ;; 2x delta time has not passed since last query
			 (if (< nextmintime (current-milliseconds))
			     (let* ((starttime (current-milliseconds))
				    (changes   (dcommon:run-update keys data runname keypatts testpatt states statuses 'full my-window-id))
				    (endtime   (current-milliseconds)))
			       (set! nextmintime (+ endtime (* 2 (- endtime starttime))))
			       (debug:print 11 "CHANGE(S): " (car changes) "..."))

			     (debug:print-info 11 "Server overloaded"))))))



;;; main
;;;
(let ((data (make-hash-table))) ;; data will have "areaname" => "area record" entries
  (newdashboard data)
  (iup:main-loop))







|
|
|
|
|
|
>
|
>
>
>





647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
    ;; Yes, running iup:show will pop up a new panel
    ;; (iup:show (main-panel my-window-id))
    (iup:callback-set! *tim*
		       "ACTION_CB"
		       (lambda (x)
			 ;; Want to dedicate no more than 50% of the time to this so skip if
			 ;; 2x delta time has not passed since last query
			 ;; (if (< nextmintime (current-milliseconds))
			 ;;     (let* ((starttime (current-milliseconds))
			 ;;            (changes   '()) ;; (dcommon:run-update keys data runname keypatts testpatt states statuses 'full my-window-id))
			 ;;            (endtime   (current-milliseconds)))
			 ;;       (set! nextmintime (+ endtime (* 2 (- endtime starttime))))
			 ;;       ;; (debug:print 11 "CHANGE(S): " (car changes) "...")
			 ;;       )
			 ;;     (debug:print-info 11 "Server overloaded"))))))
			 ;; pretend to do work ....
			 (thread-sleep! 0.1)
			 ))))
;;; main
;;;
(let ((data (make-hash-table))) ;; data will have "areaname" => "area record" entries
  (newdashboard data)
  (iup:main-loop))