Skip to content

Commit

Permalink
chore: reorganize benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jul 27, 2021
1 parent e0dc925 commit 06b0d8b
Show file tree
Hide file tree
Showing 41 changed files with 101 additions and 121 deletions.
@@ -1,8 +1,8 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/generator";
import current from "../../lib/index.js";
import current from "@babel/generator";
import parser from "@babel/parser";
import { report } from "../util.mjs";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,8 +1,8 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/generator";
import current from "../../lib/index.js";
import current from "@babel/generator";
import parser from "@babel/parser";
import { report } from "../util.mjs";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,8 +1,8 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/generator";
import current from "../../lib/index.js";
import current from "@babel/generator";
import parser from "@babel/parser";
import { report } from "../util.mjs";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,8 +1,8 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/generator";
import current from "../../lib/index.js";
import current from "@babel/generator";
import parser from "@babel/parser";
import { report } from "../util.mjs";
import { report } from "../../util.mjs";
import { readFileSync } from "fs";

const suite = new Benchmark.Suite();
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel/helper-validator-identifier-baseline";
import current from "../lib/index.js";
import { report } from "./util.mjs";
import baseline from "@babel-baseline/helper-validator-identifier";
import current from "@babel/helper-validator-identifier";
import { report } from "../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel/helper-validator-identifier-baseline";
import current from "../lib/index.js";
import { report } from "./util.mjs";
import baseline from "@babel-baseline/helper-validator-identifier";
import current from "@babel/helper-validator-identifier";
import { report } from "../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel/helper-validator-identifier-baseline";
import current from "../lib/index.js";
import { report } from "./util.mjs";
import baseline from "@babel-baseline/helper-validator-identifier";
import current from "@babel/helper-validator-identifier";
import { report } from "../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel/helper-validator-identifier-baseline";
import current from "../lib/index.js";
import { report } from "./util.mjs";
import baseline from "@babel-baseline/helper-validator-identifier";
import current from "@babel/helper-validator-identifier";
import { report } from "../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel/helper-validator-identifier-baseline";
import current from "../lib/index.js";
import { report } from "./util.mjs";
import baseline from "@babel-baseline/helper-validator-identifier";
import current from "@babel/helper-validator-identifier";
import { report } from "../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
// All codepoints in [0x4e00, 0x9ffc] are valid identifier name per Unicode 13
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();

Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "../../lib/index-main.js";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "../../lib/index-main.js";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
// All codepoints in [0x4e00, 0x9ffc] are valid identifier name per Unicode 13
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
// All codepoints in [0x4e00, 0x9ffc] are valid identifier name per Unicode 13
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "../../lib/index-v2.js";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
@@ -1,7 +1,7 @@
import Benchmark from "benchmark";
import baseline from "@babel-baseline/parser";
import current from "../../lib/index.js";
import { report } from "../util.mjs";
import current from "@babel/parser";
import { report } from "../../util.mjs";

const suite = new Benchmark.Suite();
function createInput(length) {
Expand Down
14 changes: 14 additions & 0 deletions benchmark/package.json
@@ -0,0 +1,14 @@
{
"name": "@babel/benchmark",
"private": true,
"type": "module",
"devDependencies": {
"@babel-baseline/generator": "npm:@babel/generator@7.14.5",
"@babel-baseline/helper-validator-identifier": "npm:@babel/helper-validator-identifier@7.10.4",
"@babel-baseline/parser": "npm:@babel/parser@7.14.5",
"@babel/generator": "workspace:*",
"@babel/helper-validator-identifier": "workspace:*",
"@babel/parser": "workspace:*",
"benchmark": "^2.1.4"
}
}
File renamed without changes.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -75,7 +75,8 @@
"eslint/*",
"packages/*",
"test/esm",
"test/runtime-integration/*"
"test/runtime-integration/*",
"benchmark"
],
"resolutions": {
"browserslist": "npm:4.16.6",
Expand Down
3 changes: 0 additions & 3 deletions packages/babel-generator/package.json
Expand Up @@ -24,12 +24,9 @@
"source-map": "^0.5.0"
},
"devDependencies": {
"@babel-baseline/generator": "npm:@babel/generator@7.14.5",
"@babel/helper-fixtures": "workspace:*",
"@babel/parser": "workspace:*",
"@types/jsesc": "^2.5.0",
"@types/source-map": "^0.5.0",
"benchmark": "^2.1.4",
"charcodes": "^0.2.0"
},
"engines": {
Expand Down
1 change: 0 additions & 1 deletion packages/babel-helper-validator-identifier/.npmignore
@@ -1,4 +1,3 @@
benchmark
src
test
*.log
17 changes: 0 additions & 17 deletions packages/babel-helper-validator-identifier/benchmark/util.mjs

This file was deleted.

2 changes: 0 additions & 2 deletions packages/babel-helper-validator-identifier/package.json
Expand Up @@ -14,9 +14,7 @@
"main": "./lib/index.js",
"exports": "./lib/index.js",
"devDependencies": {
"@babel/helper-validator-identifier-baseline": "npm:@babel/helper-validator-identifier@7.10.4",
"@unicode/unicode-13.0.0": "^1.0.6",
"benchmark": "^2.1.4",
"charcodes": "^0.2.0"
},
"engines": {
Expand Down
17 changes: 0 additions & 17 deletions packages/babel-parser/benchmark/util.mjs

This file was deleted.

2 changes: 0 additions & 2 deletions packages/babel-parser/package.json
Expand Up @@ -33,11 +33,9 @@
"node": ">=6.0.0"
},
"devDependencies": {
"@babel-baseline/parser": "npm:@babel/parser@^7.14.5",
"@babel/code-frame": "workspace:*",
"@babel/helper-fixtures": "workspace:*",
"@babel/helper-validator-identifier": "workspace:*",
"benchmark": "^2.1.4",
"charcodes": "^0.2.0"
},
"bin": "./bin/babel-parser.js"
Expand Down

0 comments on commit 06b0d8b

Please sign in to comment.