Megatest

Check-in [635eff7ce3]
Login
Overview
Comment:updated formatting for server stats
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.80-revolution
Files: files | file ages | folders
SHA1: 635eff7ce373cce6b8ab6f24df256f7d8c62351d
User & Date: mmgraham on 2024-01-18 23:07:30
Other Links: branch diff | manifest | tags
Context
2024-01-18
23:10
updated server start message check-in: 6248485505 user: mmgraham tags: v1.80-revolution
23:07
updated formatting for server stats check-in: 635eff7ce3 user: mmgraham tags: v1.80-revolution
23:05
changed the number of seconds for recently-done from 3 to 1 to fix a dashboard update problem. check-in: 222a5bcc89 user: mmgraham tags: v1.80-revolution
Changes

Modified dbmod.scm from [404c8ee706] to [4cd67b59a2].

897
898
899
900
901
902
903
904

905
906

907
908
909
910
911
912
913
897
898
899
900
901
902
903

904
905

906
907
908
909
910
911
912
913







-
+

-
+








;; (define *dbstruct-dbs*         #f) ;; used to cache the dbstruct in db:setup. Goal is to remove this.
;; db stats
(define *db-stats*            (make-hash-table)) ;; hash of vectors < count duration-total >
(define *db-stats-mutex*      (make-mutex))

(define (rmt:print-db-stats)
  (let ((fmtstr "~40a~7-d~9-d~20,2-f")) ;; "~20,2-f"
  (let ((fmtstr "~40a~8-d~20-d~20,2-f")) ;; "~20,2-f"
    (debug:print 0 *default-log-port* "DB Stats\n========")
    (debug:print 0 *default-log-port* (format #f "~40a~8a~10a~10a" "Cmd" "Count" "TotTime" "Avg"))
    (debug:print 0 *default-log-port* (format #f "~40a~8a~20a~10a" "Cmd" "Count" "TotTime" "Avg"))
    (for-each (lambda (cmd)
		(let* ((dat     (hash-table-ref *db-stats* cmd))
		       (count   (dbstat-cnt dat))
		       (tottime (dbstat-tottime dat)))
		  (debug:print 0 *default-log-port*
			       (format #f fmtstr cmd count tottime
				       (/ tottime count)))))