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

Side by Side Diff: perf/DESIGN.md

Issue 813443002: Overhaul database package (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 6 years 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
OLDNEW
1 DESIGN 1 DESIGN
2 ====== 2 ======
3 3
4 4
5 Overview 5 Overview
6 -------- 6 --------
7 Provides interactive dashboard for Skia performance data. 7 Provides interactive dashboard for Skia performance data.
8 8
9 Code Locations 9 Code Locations
10 -------------- 10 --------------
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 $ mysql -h 173.194.104.24 -u root -p 190 $ mysql -h 173.194.104.24 -u root -p
191 191
192 192
193 mysql> use skia 193 mysql> use skia
194 194
195 mysql> show tables; 195 mysql> show tables;
196 196
197 Initial setup of the database, the users, and the tables: 197 Initial setup of the database, the users, and the tables:
198 198
199 * Create the database and set up permissions. Execute the following after 199 * Create the database and set up permissions. Execute the following after
200 you connect to a MySQL database (not necessary for SQLite). 200 you connect to a MySQL database.
201 201
202 CREATE DATABASE skia; 202 CREATE DATABASE skia;
203 USE skia; 203 USE skia;
204 CREATE USER 'readonly'@'%' IDENTIFIED BY <password in valentine>; 204 CREATE USER 'readonly'@'%' IDENTIFIED BY <password in valentine>;
205 GRANT SELECT ON *.* TO 'readonly'@'%'; 205 GRANT SELECT ON *.* TO 'readonly'@'%';
206 CREATE USER 'readwrite'@'%' IDENTIFIED BY <password in valentine>; 206 CREATE USER 'readwrite'@'%' IDENTIFIED BY <password in valentine>;
207 GRANT SELECT, DELETE, UPDATE, INSERT ON *.* TO 'readwrite'@'%'; 207 GRANT SELECT, DELETE, UPDATE, INSERT ON *.* TO 'readwrite'@'%';
208 208
209 * Create the versioned database tables. 209 * Create the versioned database tables.
210 210
211 We use the 'migratedb' tool to keep the database in a well defined (versioned) 211 We use the 'migratedb' tool to keep the database in a well defined (versioned)
212 state. The 'db_conn_string' flag allows to specify the target database. 212 state. The 'db_conn_string' flag allows to specify the target database.
213 By default it will try to connect to the production environment. 213 By default it will try to connect to the production environment.
214 But for testing a local MySQL database can be provided. If it cannot 214 But for testing a local MySQL database can be provided. If it cannot
215 connect to MySQL it will fall back to SQLite. 215 connect to MySQL it will fall back to a local "test" MySQL database.
216 216
217 Bring the production database to the latest schema version: 217 Bring the production database to the latest schema version:
218 218
219 $ migratedb -logtostderr=true 219 $ migratedb -logtostderr=true
220 220
221 Bring a local database to the latest schema version: 221 Bring a local database to the latest schema version:
222 222
223 $ migratedb -logtostderr=true -db_conn_string="root:%s@tcp(localhost:3306)/ skia?parseTime=true" 223 $ migratedb -logtostderr=true -db_conn_string="root:%s@tcp(localhost:3306)/ skia?parseTime=true"
224 224
225 Bring a local SQLite database to the latest schema version:
226
227 $ migratedb -logtostderr=true -db_conn_string=""
228
229 225
230 Nginx 226 Nginx
231 ----- 227 -----
232 228
233 Nginx acts as a proxy to the backend app, which is configured to run on port 229 Nginx acts as a proxy to the backend app, which is configured to run on port
234 8000, and serves the app on port 443 (HTTPS). Port 80 just redirects to 443. 230 8000, and serves the app on port 443 (HTTPS). Port 80 just redirects to 443.
235 The config for the nginx server is held in setup/sys/perf_nginx, which is copied 231 The config for the nginx server is held in setup/sys/perf_nginx, which is copied
236 into place during installation. Nginx is monitored and kept running by monit. 232 into place during installation. Nginx is monitored and kept running by monit.
237 233
238 234
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 458
463 But sysv init only handles starting and stopping a program once, so we use 459 But sysv init only handles starting and stopping a program once, so we use
464 Monit to monitor the application and restart it if it crashes. The config 460 Monit to monitor the application and restart it if it crashes. The config
465 is in: 461 is in:
466 462
467 /etc/monit/conf.d/perf 463 /etc/monit/conf.d/perf
468 464
469 Installation 465 Installation
470 ------------ 466 ------------
471 See the README file. 467 See the README file.
OLDNEW
« golden/go/db/db.go ('K') | « golden/go/skiacorrectness/main.go ('k') | perf/go/db/db.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698