This commit is contained in:
Camillo Bruni 2024-11-26 12:11:20 +01:00
parent d1c46f2ff8
commit d2ed65b88a
7 changed files with 7 additions and 6 deletions

View file

@ -374,6 +374,7 @@ class Driver {
var magicFrame = magic.contentDocument.getElementById("magicframe");
magicFrame.contentDocument.open();
magicFrame.contentDocument.write("<!DOCTYPE html><head><title>benchmark payload</title></head><body>\n" + string + "</body></html>");
return magicFrame;
}

View file

@ -37,7 +37,7 @@ class Benchmark {
}
}
validate()
validate(iterations)
{
for (let flightPlan of expectedFlightPlans) {
flightPlan.calculate();

View file

@ -36,7 +36,7 @@ class Benchmark {
this.ast = parse("LowLevelInterpreter.asm");
}
validate()
validate(iterations)
{
let astDumpedAsLines = this.ast.dump().split("\n");

View file

@ -53,7 +53,7 @@ class Benchmark {
areFirstAndLastResultsEqual(() => bd1.dividedBy(bd2));
}
validate() {
validate(iterations) {
if (!this._allFirstAndLastResultsAreEqual)
throw new Error("Expected all first and last results to be equal, but they aren't.");
}

View file

@ -52,7 +52,7 @@ class Benchmark {
this._decryptedMulIsCorrect &&= decryptedMul === 123456789012345678900n;
}
validate() {
validate(iterations) {
if (!this._c1DecryptedIsCorrect)
throw new Error("Bad value: c1Decrypted!");

View file

@ -451,7 +451,7 @@ class Benchmark {
}
}
validate() {
validate(iterations) {
if (this.tokenCount !== 113975)
throw new Error(`this.tokenCount of ${this.tokenCount} is invalid!`);
}

View file

@ -613,7 +613,7 @@ class Benchmark {
this.totalLength += binaryTree().length;
}
validate() {
validate(iterations) {
if (this.totalLength !== 635)
throw new Error(`this.totalLength of ${this.totalLength} is invalid!`);
}