Skip to content

Commit f300f67

Browse files
committed
s/traceName/passName
1 parent 4ef3c98 commit f300f67

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

lighthouse-core/config/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ function validatePasses(passes, audits, rootPath) {
131131
return;
132132
}
133133

134-
const passName = pass.traceName || Audit.DEFAULT_PASS;
134+
const passName = pass.passName || Audit.DEFAULT_PASS;
135135
if (usedNames.has(passName)) {
136136
log.warn('config', `passes[${index}] may overwrite trace or network ` +
137-
`data of earlier pass without a unique traceName (repeated name: ${passName}.`);
137+
`data of earlier pass without a unique passName (repeated name: ${passName}.`);
138138
}
139139
usedNames.add(passName);
140140
});

lighthouse-core/gather/gather-runner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class GatherRunner {
176176
});
177177
}, pass);
178178

179-
// Resolve on tracing data using traceName from config.
179+
// Resolve on tracing data using passName from config.
180180
return pass.then(_ => loadData);
181181
}
182182

@@ -227,7 +227,7 @@ class GatherRunner {
227227
.then(passData => {
228228
// If requested by config, merge trace and network data for this
229229
// pass into tracingData.
230-
const passName = config.traceName || Audit.DEFAULT_PASS;
230+
const passName = config.passName || Audit.DEFAULT_PASS;
231231
config.trace && (tracingData.traces[passName] = passData.trace);
232232
config.network && (tracingData.networkRecords[passName] = passData.networkRecords);
233233

lighthouse-core/lib/asset-saver.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ function saveArtifacts(artifacts, filename) {
8181
}
8282

8383
function prepareAssets(options, artifacts) {
84-
const traceData = Object.keys(artifacts.traces).map(traceName => {
85-
const filteredTrace = Object.assign({}, artifacts.traces[traceName]);
84+
const traceData = Object.keys(artifacts.traces).map(passName => {
85+
const filteredTrace = Object.assign({}, artifacts.traces[passName]);
8686
filteredTrace.traceEvents = filterForSize(filteredTrace.traceEvents);
8787
return filteredTrace;
8888
});

lighthouse-core/test/config/config-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ describe('Config', () => {
3939
assert.equal(defaultConfig.audits.length, config.audits.length);
4040
});
4141

42-
it('warns when a traceName is used twice', () => {
42+
it('warns when a passName is used twice', () => {
4343
const unlikelyPassName = 'unlikelyPassName';
4444
const configJson = {
4545
passes: [{
4646
network: true,
47-
traceName: unlikelyPassName,
47+
passName: unlikelyPassName,
4848
gatherers: []
4949
}, {
5050
network: true,
51-
traceName: unlikelyPassName,
51+
passName: unlikelyPassName,
5252
gatherers: []
5353
}],
5454
audits: []
@@ -68,7 +68,7 @@ describe('Config', () => {
6868
});
6969
});
7070

71-
it('warns when traced twice with no traceNames', () => {
71+
it('warns when traced twice with no passNames specified', () => {
7272
const configJson = {
7373
passes: [{
7474
network: true,

lighthouse-core/test/gather/gather-runner-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,14 @@ describe('GatherRunner', function() {
256256
const passes = [{
257257
network: true,
258258
trace: true,
259-
traceName: 'firstPass',
259+
passName: 'firstPass',
260260
loadPage: true,
261261
gatherers: [
262262
t1
263263
]
264264
}, {
265265
loadPage: true,
266-
traceName: 'secondPass',
266+
passName: 'secondPass',
267267
gatherers: [
268268
t2
269269
]
@@ -286,13 +286,13 @@ describe('GatherRunner', function() {
286286
const passes = [{
287287
network: true,
288288
trace: true,
289-
traceName: 'firstPass',
289+
passName: 'firstPass',
290290
loadPage: true,
291291
gatherers: [new TestGatherer()]
292292
}, {
293293
network: true,
294294
trace: true,
295-
traceName: 'secondPass',
295+
passName: 'secondPass',
296296
loadPage: true,
297297
gatherers: [new TestGatherer()]
298298
}];
@@ -315,7 +315,7 @@ describe('GatherRunner', function() {
315315
const passes = [{
316316
network: true,
317317
trace: true,
318-
traceName: 'firstPass',
318+
passName: 'firstPass',
319319
loadPage: true,
320320
gatherers: [
321321
t1
@@ -365,7 +365,7 @@ describe('GatherRunner', function() {
365365
const passes = [{
366366
network: true,
367367
trace: true,
368-
traceName: 'firstPass',
368+
passName: 'firstPass',
369369
loadPage: true,
370370
gatherers: [new TestGatherer()]
371371
}];

0 commit comments

Comments
 (0)