Megatest

Diff
Login

Differences From Artifact [f0fec9ca36]:

To Artifact [8260cfea21]:


2100
2101
2102
2103
2104
2105
2106
2107


2108
2109
2110

2111

2112

2113
2114


2115
2116
2117
2118
2119
2120
2121
2100
2101
2102
2103
2104
2105
2106

2107
2108
2109
2110
2111
2112

2113
2114
2115
2116

2117
2118
2119
2120
2121
2122
2123
2124
2125







-
+
+



+
-
+

+

-
+
+








(define (db:print-current-query-stats)
  ;; generate stats from *db-api-call-time*
  (let ((ordered-keys (sort (hash-table-keys *db-api-call-time*)
			    (lambda (a b)
			      (let ((sum-a (common:sum (hash-table-ref *db-api-call-time* a)))
				    (sum-b (common:sum (hash-table-ref *db-api-call-time* b))))
				(> sum-a sum-b))))))
				(> sum-a sum-b)))))
	(total        0))
    (for-each
     (lambda (cmd-key)
       (let* ((dat  (hash-table-ref *db-api-call-time* cmd-key))
	      (num  (length dat))
	      (avg  (if (> (length dat) 0)
	      (avg  (if (> num 0)
			(/ (common:sum dat)(length dat)))))
	 (set! total (+ total num))
	 (debug:print-info 0 *default-log-port* cmd-key "\tavg: " avg " max: " (common:max dat) " min: " (common:min-max < dat) " num: " (length dat))))
     ordered-keys)))
     ordered-keys)
    (debug:print-info 0 *default-log-port* "TOTAL: " total " api calls since start.")))

(define (db:get-all-run-ids dbstruct)
  (db:with-db
   dbstruct
   #f
   #f
   (lambda (db)