Overview
Comment: | Removed unneeded opening of main.db in each server. Reworked run stats |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | megatest.db-sync |
Files: | files | file ages | folders |
SHA1: |
b055e5fd1b3dc64aa0a89ca130ce90b1 |
User & Date: | matt on 2014-03-18 23:57:44 |
Other Links: | branch diff | manifest | tags |
Context
2014-03-19
| ||
10:21 | Merge db-sync to the v1.60 check-in: f5a9d4250c user: mrwellan tags: v1.60 | |
2014-03-18
| ||
23:57 | Removed unneeded opening of main.db in each server. Reworked run stats Closed-Leaf check-in: b055e5fd1b user: matt tags: megatest.db-sync | |
17:31 | Fixed typo check-in: 1911dc98ed user: mrwellan tags: megatest.db-sync | |
Changes
Modified db.scm from [5f0bb87ad0] to [1cc2ae8b79].
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | + - + | db)))) ;; Make the dbstruct, setup up auxillary db's and call for main db at least once ;; (define (db:setup run-id #!key (local #f)) (let* ((dbdir (conc (configf:lookup *configdat* "setup" "linktree") "/.db")) (dbstruct (make-dbr:dbstruct path: dbdir local: local))) ;; isn't this a hold-over from the multi-db in one process? Commenting it out for now .... |
︙ | |||
222 223 224 225 226 227 228 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - - - - - - - - - - - - - - - - - - - | (sqlite3:execute db "PRAGMA synchronous = 0;"))) (if (not dbexists) (begin (db:initialize-main-db db) (db:initialize-run-id-db db))) db)) |
︙ | |||
1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 | + + - - + + + - - - - + + + - - - - - + + + + + + + + + | ;; get some basic run stats ;; ;; ( (runname (( state count ) ... )) ;; ( ... (define (db:get-run-stats dbstruct) (let ((totals (make-hash-table)) (curr (make-hash-table)) (res '()) (runs-info '())) ;; First get all the runname/run-ids (sqlite3:for-each-row (lambda (run-id runname) (set! runs-info (cons (list run-id runname) runs-info))) (db:get-db dbstruct #f) "SELECT id,runname FROM runs WHERE state != 'deleted';") ;; for each run get stats data (for-each (lambda (run-info) ;; get the net state/status counts for this run (let ((run-id (car run-info)) (run-name (cadr run-info))) (sqlite3:for-each-row |
︙ |
Modified db_records.scm from [139c08b6c7] to [c4cc0272f9].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (define-inline (dbr:dbstruct-get-mtime vec) (vector-ref vec 6)) (define-inline (dbr:dbstruct-get-rtime vec) (vector-ref vec 7)) (define-inline (dbr:dbstruct-get-stime vec) (vector-ref vec 8)) (define-inline (dbr:dbstruct-get-inuse vec) (vector-ref vec 9)) (define-inline (dbr:dbstruct-get-refdb vec) (vector-ref vec 10)) (define-inline (dbr:dbstruct-get-locdbs vec) (vector-ref vec 11)) (define-inline (dbr:dbstruct-get-olddb vec) (vector-ref vec 12)) (define-inline (dbr:dbstruct-get-run-id vec) (vector-ref vec 13)) (define-inline (dbr:dbstruct-set-main! vec val)(vector-set! vec 0 val)) (define-inline (dbr:dbstruct-set-strdb! vec val)(vector-set! vec 1 val)) (define-inline (dbr:dbstruct-set-path! vec val)(vector-set! vec 2 val)) (define-inline (dbr:dbstruct-set-local! vec val)(vector-set! vec 3 val)) (define-inline (dbr:dbstruct-set-rundb! vec val)(vector-set! vec 4 val)) (define-inline (dbr:dbstruct-set-inmem! vec val)(vector-set! vec 5 val)) (define-inline (dbr:dbstruct-set-mtime! vec val)(vector-set! vec 6 val)) (define-inline (dbr:dbstruct-set-rtime! vec val)(vector-set! vec 7 val)) (define-inline (dbr:dbstruct-set-stime! vec val)(vector-set! vec 8 val)) (define-inline (dbr:dbstruct-set-inuse! vec val)(vector-set! vec 9 val)) (define-inline (dbr:dbstruct-set-refdb! vec val)(vector-set! vec 10 val)) (define-inline (dbr:dbstruct-set-locdbs! vec val)(vector-set! vec 11 val)) (define-inline (dbr:dbstruct-set-olddb! vec val)(vector-set! vec 12 val)) (define-inline (dbr:dbstruct-set-run-id! vec val)(vector-set! vec 13 val)) ;; constructor for dbstruct ;; (define (make-dbr:dbstruct #!key (path #f)(local #f)) |
︙ |