forked from tpruvot/yiimp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
2016-06-04-bench_chips.sql
53 lines (45 loc) · 1.52 KB
/
2016-06-04-bench_chips.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
-- Recent additions to add after db init (.gz)
-- mysql yaamp -p < file.sql
-- Devices suffix, to prevent hardcoding in functions
CREATE TABLE `bench_suffixes` (
`vendorid` varchar(12) NOT NULL PRIMARY KEY,
`chip` varchar(32) NULL,
`suffix` varchar(32) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Family averages, will be used as perf/algo ratio
CREATE TABLE `bench_chips` (
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`devicetype` varchar(8) NULL,
`vendorid` varchar(12) NULL,
`chip` varchar(32) NULL,
`year` int(4) UNSIGNED NULL,
`maxtdp` double NULL,
`blake_rate` double NULL,
`blake_power` double NULL,
`x11_rate` double NULL,
`x11_power` double NULL,
`sha_rate` double NULL,
`sha_power` double NULL,
`scrypt_rate` double NULL,
`scrypt_power` double NULL,
`dag_rate` double NULL,
`dag_power` double NULL,
`lyra_rate` double NULL,
`lyra_power` double NULL,
`neo_rate` double NULL,
`neo_power` double NULL,
`url` varchar(255) NULL,
`features` varchar(255) NULL,
`perfdata` text NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `bench_chips`
ADD INDEX `ndx_chip_type` (`devicetype`),
ADD INDEX `ndx_chip_name` (`chip`);
ALTER TABLE `benchmarks`
ADD `idchip` int(11) NULL AFTER `vendorid`,
ADD `chip` varchar(32) NULL AFTER `vendorid`,
ADD `mem` int(8) NULL AFTER `arch`;
ALTER TABLE `benchmarks`
ADD KEY `ndx_chip` (`idchip`);
ALTER TABLE `benchmarks` ADD CONSTRAINT fk_bench_chip FOREIGN KEY (`idchip`)
REFERENCES `bench_chips` (`id`) ON DELETE RESTRICT;