Skip to content

Commit

Permalink
Transfer project to V8.
Browse files Browse the repository at this point in the history
- Update the license to the 3-BSD license used by the V8 project,
  and add notes for the external files in the resources folder.
- Update the copyright to the V8 project authors.
- Mention signing the CLA in the CONTRIBUTING.md document.
- Rename resources to third_party.
- Change URL to github.com/v8/web-tooling-benchmark
  • Loading branch information
bmeurer committed Oct 18, 2017
1 parent e208f9d commit 857fc67
Show file tree
Hide file tree
Showing 63 changed files with 277 additions and 890 deletions.
20 changes: 13 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Contributions are always welcome, no matter how large or small. Before
contributing, please read the
[code of conduct](https://github.com/bmeurer/web-tooling-benchmark/blob/master/CODE_OF_CONDUCT.md).
[code of conduct](https://github.com/v8/web-tooling-benchmark/blob/master/CODE_OF_CONDUCT.md).

## Setup locally

Expand All @@ -11,7 +11,7 @@ contributing, please read the
To start developing on the Web Tooling Benchmark you only need to install its dependencies:

```bash
git clone https://github.com/bmeurer/web-tooling-benchmark
git clone https://github.com/v8/web-tooling-benchmark
cd web-tooling-benchmark
npm install
```
Expand All @@ -28,12 +28,18 @@ There's no formal test suite yet. For now the process is roughly:

## Creating a new benchmark

> Example: https://github.com/bmeurer/web-tooling-benchmark/pull/10
- Create a new issue that describes the motivation for including the benchmark. Include any relevant information.
- The pull request should include:
- [ ] An update to the [in-depth.md](https://github.com/bmeurer/web-tooling-benchmark/blob/master/docs/in-depth.md) document. Add a new entry to that list for the new benchmark, which describes the tool and the concrete benchmark case.
- [ ] Add a new file `src/foo-benchmark.js`, which includes the actual driver code for the benchmark (see the [`src/babylon-benchmark.js`](https://github.com/bmeurer/web-tooling-benchmark/blob/master/src/babylon-benchmark.js) for example).
- [ ] An update to the [in-depth.md](https://github.com/v8/web-tooling-benchmark/blob/master/docs/in-depth.md) document. Add a new entry to that list for the new benchmark, which describes the tool and the concrete benchmark case.
- [ ] Add a new file `src/foo-benchmark.js`, which includes the actual driver code for the benchmark (see the [`src/babylon-benchmark.js`](https://github.com/v8/web-tooling-benchmark/blob/master/src/babylon-benchmark.js) for example).
- [ ] Add a new file `src/foo-benchmark.test.js`, which checks that the benchmark in `src/foo-benchmark.js` at least runs to completion.
- [ ] `npm install --save-exact` any necessary dependencies, and be sure to include both the `package.json` and the `package-lock.json` changes in your pull request.
- [ ] Put any assets used by the benchmark into the `resources` folder and hook them up with the virtual file system in `src/vfs.js`.
- [ ] Put any assets used by the benchmark into the `third_party` folder and hook them up with the virtual file system in `src/vfs.js`.

## Sign the CLA

Before we can use your code you have to sign the [Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual), which you can do online. This is mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things, for instance that you’ll tell us if you know that your code infringes on other people’s patents. You don’t have to do this until after you’ve submitted your code for review and a member has approved it, but you will have to do it before we can put your code into our codebase.

Contributions made by corporations are covered by a different agreement than the one above, the [Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate).

Sign them online [here](https://cla.developers.google.com/).
104 changes: 82 additions & 22 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,22 +1,82 @@
MIT License

Copyright (c) 2017 Benedikt Meurer

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This license applies to all parts of web-tooling-benchmark that are not
externally maintained libraries. The externally maintained libraries
used by web-tooling-benchmark are:

- The Backbone.js distribution, located in third_party/backbone-1.1.0.js.
This is copyrighted by Jeremy Ashkenas, DocumentCloud, and released
under the terms of the MIT license.

- The lexer from the CoffeeScript project, located in
third_party/coffeescript-lexer-2.0.1.coffee, which is copyrighted by
Jeremy Ashkenas, and relased under the terms of the MIT license.

- The jQuery distribution, located in third_party/jquery-3.2.1.js. This
is copyrighted by the JS Foundation and other contributors, and
released under the terms of the MIT license.

- The Lodash distribution, located in third_party/lodash.core-4.17.4.js
and third_party/lodash.min-4.17.4.js.map. This is copyrighted by
the JS Foundation and other contributors, and released under the
terms of the MIT license.

- The MooTools distribution, located in third_party/mootools-core-1.6.0.js.
This is copyrighted by Valerio Proietti, and released under the
terms of the MIT license.

- The Preact distribution, located in third_party/preact-8.2.5.js and
third_party/preact-8.2.5.js.map. This is copyrighted by Jason Miller,
and released under the terms of the MIT license.

- The Redux distribution, located in third_party/redux.min-3.7.2.js.
This is copyrighted by Dan Abramov, and released under the terms
of the MIT license.

- The source-map distribution, located in
third_party/source-map.min-0.5.7.map. This is copyrighted by the
Mozilla Foundation and contributors, and released under the terms
of a 3-clause BSD license.

- Several tests from the TodoMVC distribution, located in
third_party/speedometer-es2015-test-2.0.js and third_party/todomvc.
These are copyrighted by Addy Osmani, Sindre Sorhus, Pascal
Hartig, Stephen Sawchuk, and released under the terms of the
MIT license.

- The Underscore.js distribution, located in
third_party/underscore-1.8.3.js and
third_party/underscore.min-1.8.3.js.map. This is copyrighted by
Jeremy Ashkenas, and released under the terms of the MIT license.

- The VueJS distribution, located in
third_party/vue.runtime.esm-nobuble-2.4.4.js. This is copyrighted
Yuxi (Evan) You, and released under the terms of the MIT license.

These libraries have their own licenses; we recommend you read them,
as their terms may differ from the terms below.

Copyright 2017, the V8 project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Web Tooling Benchmark

[![Build Status](https://travis-ci.org/bmeurer/web-tooling-benchmark.svg?branch=master)](https://travis-ci.org/bmeurer/web-tooling-benchmark) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Build Status](https://travis-ci.org/v8/web-tooling-benchmark.svg?branch=master)](https://travis-ci.org/v8/web-tooling-benchmark) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

This is work-in-progress benchmark suite that tries to measure the
JavaScript related workloads required by Web Developers nowadays.
It's the explicit goal not to measure I/O or other non-JavaScript
related tasks.

See the [in-depth
analysis](https://github.com/bmeurer/web-tooling-benchmark/blob/master/docs/in-depth.md)
analysis](https://github.com/v8/web-tooling-benchmark/blob/master/docs/in-depth.md)
for a detailed description of the tests included in this benchmark suite.

## Building
Expand Down
4 changes: 2 additions & 2 deletions docs/in-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ itself.
the good parts of JavaScript in a simple way. At some point CoffeeScript was very
popular.

This benchmark runs the CoffeeScript compiler on the [`lexer.coffee`](https://github.com/bmeurer/web-tooling-benchmark/blob/resources/coffeescript-lexer-2.0.1.coffee)
This benchmark runs the CoffeeScript compiler on the [`lexer.coffee`](https://github.com/v8/web-tooling-benchmark/blob/third_party/coffeescript-lexer-2.0.1.coffee)
file from the CoffeeScript 2.0.1 distribution.

## espree
Expand Down Expand Up @@ -170,4 +170,4 @@ the ES2015 test in the [Speedometer](https://browserbench.org/Speedometer)
## uglify-es

This benchmark stresses the new ES2015 and beyond minifier using the 196KiB
ES2015 module containing the untranspiled [Vue](https://github.com/vuejs/vue) bundle.
ES2015 module containing the untranspiled [Vue](https://github.com/vuejs/vue) bundle.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "web-tooling-benchmark",
"description": "JavaScript Benchmark for common Web Developer workloads",
"version": "0.2.0",
"repository": "https://github.com/bmeurer/web-tooling-benchmark",
"repository": "https://github.com/v8/web-tooling-benchmark",
"main": "src/cli.js",
"scripts": {
"build:uglify-es-bundled": "./node_modules/uglify-es/bin/uglifyjs -b preamble=\"'const UglifyJS = module.exports = {};'\" --self > ./build/uglify-es-bundled.js",
Expand Down Expand Up @@ -31,7 +31,7 @@
"email": "[email protected]",
"url": "http://benediktmeurer.de"
},
"license": "MIT",
"license": "BSD",
"dependencies": {
"acorn": "5.1.2",
"babel-standalone": "7.0.0-beta.2",
Expand Down
25 changes: 4 additions & 21 deletions src/acorn-benchmark.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
// Copyright (c) 2017 Benedikt Meurer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

const acorn = require("acorn");
const fs = require("fs");
Expand Down Expand Up @@ -57,7 +40,7 @@ const payloads = [
options: { ecmaVersion: 7, sourceType: "module" }
}
].map(({ name, options }) => ({
payload: fs.readFileSync(`resources/${name}`, "utf8"),
payload: fs.readFileSync(`third_party/${name}`, "utf8"),
options: Object.assign(options, { locations: true }, { ranges: true })
}));

Expand Down
23 changes: 3 additions & 20 deletions src/acorn-benchmark.test.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
// Copyright (c) 2017 Benedikt Meurer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

const acornBenchmark = require("./acorn-benchmark");

Expand Down
25 changes: 4 additions & 21 deletions src/babel-benchmark.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
// Copyright (c) 2017 Benedikt Meurer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

const Babel = require("babel-standalone");
const babylon = require("babylon");
Expand All @@ -29,7 +12,7 @@ const payloads = [
options: { presets: ["es2015"], sourceType: "module" }
}
].map(({ name, options }) => {
const code = fs.readFileSync(`resources/${name}`, "utf8");
const code = fs.readFileSync(`third_party/${name}`, "utf8");
const ast = babylon.parse(code, options);
return { ast, code, options };
});
Expand Down
23 changes: 3 additions & 20 deletions src/babel-benchmark.test.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
// Copyright (c) 2017 Benedikt Meurer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

const babelBenchmark = require("./babel-benchmark");

Expand Down
25 changes: 4 additions & 21 deletions src/babylon-benchmark.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
// Copyright (c) 2017 Benedikt Meurer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

const babylon = require("babylon");
const fs = require("fs");
Expand Down Expand Up @@ -64,7 +47,7 @@ const payloads = [
options: { sourceType: "module" }
}
].map(({ name, options }) => ({
payload: fs.readFileSync(`resources/${name}`, "utf8"),
payload: fs.readFileSync(`third_party/${name}`, "utf8"),
options
}));

Expand Down
Loading

0 comments on commit 857fc67

Please sign in to comment.