From 05dca8de3e6f77eb3b178027393ca1beb971349d Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Fri, 18 Aug 2023 16:00:47 +0200 Subject: [PATCH] remove brokem benchmark-"runner.mjs file --- resources/benchmark-report.mjs | 84 ---------------------------------- resources/main.mjs | 1 - 2 files changed, 85 deletions(-) delete mode 100644 resources/benchmark-report.mjs diff --git a/resources/benchmark-report.mjs b/resources/benchmark-report.mjs deleted file mode 100644 index bd197819d..000000000 --- a/resources/benchmark-report.mjs +++ /dev/null @@ -1,84 +0,0 @@ -// This file can be customized to report results as needed. - -(function () { - if (!window.testRunner && location.search !== "?webkit" && location.hash !== "#webkit") - return; - - if (window.testRunner) - window.testRunner.waitUntilDone(); - - const scriptElement = document.createElement("script"); - scriptElement.src = "../resources/runner.js"; - document.head.appendChild(scriptElement); - - const styleElement = document.createElement("style"); - styleElement.textContent = "pre { padding-top: 600px; }"; - document.head.appendChild(styleElement); - - let createTest; - const valuesByIteration = []; - - window.onload = () => { - document.body.removeChild(document.querySelector("main")); - startBenchmark(); - }; - - window.benchmarkClient = { - iterationCount: 5, // Use 4 different instances of DRT/WTR to run 5 iterations. - willStartFirstIteration(iterationCount) { - createTest = (name, aggregator, isLastTest, unit = "ms") => { - return { - customIterationCount: iterationCount, - doNotIgnoreInitialRun: true, - doNotMeasureMemoryUsage: true, - continueTesting: !isLastTest, - unit: unit, - name: name, - aggregator: aggregator, - }; - }; - PerfTestRunner.prepareToMeasureValuesAsync(createTest(null, "Geometric")); - }, - didRunSuites(measuredValues) { - PerfTestRunner.measureValueAsync(measuredValues.geomean); - valuesByIteration.push(measuredValues); - }, - didFinishLastIteration() { - document.head.removeChild(document.querySelector("style")); - - const measuredValuesByFullName = {}; - function addToMeasuredValue(value, fullName, aggregator) { - const values = measuredValuesByFullName[fullName] || []; - measuredValuesByFullName[fullName] = values; - values.push(value); - values.aggregator = aggregator; - } - - const scores = []; - valuesByIteration.forEach((measuredValues) => { - scores.push(measuredValues.score); - for (const suiteName in measuredValues.tests) { - const suite = measuredValues.tests[suiteName]; - for (const testName in suite.tests) { - const test = suite.tests[testName]; - for (const subtestName in test.tests) - addToMeasuredValue(test.tests[subtestName], `${suiteName} / ${testName} / ${subtestName}`); - addToMeasuredValue(test.total, `${suiteName}/${testName}`, "Total"); - } - addToMeasuredValue(suite.total, suiteName, "Total"); - } - }); - - PerfTestRunner.reportValues(createTest(null, null, false, "pt"), scores); - - const fullNames = []; - for (const fullName in measuredValuesByFullName) - fullNames.push(fullName); - - for (let i = 0; i < fullNames.length; i++) { - const values = measuredValuesByFullName[fullNames[i]]; - PerfTestRunner.reportValues(createTest(fullNames[i], values.aggregator, i + 1 === fullNames.length), values); - } - }, - }; -})(); diff --git a/resources/main.mjs b/resources/main.mjs index 4bf786a44..8464b700a 100644 --- a/resources/main.mjs +++ b/resources/main.mjs @@ -1,5 +1,4 @@ import { BenchmarkRunner } from "./benchmark-runner.mjs"; -import "./benchmark-report.mjs"; import * as Statistics from "./statistics.mjs"; import { Suites } from "./tests.mjs"; import { renderMetricView } from "./metric-ui.mjs";