Overview
Comment: | db.scm comments |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | db |
Files: | files | file ages | folders |
SHA1: |
44c895abc8a33f61a1004ce8dc34f1d9 |
User & Date: | ritikaag on 2016-08-25 23:05:48 |
Other Links: | branch diff | manifest | tags |
Context
2016-09-07
| ||
16:29 | db updated check-in: 9a47c20038 user: ritikaag tags: db | |
2016-08-25
| ||
23:05 | db.scm comments check-in: 44c895abc8 user: ritikaag tags: db | |
10:59 | Added split for runs view. check-in: e03081d004 user: mrwellan tags: v1.61 | |
2016-08-24
| ||
14:46 | Comments till date check-in: ec3ce1b843 user: ritikaag tags: db | |
Changes
Modified dashboard-tests.scm from [3a6a535f7d] to [18a620ff35].
︙ | |||
412 413 414 415 416 417 418 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | - + | (iup:destroy! dlog))))))) dlog)) ;;====================================================================== ;; ;;====================================================================== |
︙ |
Modified dashboard.scm from [9b0c89f2db] to [f92d7fa42b].
︙ | |||
1283 1284 1285 1286 1287 1288 1289 | 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 | - + | "iup:canvas action"))) #:wheel-cb (lambda (obj step x y dir) ;; dir is 4 for up and 5 for down. I think. (debug:catch-and-dump (lambda () (let* ((drawing (dboard:tabdat-drawing tabdat)) (scalex (vg:drawing-scalex drawing))) (dboard:tabdat-view-changed-set! tabdat #t) |
︙ | |||
1920 1921 1922 1923 1924 1925 1926 | 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 | - + | "Clean Complete Run" #:action (lambda (obj) (common:run-a-command (conc "megatest -remove-runs -target " target " -runname " runname " -testpatt % ")))) |
︙ | |||
2052 2053 2054 2055 2056 2057 2058 | 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 | - + | (else (let ((labl (iup:button "" ;; the testname labels #:flat "YES" #:alignment "ALEFT" ; #:image img1 ; #:impress img2 #:size (conc cell-width btn-height) |
︙ | |||
2140 2141 2142 2143 2144 2145 2146 | 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 | - - + + + - - - - - + + + + + | #:title (conc "Megatest dashboard " (current-user-name) ":" *toppath*) #:menu (dcommon:main-menu) (let* ((runs-view (iup:vbox (iup:split #:orientation "VERTICAL" ;; "HORIZONTAL" #:value 150 (dboard:runs-tree-browser commondat runs-dat) |
︙ | |||
2975 2976 2977 2978 2979 2980 2981 | 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 | - + - + | (define (main) (if (not (args:get-arg "-skip-version-check"))(common:exit-on-version-changed)) (let* ((commondat (dboard:commondat-make))) ;; Move this stuff to db.scm? I'm not sure that is the right thing to do... (cond ((args:get-arg "-test") ;; run-id,test-id |
︙ |
Modified db.scm from [e4bdea0e8f] to [75ba85368a].
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + + - + - + | ;; PURPOSE. ;;====================================================================== ;;====================================================================== ;; Database access ;;====================================================================== ;; dbstruct vector containing all the relevant dbs like main.db, megatest.db, run.db etc |
︙ | |||
35 36 37 38 39 40 41 | 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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + - + - + + + + - + - + | (define *number-non-write-queries* 0) ;;====================================================================== ;; SQLITE3 HELPERS ;;====================================================================== (define (db:general-sqlite-error-dump exn stmt . params) |
︙ | |||
145 146 147 148 149 150 151 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + - + + + - + | ;; NB// #f => return dbdir only ;; (was planned to be; zeroth db with name=main.db) ;; (define (db:dbfile-path run-id) (let* ((dbdir (db:get-dbdir)) (fname (if run-id |
︙ | |||
260 261 262 263 264 265 266 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | - + - - + + | (dbr:dbstruct-set-refdb! dbstruct refdb) (db:sync-tables db:sync-tests-only inmem refdb) ;; use inmem as the reference, don't read again from db ;; sync once more to deal with delays? ;; (db:sync-tables db:sync-tests-only db inmem) ;; (db:sync-tables db:sync-tests-only inmem refdb) inmem))))))) |
︙ | |||
3343 3344 3345 3346 3347 3348 3349 3350 | 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 | + + - + - + | ;; this test is younger, store it in the hash (hash-table-set! tests-hash full-testname testdat)))) results) (if (null? tal) (map cdr (hash-table->alist tests-hash)) ;; return a list of the most recent tests (loop (car tal)(cdr tal)))))))))) ;; Function recursively checks if <db>.journal exists; if yes means db busy; call itself after delayed interval ;; (define (db:delay-if-busy dbdat #!key (count 6)) |
︙ | |||
3379 3380 3381 3382 3383 3384 3385 | 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 | - + | (db:delay-if-busy count: 1)) ((1) (thread-sleep! 6.4) (db:delay-if-busy count: 0)) (else (debug:print-info 0 *default-log-port* "delaying db access due to high database load.") (thread-sleep! 12.8)))) |
︙ |
Modified db_records.scm from [f90e27c50c] to [64b6bb0323].
︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | + + | (define (make-dbr:dbstruct #!key (path #f)(local #f)) (let ((v (make-vector 15 #f))) (dbr:dbstruct-set-path! v path) (dbr:dbstruct-set-local! v local) (dbr:dbstruct-set-locdbs! v (make-hash-table)) v)) ;; Returns the database for a particular run-id fron the dbstruct:localdbs ;; (define (dbr:dbstruct-get-localdb v run-id) (hash-table-ref/default (dbr:dbstruct-get-locdbs v) run-id #f)) (define (dbr:dbstruct-set-localdb! v run-id db) (hash-table-set! (dbr:dbstruct-get-locdbs v) run-id db)) |
︙ | |||
92 93 94 95 96 97 98 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + + | (conc (db:test-get-testname vec) "/" (db:test-get-item-path vec))) ;; replace runs:make-full-test-name with this routine (define (db:test-make-full-name testname itempath) (if (equal? itempath "") testname (conc testname "/" itempath))) (define-inline (db:test-get-first_err vec) (printable (vector-ref vec 15))) |
︙ |
Modified runs.scm from [9c33432668] to [de4f2b1394].
︙ | |||
941 942 943 944 945 946 947 948 949 950 951 952 953 954 | 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | + | #f ;; I think we are truly done here (list (runs:queue-next-hed newtal reg reglen regfull) (runs:queue-next-tal newtal reg reglen regfull) (runs:queue-next-reg newtal reg reglen regfull) reruns))))))))) ;; scan a list of tests looking to see if any are potentially runnable ;; (define (runs:runable-tests tests) (filter (lambda (t) (if (not (vector? t)) t (let ((state (db:test-get-state t)) (status (db:test-get-status t))) (case (string->symbol state) |
︙ |