Megatest

Diff
Login

Differences From Artifact [f0ffc3a3a5]:

To Artifact [846662f97b]:


344
345
346
347
348
349
350
351
352
353
354
355
356

357
358
359
360
361
362
363
364
365
366
344
345
346
347
348
349
350






351



352
353
354
355
356
357
358







-
-
-
-
-
-
+
-
-
-







(if (args:get-arg "-itempatt")
    (let ((newval (conc (args:get-arg "-testpatt") "/" (args:get-arg "-itempatt"))))
      (debug:print 0 "WARNING: -itempatt has been deprecated, please use -testpatt testpatt/itempatt method, new testpatt is "newval)
      (hash-table-set! args:arg-hash "-testpatt" newval)
      (hash-table-delete! args:arg-hash "-itempatt")))

(on-exit (lambda ()
	   (debug:print 18 "DB Stats")
	   (debug:print 18 "Cmd\tCount\tTot time\tAvg")
	   (for-each (lambda (cmd)
		       (let ((cmd-dat (hash-table-ref *db-stats* cmd)))
			 (debug:print 18 cmd "\t" (vector-ref cmd-dat 0) "\t" (vector-ref cmd-dat 1) "\t" (/ (vector-ref cmd-dat 1) (vector-ref cmd-dat 0)))))
		     (sort (hash-table-keys *db-stats*)
	   (rmt:print-db-stats)
			   (lambda (a b)
			     (> (vector-ref (hash-table-ref *db-stats* a) 0)
				(vector-ref (hash-table-ref *db-stats* b) 0)))))
	   (if *dbstruct-db* (db:close-all *dbstruct-db*))
	   (if *megatest-db* (sqlite3:finalize! *megatest-db*))))

;;======================================================================
;; Misc general calls
;;======================================================================