40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
|
(record (if tmprec tmprec
(let ((v (vector (current-seconds) 0)))
(hash-table-set! *write-frequency* run-id v)
v)))
(count (+ 1 (vector-ref record 1)))
(start (vector-ref record 0)))
(vector-set! record 1 count)
(if (and (> count 1)
(if (and (> count 10)
(< (/ (- (current-seconds) start)
count) ;; seconds per count
10))
(begin
(debug:print-info 1 "db write rate too high, starting a server")
#t)
#f)))) ;; less than 10 seconds per count - start up a server
|