Changes In Branch db Through [d48132cec4] Excluding Merge-Ins
This is equivalent to a diff from 07fdd25a9d to d48132cec4
2016-09-16
| ||
17:21 | Commit with compilation errors check-in: 3fe6358ed8 user: ritikaag tags: db | |
2016-09-14
| ||
17:12 | synced with db check-in: d67ec488aa user: bjbarcla tags: runs-summary-context-menu | |
17:09 | Updated pop-up menu check-in: 1a6bb460f9 user: ritikaag tags: v1.61 | |
16:17 | Db update check-in: d48132cec4 user: ritikaag tags: db | |
2016-09-13
| ||
16:26 | Fixed horizontal scrollbar and change update handling. check-in: 07fdd25a9d user: mrwellan tags: v1.61 | |
11:14 | Bumped number of tests pulled on changing constraints check-in: 3a6f875dab user: mrwellan tags: v1.61 | |
2016-09-08
| ||
18:31 | db upate check-in: 41a6e4d3ac user: ritikaag tags: db | |
Modified common.scm from [14a3d2fe92] to [dbd6b46d99].
︙ | |||
141 142 143 144 145 146 147 | 141 142 143 144 145 146 147 148 149 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 | - + + + + | (conc megatest-version "-" megatest-fossil-hash)) (define (common:version-signature) (conc megatest-version "-" (substring megatest-fossil-hash 0 4))) ;; from metadat lookup MEGATEST_VERSION ;; |
︙ |
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 [7c3fc76517] to [658f484a18].
︙ | |||
119 120 121 122 123 124 125 126 127 128 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | + + - + + + - + - + + | please-update: #t update-mutex: (make-mutex) updaters: (make-hash-table) updating: #f hide-not-hide-tabs: #f )) ;; RA => returns the tabdat stored at hashkey passed in commondat-tabdats table (e.g. 0 gives summary) ;; (define (dboard:common-get-tabdat commondat #!key (tab-num #f)) (hash-table-ref/default (dboard:commondat-tabdats commondat) |
︙ | |||
788 789 790 791 792 793 794 | 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | - | (take-right (dboard:tabdat-allruns tabdat) numruns) (pad-list (dboard:tabdat-allruns tabdat) numruns))) (lftcol (dboard:uidat-get-lftcol uidat)) (tableheader (dboard:uidat-get-header uidat)) (table (dboard:uidat-get-runsvec uidat)) (coln 0) (all-test-names (make-hash-table))) |
︙ | |||
890 891 892 893 894 895 896 897 898 899 900 901 902 903 | 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 | + | (color (car (gutils:get-color-for-state-status teststate teststatus))) (curr-color (vector-ref buttondat 1)) ;; (iup:attribute button "BGCOLOR")) (curr-title (vector-ref buttondat 2))) ;; (iup:attribute button "TITLE"))) (if (not (equal? curr-color color)) (iup:attribute-set! button "BGCOLOR" color)) (if (not (equal? curr-title buttontxt)) (iup:attribute-set! button "TITLE" buttontxt)) ;;(print "RA => testdat " testdat " teststate " teststate " teststatus " teststatus " buttondat " buttondat " curr-color " curr-color " curr-title " curr-title "buttontxt" buttontxt " title " curr-title ) (vector-set! buttondat 0 run-id) (vector-set! buttondat 1 color) (vector-set! buttondat 2 buttontxt) (vector-set! buttondat 3 testdat) (vector-set! buttondat 4 run-key))) (set! rown (+ rown 1)))) (dboard:tabdat-all-test-names tabdat))) |
︙ | |||
1685 1686 1687 1688 1689 1690 1691 | 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 | - + | #:click-cb (lambda (obj lin col status) (let* ((toolpath (car (argv))) (key (conc lin ":" col)) (test-id (hash-table-ref/default cell-lookup key -1)) (cmd (conc toolpath " -test " (dboard:tabdat-curr-run-id tabdat) "," test-id "&"))) (system cmd))))) |
︙ | |||
1855 1856 1857 1858 1859 1860 1861 | 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 | - + | (iup:menu-item "Run" (iup:menu (iup:menu-item (conc "Rerun " testpatt) #:action (lambda (obj) |
︙ | |||
1878 1879 1880 1881 1882 1883 1884 | 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 | - + + + + + + + + + + | (iup:menu-item "Clean Complete Run" #:action (lambda (obj) (common:run-a-command (conc "megatest -remove-runs -target " target " -runname " runname |
︙ | |||
1937 1938 1939 1940 1941 1942 1943 | 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 | - + | " " tconfig " &"))) (system cmd)))) )))) (define (make-dashboard-buttons commondat) ;; runs-sum-dat new-view-dat) (let* ((stats-dat (dboard:tabdat-make-data)) (runs-dat (dboard:tabdat-make-data)) |
︙ | |||
2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 | 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 | + + | recalc)) ;; point inside line ;; (define-inline (dashboard:px-between px lx1 lx2) (and (< lx1 px)(> lx2 px))) ;;Not reference anywhere ;; ;; can a bar be placed in row "rownum" covering x1 to x2 without overlapping with existing ;; bars? Use num-rows to check that a block will fit from rownum to (+ rownum num-rows) ;; (define (dashboard:row-collision rowhash rownum x1 x2 #!key (num-rows #f)) (let ((lastrow (if num-rows (+ rownum num-rows) rownum))) (let loop ((i 0) (rowdat (hash-table-ref/default rowhash rownum '()))) |
︙ | |||
2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 | 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (if (dboard:tabdat-layout-update-ok tabdat) (runloop (car runtal)(cdr runtal) (+ run-num 1) newdoneruns) (escapeloop #t) ;; (dboard:tabdat-layout-update-ok tabdat) ))))))))) ;; new-run-start-row ))) (debug:print 2 *default-log-port* "no tabdat for run-times-tab-updater")))) (define (tabdat-values tabdat) (let ((allruns (dboard:tabdat-allruns tabdat)) (allruns-by-id (dboard:tabdat-allruns-by-id tabdat)) (done-runs (dboard:tabdat-done-runs tabdat)) (not-done-runs (dboard:tabdat-not-done-runs tabdat)) (header (dboard:tabdat-header tabdat)) (keys (dboard:tabdat-keys tabdat)) (numruns (dboard:tabdat-numruns tabdat)) (tot-runs (dboard:tabdat-tot-runs tabdat)) (last-data-update (dboard:tabdat-last-data-update tabdat)) (runs-mutex (dboard:tabdat-runs-mutex tabdat)) (run-update-times (dboard:tabdat-run-update-times tabdat)) (last-test-dat (dboard:tabdat-last-test-dat tabdat)) (run-db-paths (dboard:tabdat-run-db-paths tabdat)) (buttondat (dboard:tabdat-buttondat tabdat)) (item-test-names (dboard:tabdat-item-test-names tabdat)) (run-keys (dboard:tabdat-run-keys tabdat)) (start-run-offset (dboard:tabdat-start-run-offset tabdat)) (start-test-offset (dboard:tabdat-start-test-offset tabdat)) (runs-btn-height (dboard:tabdat-runs-btn-height tabdat)) (all-test-names (dboard:tabdat-all-test-names tabdat)) (cnv (dboard:tabdat-cnv tabdat)) (command (dboard:tabdat-command tabdat)) (run-name (dboard:tabdat-run-name tabdat)) (states (dboard:tabdat-states tabdat)) (statuses (dboard:tabdat-statuses tabdat)) (curr-run-id (dboard:tabdat-curr-run-id tabdat)) (curr-test-ids (dboard:tabdat-curr-test-ids tabdat)) (state-ignore-hash (dboard:tabdat-state-ignore-hash tabdat)) (test-patts (dboard:tabdat-test-patts tabdat)) (target (dboard:tabdat-target tabdat)) (dbdir (dboard:tabdat-dbdir tabdat)) (monitor-db-path (dboard:tabdat-monitor-db-path tabdat)) (path-run-ids (dboard:tabdat-path-run-ids tabdat))) (print "allruns is : " allruns) (print "allruns-by-id is : " allruns-by-id) (print "done-runs is : " done-runs) (print "not-done-runs is : " not-done-runs) (print "header is : " header ) (print "keys is : " keys) (print "numruns is : " numruns) (print "tot-runs is : " tot-runs) (print "last-data-update is : " last-data-update) (print "runs-mutex is : " runs-mutex) (print "run-update-times is : " run-update-times) (print "last-test-dat is : " last-test-dat) (print "run-db-paths is : " run-db-paths) (print "buttondat is : " buttondat) (print "item-test-names is : " item-test-names) (print "run-keys is : " run-keys) (print "start-run-offset is : " start-run-offset) (print "start-test-offset is : " start-test-offset) (print "runs-btn-height is : " runs-btn-height) (print "all-test-names is : " all-test-names) (print "cnv is : " cnv) (print "command is : " command) (print "run-name is : " run-name) (print "states is : " states) (print "statuses is : " statuses) (print "curr-run-id is : " curr-run-id) (print "curr-test-ids is : " curr-test-ids) (print "state-ignore-hash is : " state-ignore-hash) (print "test-patts is : " test-patts) (print "target is : " target) (print "dbdir is : " dbdir) (print "monitor-db-path is : " monitor-db-path) (print "path-run-ids is : " path-run-ids))) (define (dashboard:runs-tab-updater commondat tab-num) (debug:catch-and-dump (lambda () (let* ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num)) (dbkeys (dboard:tabdat-dbkeys tabdat))) ;;(print "RA => calling runs-tab-updater with commondat " commondat " tab-num " tab-num) ;;(tabdat-values tabdat) ;;RA added (update-rundat tabdat (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "runname" "%") (dboard:tabdat-numruns tabdat) (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "test-name" "%/%") ;; (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) "item-name" "%") (let* ((dbkeys (dboard:tabdat-dbkeys tabdat))) ;; (print "dbkeys: " dbkeys) |
︙ | |||
2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 | 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 | + | (let ((val (hash-table-ref/default (dboard:tabdat-searchpatts tabdat) key #f))) (if val (set! res (cons (list key val) res)))))) dbkeys) res)))) ;; (debug:print 0 *default-log-port* "fres: " fres) fres))) (let ((uidat (dboard:commondat-uidat commondat))) ;;(print "RA => Calling update-buttons with tabdat : " tabdat " uidat " uidat) (update-buttons tabdat uidat (dboard:tabdat-numruns tabdat) (dboard:tabdat-num-tests tabdat))) )) "dashboard:runs-tab-updater")) ;; ((2) ;; (dashboard:update-run-summary-tab)) ;; ((3) |
︙ | |||
2890 2891 2892 2893 2894 2895 2896 | 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 | - + - + | (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 [1c6bc853bb] to [e5eb1c89ac].
︙ | |||
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 185 186 187 188 | - + - + + + - + - + | ;; 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))))))) |
︙ | |||
3347 3348 3349 3350 3351 3352 3353 3354 | 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 3379 3380 3381 3382 | + + - + - + | ;; 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)) |
︙ | |||
3383 3384 3385 3386 3387 3388 3389 | 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 | - + | (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 rmt.scm from [a85b27b9ab] to [2952ad46e2].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - + | ;;====================================================================== ;; Copyright 2006-2013, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== |
︙ | |||
69 70 71 72 73 74 75 76 77 78 79 80 81 82 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + + + | ;; NB// can cache the answer for server running for 10 seconds ... ;; ;; (and (not (rmt:write-frequency-over-limit? cmd run-id)) (if (tasks:server-running-or-starting? (db:delay-if-busy (tasks:open-db)) run-id) (client:setup run-id) #f)))) (define *send-receive-mutex* (make-mutex)) ;; should have separate mutex per run-id ;; RA => e.g. usage (rmt:send-receive 'get-var #f (list varname)) ;; (define (rmt:send-receive cmd rid params #!key (attemptnum 1)) ;; start attemptnum at 1 so the modulo below works as expected ;; clean out old connections ;; (mutex-lock! *db-multi-sync-mutex*) (let ((expire-time (- (current-seconds) (server:get-timeout) 10))) ;; don't forget the 10 second margin (for-each (lambda (run-id) (let ((connection (hash-table-ref/default *runremote* run-id #f))) |
︙ |