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

Side by Side Diff: ct/go/db/db.go

Issue 1411423003: [CT] Add ability to run unlanded benchmarks on Chromium Perf (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Add documentation link Created 5 years, 2 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
OLDNEW
1 package db 1 package db
2 2
3 /* 3 /*
4 Store/Retrieve Cluster Telemetry Frontend data in a database. 4 Store/Retrieve Cluster Telemetry Frontend data in a database.
5 */ 5 */
6 6
7 import ( 7 import (
8 "github.com/jmoiron/sqlx" 8 "github.com/jmoiron/sqlx"
9 "go.skia.org/infra/go/database" 9 "go.skia.org/infra/go/database"
10 ) 10 )
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 platform VARCHAR(100) NOT NULL, 61 platform VARCHAR(100) NOT NULL,
62 page_sets VARCHAR(100) NOT NULL, 62 page_sets VARCHAR(100) NOT NULL,
63 repeat_runs INT NOT NULL, 63 repeat_runs INT NOT NULL,
64 benchmark_args VARCHAR(255), 64 benchmark_args VARCHAR(255),
65 browser_args_nopatch VARCHAR(255), 65 browser_args_nopatch VARCHAR(255),
66 browser_args_withpatch VARCHAR(255), 66 browser_args_withpatch VARCHAR(255),
67 description VARCHAR(255), 67 description VARCHAR(255),
68 chromium_patch TEXT, 68 chromium_patch TEXT,
69 blink_patch TEXT, 69 blink_patch TEXT,
70 skia_patch TEXT, 70 skia_patch TEXT,
71 benchmark_patch TEXT,
dogben 2015/10/20 15:17:26 I don't think this is supposed to be here.
rmistry 2015/10/20 17:47:48 Oops. Removed.
71 ts_added BIGINT NOT NULL, 72 ts_added BIGINT NOT NULL,
72 ts_started BIGINT, 73 ts_started BIGINT,
73 ts_completed BIGINT, 74 ts_completed BIGINT,
74 failure TINYINT(1), 75 failure TINYINT(1),
75 nopatch_raw_output VARCHAR(255), 76 nopatch_raw_output VARCHAR(255),
76 withpatch_raw_output VARCHAR(255), 77 withpatch_raw_output VARCHAR(255),
77 results VARCHAR(255) 78 results VARCHAR(255)
78 )`, 79 )`,
79 } 80 }
80 81
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 243 }
243 244
244 var v10_up = []string{ 245 var v10_up = []string{
245 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf32`, 246 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf32`,
246 } 247 }
247 248
248 var v10_down = []string{ 249 var v10_down = []string{
249 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf8`, 250 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf8`,
250 } 251 }
251 252
253 var v11_up = []string{
254 `ALTER TABLE ChromiumPerfTasks ADD benchmark_patch longtext NOT NULL DEF AULT ""`,
255 }
256
257 var v11_down = []string{
258 `ALTER TABLE ChromiumPerfTasks DROP benchmark_patch`,
259 }
260
252 // Define the migration steps. 261 // Define the migration steps.
253 // Note: Only add to this list, once a step has landed in version control it 262 // Note: Only add to this list, once a step has landed in version control it
254 // must not be changed. 263 // must not be changed.
255 var migrationSteps = []database.MigrationStep{ 264 var migrationSteps = []database.MigrationStep{
256 // version 1. Create Chromium Perf tables. 265 // version 1. Create Chromium Perf tables.
257 { 266 {
258 MySQLUp: v1_up, 267 MySQLUp: v1_up,
259 MySQLDown: v1_down, 268 MySQLDown: v1_down,
260 }, 269 },
261 // version 2. Create Admin Task tables. 270 // version 2. Create Admin Task tables.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // version 9: Change chromium_patch, blink_patch and skia_patch to longt ext in ChromiumPerfTasks table. 305 // version 9: Change chromium_patch, blink_patch and skia_patch to longt ext in ChromiumPerfTasks table.
297 { 306 {
298 MySQLUp: v9_up, 307 MySQLUp: v9_up,
299 MySQLDown: v9_down, 308 MySQLDown: v9_down,
300 }, 309 },
301 // version 10: Convert character set in ChromiumPerfTasks from utf8 to u tf32. 310 // version 10: Convert character set in ChromiumPerfTasks from utf8 to u tf32.
302 { 311 {
303 MySQLUp: v10_up, 312 MySQLUp: v10_up,
304 MySQLDown: v10_down, 313 MySQLDown: v10_down,
305 }, 314 },
315 // version 11: Add benchmark_patch column to ChromiumPerfTasks.
316 {
317 MySQLUp: v11_up,
318 MySQLDown: v11_down,
319 },
306 } 320 }
307 321
308 // MigrationSteps returns the database migration steps. 322 // MigrationSteps returns the database migration steps.
309 func MigrationSteps() []database.MigrationStep { 323 func MigrationSteps() []database.MigrationStep {
310 return migrationSteps 324 return migrationSteps
311 } 325 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698