Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -209,12 +209,11 @@ (null? (filter (lambda (x)(> x 3)) delta)))) ;; keypatts: ( (KEY1 "abc%def")(KEY2 "%") ) (define (update-rundat runnamepatt numruns testnamepatt keypatts) (let* ((referenced-run-ids '()) - ;; (allruns (db:get-runs *dbstruct-local* runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) - (allruns (rmt:get-runs runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) + (allruns (db:get-runs *dbstruct-local* runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) *start-run-offset* keypatts)) (header (db:get-header allruns)) (runs (db:get-rows allruns)) (result '()) (maxtests 0) @@ -229,12 +228,11 @@ ;; ;; trim runs to only those that are changing often here ;; (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) - ;; (tests (db:get-tests-for-run *dbstruct-local* run-id testnamepatt states statuses - (tests (rmt:get-tests-for-run run-id testnamepatt states statuses + (tests (db:get-tests-for-run *dbstruct-local* run-id testnamepatt states statuses #f #f *hide-not-hide* sort-by sort-order 'shortlist)) Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -156,13 +156,22 @@ (if (and faststart (equal? faststart "no")) (begin (tasks:start-and-wait-for-server (db:delay-if-busy (tasks:open-db)) run-id 10) (thread-sleep! (random 5)) ;; give some time to settle and minimize collison? (rmt:send-receive cmd rid params attemptnum: (+ attemptnum 1))) - (begin - (server:kind-run run-id) - (rmt:open-qry-close-locally cmd run-id params)))) + (let ((start-time (current-milliseconds)) + (max-query (string->number (or (configf:lookup *configdat* "server" "server-query-threshold") + "300"))) + (newres (rmt:open-qry-close-locally cmd run-id params))) + (let ((delta (- (current-milliseconds) start-time))) + (if (> delta max-query) + (begin + (debug:print-info 0 "Starting server as query time " delta " is over the limit of " max-query) + (server:kind-run run-id))) + ;; return the result! + newres) + ))) (begin ;; (debug:print 0 "ERROR: Communication failed!") ;; (mutex-unlock! *send-receive-mutex*) ;; (exit) (rmt:open-qry-close-locally cmd run-id params) Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -142,10 +142,13 @@ # XTERM [system xterm] # RUNDEAD [system exit 56] [server] + +# force use of server always +# required yes # Use http instead of direct filesystem access transport http # transport fs # transport nmsg @@ -160,15 +163,16 @@ # Three minutes is 0.05 hours # timeout 0.025 timeout 0.061 # faststart; unless no, start server but proceed with writes until server started +# faststart no faststart yes # Start server when average query takes longer than this # server-query-threshold 55500 -server-query-threshold 100 +server-query-threshold 1000 timeout 0.01 # daemonize yes # hostname #{scheme (get-host-name)}