-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add benchmarks for light mode and mixed mode (#2497)
- Loading branch information
1 parent
849abb6
commit bca4d26
Showing
9 changed files
with
115 additions
and
30 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
13 changes: 13 additions & 0 deletions
13
...ne-dom/benchmark-styled-component/light-styled-component-create-1k-different.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,13 @@ | ||
/* | ||
* Copyright (c) 2018, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: MIT | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
import components from 'perf-benchmarks-components/dist/dom/benchmark/light/styledComponents.js'; | ||
import { styledComponentBenchmark } from '../../../utils/styledComponentBenchmark'; | ||
|
||
// Create 1k components with different CSS in each component | ||
// These are light DOM components running in native mode | ||
styledComponentBenchmark(`benchmark-styled-component/create/1k/different`, components); |
13 changes: 13 additions & 0 deletions
13
.../engine-dom/benchmark-styled-component/light-styled-component-create-1k-same.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,13 @@ | ||
/* | ||
* Copyright (c) 2018, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: MIT | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
import StyledComponent from 'perf-benchmarks-components/dist/dom/benchmark/light/styledComponent.js'; | ||
import { styledComponentBenchmark } from '../../../utils/styledComponentBenchmark'; | ||
|
||
// Create 1k components with the same CSS in each component | ||
// These are light DOM components running in native mode | ||
styledComponentBenchmark(`benchmark-styled-component/create/1k/same`, StyledComponent); |
17 changes: 17 additions & 0 deletions
17
...om/benchmark-styled-component/ss-native-styled-component-create-1k-different.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,17 @@ | ||
/* | ||
* Copyright (c) 2018, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: MIT | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
import components from 'perf-benchmarks-components/dist/dom/benchmark/shadow/styledComponents.js'; | ||
import { styledComponentBenchmark } from '../../../utils/styledComponentBenchmark'; | ||
|
||
// Create 1k components with different CSS in each component | ||
// These components are native, but run with synthetic shadow loaded (mixed mode) | ||
window.lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE = true; | ||
for (const component of components) { | ||
component.shadowSupportMode = 'any'; | ||
} | ||
styledComponentBenchmark(`ss-benchmark-styled-component/create/1k/different`, components); |
15 changes: 15 additions & 0 deletions
15
...ine-dom/benchmark-styled-component/ss-native-styled-component-create-1k-same.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 @@ | ||
/* | ||
* Copyright (c) 2018, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: MIT | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
import StyledComponent from 'perf-benchmarks-components/dist/dom/benchmark/shadow/styledComponent.js'; | ||
import { styledComponentBenchmark } from '../../../utils/styledComponentBenchmark'; | ||
|
||
// Create 1k components with the same CSS in each component | ||
// These components are native, but run with synthetic shadow loaded (mixed mode) | ||
window.lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE = true; | ||
StyledComponent.shadowSupportMode = 'any'; | ||
styledComponentBenchmark(`ss-benchmark-styled-component/create/1k/same`, StyledComponent); |
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