Megatest

Diff
Login

Differences From Artifact [fac7e9ec69]:

To Artifact [03ba174bc8]:


455
456
457
458
459
460
461
462
463



464
465
466
467
468
469
470

471
472
473
474
475
476
477
455
456
457
458
459
460
461


462
463
464
465
466
467
468
469
470

471
472
473
474
475
476
477
478







-
-
+
+
+






-
+







			    (begin
			      (apply sqlite3:execute stmth (vector->list fromrow))
			      (hash-table-set! numrecs tablename (+ 1 (hash-table-ref/default numrecs tablename 0)))))))
		    fromdat)))
		(sqlite3:finalize! stmth)))
	    (append (list todb) slave-dbs))))
       tbls)
      (let ((runtime (- (current-milliseconds) start-time)))
	(debug:print 0 "INFO: db sync, total run time " runtime " ms")
      (let* ((runtime      (- (current-milliseconds) start-time))
	     (should-print (common:low-noise-print 30 "db sync" (> runtime 500)))) ;; low and high sync times treated as separate.
	(if should-print (debug:print 0 "INFO: db sync, total run time " runtime " ms"))
	(for-each 
	 (lambda (dat)
	   (let ((tblname (car dat))
		 (count   (cdr dat)))
	     (set! tot-count (+ tot-count count))
	     (if (> count 0)
		 (debug:print 0 (format #f "    ~10a ~5a" tblname count)))))
		 (if should-print (debug:print 0 (format #f "    ~10a ~5a" tblname count))))))
	 (sort (hash-table->alist numrecs)(lambda (a b)(> (cdr a)(cdr b))))))
      tot-count)))
  (mutex-unlock! *db-sync-mutex*))

;; options:
;;
;;  'killservers  - kills all servers