-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(best-config): Enable multi-project configurations (#60)
* Create new example project * Collect repository info * Fixing duration on runner node + bubbling errors on benchmark construction * Fix rootDir paths * Fix linting * Fix perf command * Fix output * Minor label change * Change perf test folder
- Loading branch information
Showing
45 changed files
with
397 additions
and
246 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
projects: [ | ||
'<rootDir>/examples/simple_benchmark', | ||
'<rootDir>/examples/simple_lwc_benchmark', | ||
] | ||
}; |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const MOCK_DATA_SMALL = { | ||
"id": "0001", | ||
"type": "donut", | ||
"name": "Cake", | ||
"ppu": 0.55, | ||
"batters": { | ||
"batter":[ | ||
{ "id": "1001", "type": "Regular" }, | ||
{ "id": "1002", "type": "Chocolate" }, | ||
{ "id": "1003", "type": "Blueberry" }, | ||
{ "id": "1004", "type": "Devil's Food" } | ||
] | ||
}, | ||
"topping": [ | ||
{ "id": "5001", "type": "None" }, | ||
{ "id": "5002", "type": "Glazed" }, | ||
{ "id": "5005", "type": "Sugar" }, | ||
{ "id": "5007", "type": "Powdered Sugar" }, | ||
{ "id": "5006", "type": "Chocolate with Sprinkles" }, | ||
{ "id": "5003", "type": "Chocolate" }, | ||
{ "id": "5004", "type": "Maple" } | ||
] | ||
}; |
15 changes: 15 additions & 0 deletions
15
examples/simple_benchmark/src/__benchmarks__/object_keys.benchmark.js
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,15 @@ | ||
import { MOCK_DATA_SMALL } from "./mock_data"; | ||
|
||
describe('deep_clone', () => { | ||
benchmark('stringify_parse', () => { | ||
run(() => { | ||
JSON.parse(JSON.stringify(MOCK_DATA_SMALL)); | ||
}); | ||
}); | ||
|
||
benchmark('object_assign', () => { | ||
run(() => { | ||
Object.assign({}, MOCK_DATA_SMALL); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,6 +0,0 @@ | ||
import { createElement } from 'engine'; | ||
import App from 'simple-benchmark'; | ||
|
||
const container = document.getElementById('main'); | ||
const element = createElement('simple-benchmark', { is: App }); | ||
container.appendChild(element); | ||
13 changes: 0 additions & 13 deletions
13
examples/simple_benchmark/src/simple-item/__benchmarks__/simple-item-clone.benchmark.js
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
module.exports = { | ||
projectName: 'perf-best-example', | ||
plugins: { | ||
'rollup-plugin-lwc-compiler': { | ||
rootDir: '<rootDir>/src/', | ||
}, | ||
}, | ||
benchmarkOnClient: false, | ||
benchmarkRunner: '@best/runner-headless', | ||
|
||
// This is for running @best/runner-remote | ||
// "benchmarkRunnerConfig": { | ||
// "host": "http://localhost:5000", | ||
// "options": { path: '/best' }, | ||
// "remoteRunner": "@best/runner-headless" | ||
// }, | ||
}; |
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,18 @@ | ||
{ | ||
"name": "@best/simple_lwc_benchmark", | ||
"version": "0.0.7", | ||
"private": true, | ||
"scripts": { | ||
"build": "cross-env rollup -c ./scripts/rollup.config.js", | ||
"perf": "best" | ||
}, | ||
"devDependencies": { | ||
"best": "0.0.7", | ||
"cross-env": "^5.1.3", | ||
"lwc-compiler": "0.17.11", | ||
"lwc-engine": "0.17.11", | ||
"rollup": "~0.53.0", | ||
"rollup-plugin-lwc-compiler": "0.17.11", | ||
"rollup-plugin-replace": "2.0.0" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
import { createElement } from 'engine'; | ||
import App from 'simple-benchmark'; | ||
|
||
const container = document.getElementById('main'); | ||
const element = createElement('simple-benchmark', { is: App }); | ||
container.appendChild(element); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
Oops, something went wrong.