Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/sqlite/src/test/speed3.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/sort5.test ('k') | third_party/sqlite/src/test/speedtest1.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2007 May 17 1 # 2007 May 17
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #************************************************************************* 10 #*************************************************************************
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 db_enter db 98 db_enter db
99 array set stats1 [btree_pager_stats [btree_from_db db]] 99 array set stats1 [btree_pager_stats [btree_from_db db]]
100 array set stats2 [btree_pager_stats [btree_from_db db 2]] 100 array set stats2 [btree_pager_stats [btree_from_db db 2]]
101 db_leave db 101 db_leave db
102 # puts "1: [array get stats1]" 102 # puts "1: [array get stats1]"
103 # puts "2: [array get stats2]" 103 # puts "2: [array get stats2]"
104 puts "Incrvacuum: Read $stats1(read), wrote $stats1(write)" 104 puts "Incrvacuum: Read $stats1(read), wrote $stats1(write)"
105 puts "Normal : Read $stats2(read), wrote $stats2(write)" 105 puts "Normal : Read $stats2(read), wrote $stats2(write)"
106 } 106 }
107 107
108 proc reset_db {} { 108 proc speed3_reset_db {} {
109 db close 109 db close
110 sqlite3 db test.db 110 sqlite3 db test.db
111 db eval { 111 db eval {
112 PRAGMA main.cache_size = 200000; 112 PRAGMA main.cache_size = 200000;
113 PRAGMA main.auto_vacuum = 'incremental'; 113 PRAGMA main.auto_vacuum = 'incremental';
114 ATTACH 'test2.db' AS 'aux'; 114 ATTACH 'test2.db' AS 'aux';
115 PRAGMA aux.auto_vacuum = 'none'; 115 PRAGMA aux.auto_vacuum = 'none';
116 } 116 }
117 } 117 }
118 118
119 forcedelete test2.db test2.db-journal 119 forcedelete test2.db test2.db-journal
120 reset_db 120 speed3_reset_db
121 121
122 # Set up a database in auto-vacuum mode and create a database schema. 122 # Set up a database in auto-vacuum mode and create a database schema.
123 # 123 #
124 do_test speed3-0.1 { 124 do_test speed3-0.1 {
125 execsql { 125 execsql {
126 CREATE TABLE main.t1(a INTEGER, b TEXT, c INTEGER); 126 CREATE TABLE main.t1(a INTEGER, b TEXT, c INTEGER);
127 } 127 }
128 execsql { 128 execsql {
129 SELECT name FROM sqlite_master ORDER BY 1; 129 SELECT name FROM sqlite_master ORDER BY 1;
130 } 130 }
(...skipping 16 matching lines...) Expand all
147 do_test speed3-0.4 { 147 do_test speed3-0.4 {
148 execsql { 148 execsql {
149 PRAGMA main.auto_vacuum; 149 PRAGMA main.auto_vacuum;
150 PRAGMA aux.auto_vacuum; 150 PRAGMA aux.auto_vacuum;
151 } 151 }
152 } {2 0} 152 } {2 0}
153 153
154 # Delete all content in a table, one row at a time. 154 # Delete all content in a table, one row at a time.
155 # 155 #
156 #io_log db 156 #io_log db
157 reset_db 157 speed3_reset_db
158 speed_trial speed3-1.incrvacuum $::NROW row {DELETE FROM main.t1 WHERE 1} 158 speed_trial speed3-1.incrvacuum $::NROW row {DELETE FROM main.t1 WHERE 1}
159 speed_trial speed3-1.normal $::NROW row {DELETE FROM aux.t1 WHERE 1} 159 speed_trial speed3-1.normal $::NROW row {DELETE FROM aux.t1 WHERE 1}
160 io_log db 160 io_log db
161 161
162 # Select the "C" column (located at the far end of the overflow 162 # Select the "C" column (located at the far end of the overflow
163 # chain) from each table row. 163 # chain) from each table row.
164 # 164 #
165 #db eval {PRAGMA incremental_vacuum(500000)} 165 #db eval {PRAGMA incremental_vacuum(500000)}
166 populate_t1 db 166 populate_t1 db
167 reset_db 167 speed3_reset_db
168 speed_trial speed3-2.incrvacuum $::NROW row {SELECT c FROM main.t1} 168 speed_trial speed3-2.incrvacuum $::NROW row {SELECT c FROM main.t1}
169 speed_trial speed3-2.normal $::NROW row {SELECT c FROM aux.t1} 169 speed_trial speed3-2.normal $::NROW row {SELECT c FROM aux.t1}
170 io_log db 170 io_log db
171 171
172 finish_test 172 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/sort5.test ('k') | third_party/sqlite/src/test/speedtest1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698