Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -1704,10 +1704,21 @@ path) ;; just give up (with-input-from-pipe (conc "/bin/readlink -f " path) (lambda () (read-line))))) + +(define (common:get-intercept onemin fivemin) + (let* ((load-change (- onemin fivemin)) + (tchange (- 300 60))) + (max (+ onemin (* 60 (/ load-change tchange)))0)) +) + +(define (common:get-delay load-in numcpus) + (max (/ (expt 5 (* 4 (/ load-in numcpus))) 10) 0) +) + (define (get-cpu-load #!key (remote-host #f)) (car (common:get-cpu-load remote-host))) ;; (let* ((load-res (process:cmd-run->list "uptime")) ;; (load-rx (regexp "load average:\\s+(\\d+)")) Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -581,11 +581,11 @@ ;; (define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals) (let* ((start-time (current-seconds)) (access-mode (dboard:tabdat-access-mode tabdat)) (num-to-get (string->number (or (configf:lookup *configdat* "setup" "num-tests-to-get") - "200"))) + "50"))) ;; was 200, which is fine in a normal run area. (states (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat))) (statuses (hash-table-keys (dboard:tabdat-status-ignore-hash tabdat))) (do-not-use-db-file-timestamps #t) ;; (configf:lookup *configdat* "setup" "do-not-use-db-file-timestamps")) ;; this still hosts runs-summary-tab (do-not-use-query-timestamps #t) ;; (configf:lookup *configdat* "setup" "do-not-use-query-timestamps")) ;; this no longer troubles runs-summary-tab (sort-info (get-curr-sort)) Index: genexample.scm ================================================================== --- genexample.scm +++ genexample.scm @@ -470,13 +470,13 @@ (print "[ezsteps]") (for-each (lambda (teststep) (let* ((step-name (vector-ref teststep 0))) (print (obfuscate step-name) - " sleep [refdb lookup #{getenv MT_RUN_AREA_HOME}/stepsinfo " + " sleep $(refdb lookup #{getenv MT_RUN_AREA_HOME}/stepsinfo " (obfuscate testname) " $MT_ITEMPATH " - (obfuscate step-name) "]"))) + (obfuscate step-name) ")"))) test-steps) ;; now the requirements section (if testconfig (begin @@ -490,11 +490,11 @@ (else (print key " " val))))) (configf:get-section testconfig "requirements"))) #;(print "WARNING: No testconfig data for " testname ", " item-path)) (print "\n[items]") - (print "THE_ITEM [refdb getrow #{getenv MT_RUN_AREA_HOME}/miscinfo itemsinfo " (obfuscate testname)" | awk '{print $1}']") + (print "THE_ITEM [system refdb getrow #{getenv MT_RUN_AREA_HOME}/miscinfo itemsinfo " (obfuscate testname)" | awk '{print $1}']") ))) ;; fill the stepsrdb (for-each (lambda (teststep)