Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
543c15a
commit 00783f5
Showing
9 changed files
with
134 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import Benchmark from "benchmark"; | ||
import baseline from "@babel-baseline/helper-compilation-targets"; | ||
import current from "@babel/helper-compilation-targets"; | ||
import { report } from "../util.mjs"; | ||
|
||
const suite = new Benchmark.Suite("", { initCount: 0 }); | ||
function benchCases(implementation, name) { | ||
suite.add(name + "#getTargets last1", () => { | ||
implementation({ | ||
browsers: [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version", | ||
"last 1 iOS version", | ||
"last 1 edge version", | ||
], | ||
}); | ||
}); | ||
suite.add(name + "#getTargets last100", () => { | ||
implementation({ | ||
browsers: [ | ||
"last 100 chrome version", | ||
"last 100 firefox version", | ||
"last 100 safari version", | ||
"last 100 iOS version", | ||
"last 100 edge version", | ||
], | ||
}); | ||
}); | ||
suite.add(name + "#getTargets chrome 49 ie 11", () => { | ||
implementation({ | ||
browsers: ["chrome 49", "ie 11"], | ||
}); | ||
}); | ||
} | ||
|
||
benchCases(baseline.default, "baseline"); | ||
benchCases(current.default, "current"); | ||
|
||
suite.on("cycle", report).run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters