Skip to content

Commit d6f4edd

Browse files
committed
compute factors from all frameworks
1 parent 9a590a6 commit d6f4edd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

webdriver-ts-results/src/Common.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ export class ResultTableData {
188188
// benchmarksMEM: Array<Benchmark>;
189189
// Columns
190190
frameworks: Array<Framework>;
191+
frameworksForFactors: Array<Framework>;
191192
selectedFameworks: Set<Framework>;
192193
// Cell data
193194
// resultsCPU: Array<Array<TableResultValueEntry|null>>; // [benchmark][framework]
@@ -221,9 +222,9 @@ export class ResultTableData {
221222
}
222223
})
223224
this.frameworks = this.allFrameworks.filter(framework => framework.type === type && this.selectedFameworks.has(framework));
225+
this.frameworksForFactors = this.allFrameworks.filter(framework => framework.type === type
226+
&& framework.issues.every(i => allowedIssues.has(i)));
224227
this.update(sortKey);
225-
226-
227228
}
228229
private update(sortKey: string) {
229230
console.time("update");
@@ -334,7 +335,8 @@ export class ResultTableData {
334335
}
335336

336337
computeFactors(benchmark: Benchmark): Array<TableResultValueEntry|null> {
337-
const benchmarkResults = this.frameworks.map(f => this.results(benchmark, f));
338+
debugger;
339+
const benchmarkResults = this.frameworksForFactors.map(f => this.results(benchmark, f));
338340
const selectFn = (result: Result|null) => {
339341
if (result===null) return 0;
340342
if (this.displayMode === DisplayMode.DisplayMedian) {
@@ -343,7 +345,7 @@ export class ResultTableData {
343345
return result.mean;
344346
}
345347
}
346-
let min = Math.max(benchmarkResults.reduce((min, result) => result===null ? min : Math.min(min, selectFn(result)), Number.POSITIVE_INFINITY));
348+
const min = Math.max(benchmarkResults.reduce((min, result) => result===null ? min : Math.min(min, selectFn(result)), Number.POSITIVE_INFINITY));
347349
// if (benchmark.type === BenchmarkType.CPU) {
348350
// min = Math.max(1000/60, min);
349351
// }
@@ -352,7 +354,7 @@ export class ResultTableData {
352354
if (result === null) return null;
353355

354356
const value = selectFn(result);
355-
let factor = value/min;
357+
const factor = value/min;
356358
// if (benchmark.type === BenchmarkType.CPU) {
357359
// factor = Math.max(1, factor);
358360
// }

0 commit comments

Comments
 (0)