-
Notifications
You must be signed in to change notification settings - Fork 3
/
start-naive.js
172 lines (167 loc) · 5.62 KB
/
start-naive.js
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
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
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
165
166
167
168
169
170
171
172
// node tests/experiments/naive/start-naive.js > naive-bench.log 2>&1
const benchmarkDir = require('../benchmark_config')();
const ITERATIONS = 1; //number of repetitions/iterations (1 time used in the experiments)
const RUNS = 100; //number of runs for calculate bug reproduction ratio (100 used in experiments)
const runNaiveRacer = require('./comparison-naive');
// header
console.log('iteration,runs,tool,benchmark,numberOfFails,numberOfFailuresWithHbViolations,numberOfRunsWithHbViolations,avgNeedlessPostpones,numOfCallbacks');
// Change property 'shouldRun' to false to not run some benchmarks
let benchmarks = [
{
// #1 - AKA
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'AKA',
benchmarkDir: `${benchmarkDir}/known-bugs/agentkeepalive-23`,
command: 'timeout 2 node fuzz_test/triggerRace.js',
errorMessage: 'ECONNRESET',
silent: false
},
{
// #2 - FPS
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'FPS',
benchmarkDir: `${benchmarkDir}/known-bugs/fiware-pep-steelskin`,
command: './node_modules/.bin/mocha test/unit/race_simple.js --timeout 10000',
errorMessage: '0 passing',
logFileNumber: 2,
silent: false
},
{
// #3 - GHO
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'GHO',
benchmarkDir: `${benchmarkDir}/known-bugs/WhiteboxGhost`,
command: 'node fuzz_test/add_mock.js',
commandLog: 'node fuzz_test/add_mock.js -c fuzz_test/noderacer-settings.json',
errorMessage: 'FAILURE',
silent: false
},
{
// #4 - MKD
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'MKD',
benchmarkDir: `${benchmarkDir}/known-bugs/node-mkdirp`,
command: 'node fuzz_test/race_subtle.js',
errorMessage: 'Failed run',
silent: false
},
{
// #5 - NES
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'NES',
benchmarkDir: `${benchmarkDir}/known-bugs/nes`,
command: 'node_modules/lab/bin/lab -v test/client_TP.js',
errorMessage: '1 of 1 tests failed',
silent: false
},
{
// #6 - NLF
// for this benchmark, set true to 'this.printAllTime' in lib/controller/strategies/noHbRandom.js
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'NLF',
benchmarkDir: `${benchmarkDir}/known-bugs/node-logger-file-1`,
command: 'timeout 10 node fuzz_test/triggerRace.js 10',
commandLog: 'node fuzz_test/triggerRace.js 10 -c noderacer-setttings.json',
errorMessage: 'ERROR',
takeTheLast: true,
silent: false
},
{
// #7 - SIO
// for this benchmark, set true to 'this.printAllTime' in lib/controller/strategies/noHbRandom.js
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'SIO',
benchmarkDir: `${benchmarkDir}/known-bugs/socket.io-1862`,
command: 'timeout 10 node fuzz_test/triggerRace.js',
errorMessage: 'ERROR',
takeTheLast: true,
silent: false
},
{
// #8 - DEL
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'DEL',
benchmarkDir: `${benchmarkDir}/known-bugs/del`,
command: 'node testissue43.js',
commandLog: 'node testissue43.js -c noderacer-setttings.json',
errorMessage: 'Error: ENOENT:',
silent: false
},
{
// #9 - LST
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'LST',
benchmarkDir: `${benchmarkDir}/known-bugs/linter-stylint`,
command: 'node syntetic/test.js',
errorMessage: 'showing wrong message:',
silent: false
},
{
// #10 - NSC
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'NSC',
benchmarkDir: `${benchmarkDir}/known-bugs/node-simplecrawler-i298`,
command: 'node merged-test.js',
commandLog: 'node merged-test.js -c noderacer-setttings.json',
errorMessage: 'no enough events performed before',
silent: false
},
{
// #11 - XLS
shouldRun: true,
iterations: ITERATIONS,
runs: RUNS,
strategy: 'NaiveRacer',
strategyCommand: 'noHbRandom',
benchmarkName: 'XLS',
benchmarkDir: `${benchmarkDir}/known-bugs/xlsx-extract`,
command: `./node_modules/mocha/bin/mocha test/tests.js -g 'should read all columns and rows'`,
errorMessage: '0 passing',
logFileNumber: 2,
noGlobal: true,
silent: false
}
];
benchmarks
.filter(b => b.shouldRun)
.forEach(b => runNaiveRacer(b));