diff --git a/performance/arkui/benchMark_Component/.eslintignore b/performance/arkui/benchMark_Component/.eslintignore
new file mode 100644
index 0000000000000000000000000000000000000000..d4dc2e5761bdfccdea56e94d3eff3f1ea26a310a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/.eslintignore
@@ -0,0 +1 @@
+hvigor/hvigor-wrapper.js
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/.gitignore b/performance/arkui/benchMark_Component/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..83aac610e72931feb124646269018cf1396c9445
--- /dev/null
+++ b/performance/arkui/benchMark_Component/.gitignore
@@ -0,0 +1,10 @@
+/node_modules
+/local.properties
+/.idea
+**/build
+/.hvigor
+/package-lock.json
+**/.preview
+**/package-lock.json
+/oh_modules
+**/oh_modules
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/AppScope/app.json5 b/performance/arkui/benchMark_Component/AppScope/app.json5
new file mode 100644
index 0000000000000000000000000000000000000000..a9f1576431c7afa15b266ff6b139cf9ef8662f6b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/AppScope/app.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "bundleName": "cn.openharmony.benchmarksample",
+ "vendor": "example",
+ "versionCode": 1000000,
+ "versionName": "1.0.0",
+ "icon": "$media:app_icon",
+ "label": "$string:app_name"
+ }
+}
diff --git a/performance/arkui/benchMark_Component/AppScope/resources/base/element/string.json b/performance/arkui/benchMark_Component/AppScope/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..4f61693710e9cb924824208f37993983759c6412
--- /dev/null
+++ b/performance/arkui/benchMark_Component/AppScope/resources/base/element/string.json
@@ -0,0 +1,8 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "BenchmarkSample"
+ }
+ ]
+}
diff --git a/performance/arkui/benchMark_Component/AppScope/resources/base/media/app_icon.png b/performance/arkui/benchMark_Component/AppScope/resources/base/media/app_icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and b/performance/arkui/benchMark_Component/AppScope/resources/base/media/app_icon.png differ
diff --git a/performance/arkui/benchMark_Component/build-profile.json5 b/performance/arkui/benchMark_Component/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..d708b6a48914d371d4e5d6991a576970f62ef531
--- /dev/null
+++ b/performance/arkui/benchMark_Component/build-profile.json5
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "signingConfigs": [],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compileSdkVersion": 10,
+ "compatibleSdkVersion": 10
+ }
+ ],
+ "buildModeSet": [
+ {
+ "name": "debug",
+ },
+ {
+ "name": "release"
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/.gitignore b/performance/arkui/benchMark_Component/entry/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/.gitignore
@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/build-profile.json5 b/performance/arkui/benchMark_Component/entry/build-profile.json5
new file mode 100644
index 0000000000000000000000000000000000000000..8e1d0657b6e6528c2a83891933deafcb3dbb0a99
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/build-profile.json5
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ },
+ "targets": [
+ {
+ "name": "default",
+ "runtimeOS": "OpenHarmony"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/hvigorfile.ts b/performance/arkui/benchMark_Component/entry/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b25e77c7c848c86f7b3904a0a772cc1b6adb53a2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/hvigorfile.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/performance/arkui/benchMark_Component/entry/oh-package.json5 b/performance/arkui/benchMark_Component/entry/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..3fbe67bbf8193c883bab1ccea7be318bc3a65bdb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/oh-package.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "license": "",
+ "devDependencies": {},
+ "author": "",
+ "name": "entry",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "version": "1.0.0",
+ "dependencies": {}
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/common/completeStar.svg b/performance/arkui/benchMark_Component/entry/src/main/ets/common/completeStar.svg
new file mode 100644
index 0000000000000000000000000000000000000000..2422f2a48fa3d791d1c9bf8f1f2672f3d2b3abc8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/common/completeStar.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/common/halfStar.svg b/performance/arkui/benchMark_Component/entry/src/main/ets/common/halfStar.svg
new file mode 100644
index 0000000000000000000000000000000000000000..c00aa163878d8e353138ed59355533f34fd90b6c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/common/halfStar.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/common/notCompleteStar.svg b/performance/arkui/benchMark_Component/entry/src/main/ets/common/notCompleteStar.svg
new file mode 100644
index 0000000000000000000000000000000000000000..793ecc50d03e4d401144ba2e80777216c261de14
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/common/notCompleteStar.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/entity/ArrEntity.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/entity/ArrEntity.ets
new file mode 100644
index 0000000000000000000000000000000000000000..abadf8370a33aab1b1605c0b6a222be4ea13e8f4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/entity/ArrEntity.ets
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export class ArrEntity {
+ public static arr: number[] = [];
+ public static textTenLength: string = 'aaaaaaaaaa';
+ public static textTwentyLength: string = 'aaaaaaaaaaaaaaaaaaaa';
+ public static textOneHundredHuLength: string = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
+ //bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown];
+ public static bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow];
+
+ public static pushData(arrlength: number) {
+ ArrEntity.arr = [];
+ for (let i = 0;i < arrlength; i++) {
+ ArrEntity.arr.push(i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/entryability/EntryAbility.ts b/performance/arkui/benchMark_Component/entry/src/main/ets/entryability/EntryAbility.ts
new file mode 100644
index 0000000000000000000000000000000000000000..4cf8e73fe6a87f75ea5c8d1d6cc8d6d1fec18389
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/entryability/EntryAbility.ts
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+import hilog from '@ohos.hilog';
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Want from '@ohos.app.ability.Want';
+import window from '@ohos.window';
+import { updateScale } from '../util/Utils';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage) {
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+ updateScale(this.context.config);
+ windowStage.loadContent('pages/Index', (err, data) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
+ });
+ }
+
+ onWindowStageDestroy() {
+ // Main window is destroyed, release UI related resources
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground() {
+ // Ability has brought to foreground
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground() {
+ // Ability has back to background
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/Index.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/Index.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cd32d28590e32b6a9bfda1c225f09df4a52f4b06
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/Index.ets
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../entity/ArrEntity';
+import { CommonButton } from '../util/CommonButton';
+
+@Entry
+@Component
+struct Index {
+ aboutToAppear() {
+ ArrEntity.pushData(5);
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('BenchmarkSample')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'Text', buttonUrl: 'pages/base/text/TextHome' });
+ CommonButton({ buttonName: 'GridRow', buttonUrl: 'pages/container/gridRow/GridRowHome' });
+ CommonButton({ buttonName: 'GridCol', buttonUrl: 'pages/container/gridCol/GridColHome' });
+ CommonButton({ buttonName: 'TextInput', buttonUrl: 'pages/base/textInput/TextInputHome' });
+ CommonButton({ buttonName: 'Image', buttonUrl: 'pages/base/image/ImageHome' });
+ CommonButton({ buttonName: 'Row', buttonUrl: 'pages/container/row/RowHome' });
+ CommonButton({ buttonName: 'Column', buttonUrl: 'pages/container/column/ColumnHome' });
+ CommonButton({ buttonName: 'List', buttonUrl: 'pages/container/list/ListHome' });
+ CommonButton({ buttonName: 'Scroll', buttonUrl: 'pages/container/scroll/ScrollHome' });
+ CommonButton({ buttonName: 'Tabs', buttonUrl: 'pages/container/tabs/TabsHome' });
+ CommonButton({ buttonName: 'Swiper', buttonUrl: 'pages/container/swiper/SwiperHome' });
+ CommonButton({ buttonName: 'Navigation', buttonUrl: 'pages/base/navigation/NavigationHome' });
+ CommonButton({ buttonName: 'Grid', buttonUrl: 'pages/container/grid/GridHome' });
+ CommonButton({ buttonName: 'Video', buttonUrl: 'pages/other/video/VideoHome' });
+ CommonButton({ buttonName: 'Flex', buttonUrl: 'pages/container/flex/FlexHome' });
+ CommonButton({ buttonName: 'Button', buttonUrl: 'pages/base/button/ButtonHome' });
+ CommonButton({ buttonName: 'Select', buttonUrl: 'pages/base/select/SelectHome' });
+ CommonButton({ buttonName: 'CheckBox', buttonUrl: 'pages/base/checkbox/CheckBoxHome' });
+ CommonButton({ buttonName: 'Span', buttonUrl: 'pages/base/span/SpanHome' });
+ CommonButton({ buttonName: 'Slider', buttonUrl: 'pages/base/slider/SliderHome' });
+ CommonButton({ buttonName: 'Divider', buttonUrl: 'pages/base/divider/DividerHome' });
+ CommonButton({ buttonName: 'Toggle', buttonUrl: 'pages/base/toggle/ToggleHome' });
+ CommonButton({ buttonName: 'Refresh', buttonUrl: 'pages/container/refresh/RefreshHome' });
+ CommonButton({ buttonName: 'TextArea', buttonUrl: 'pages/base/textArea/TextAreaHome' });
+ CommonButton({ buttonName: 'Search', buttonUrl: 'pages/base/search/SearchHome' });
+ CommonButton({ buttonName: 'Progress', buttonUrl: 'pages/base/progress/ProgressHome' });
+ CommonButton({ buttonName: 'Marquee', buttonUrl: 'pages/base/marquee/MarqueeHome' });
+ CommonButton({ buttonName: 'DataPanel', buttonUrl: 'pages/base/dataPanel/DataPanelHome' });
+ CommonButton({ buttonName: 'Rating', buttonUrl: 'pages/base/rating/RatingHome' });
+ CommonButton({ buttonName: 'TextClock', buttonUrl: 'pages/base/textClock/TextClockHome' });
+ CommonButton({ buttonName: 'Hyperlink', buttonUrl: 'pages/container/hyperlink/HyperlinkHome' });
+ CommonButton({ buttonName: 'QRCode', buttonUrl: 'pages/base/qRCode/QRCodeHome' });
+ CommonButton({ buttonName: 'Gauge', buttonUrl: 'pages/base/gauge/GaugeHome' });
+ CommonButton({ buttonName: 'Badge', buttonUrl: 'pages/container/badge/BadgeHome' });
+ CommonButton({ buttonName: 'AlphabetIndexer', buttonUrl: 'pages/base/alphabetIndexer/AlphabetIndexerHome' });
+ CommonButton({ buttonName: 'Menu', buttonUrl: 'pages/base/menu/MenuHome' });
+ CommonButton({ buttonName: 'TextPicker', buttonUrl: 'pages/base/textPicker/TextPickerHome' });
+ CommonButton({ buttonName: 'Counter', buttonUrl: 'pages/container/counter/CounterHome' });
+ CommonButton({ buttonName: 'XComponent', buttonUrl: 'pages/base/xComponent/XComponentHome' });
+ CommonButton({ buttonName: 'PatternLock', buttonUrl: 'pages/base/patternLock/PatternLockHome' });
+ CommonButton({ buttonName: 'Shape', buttonUrl: 'pages/other/shape/ShapeHome' });
+ CommonButton({ buttonName: 'Path', buttonUrl: 'pages/other/path/PathHome' });
+ CommonButton({ buttonName: 'Line', buttonUrl: 'pages/other/line/LineHome' });
+ CommonButton({ buttonName: 'Circle', buttonUrl: 'pages/other/circle/CircleHome' });
+ CommonButton({ buttonName: 'Polyline', buttonUrl: 'pages/other/polyline/PolylineHome' });
+ CommonButton({ buttonName: 'SideBarContainer', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerHome' });
+ CommonButton({ buttonName: 'ImageAnimator', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorHome' });
+ CommonButton({ buttonName: 'LoadingProgress', buttonUrl: 'pages/base/loadingProgress/LoadingProgressHome' });
+ CommonButton({ buttonName: 'TextTimer', buttonUrl: 'pages/base/textTimer/TextTimerHome' });
+ CommonButton({ buttonName: 'Blank', buttonUrl: 'pages/base/blank/BlankHome' });
+ CommonButton({ buttonName: 'Radio', buttonUrl: 'pages/base/radio/RadioHome' });
+ CommonButton({ buttonName: 'ScrollBar', buttonUrl: 'pages/base/scrollBar/ScrollBarHome' });
+
+ }
+ .padding('20vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6a29dd2149221e2a1ab6ee4c32d64a908018f124
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct AlphabetIndexerCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('AlphabetIndexerCreateSample');
+ value: string[] = ['A', 'B', 'C'];
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 });
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..81a81c51f9829282415ca56706dc558546dd6ca8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerHome.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct AlphabetIndexerHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('AlphabetIndexerBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'AlphabetIndexerCreate',buttonUrl:'pages/base/alphabetIndexer/AlphabetIndexerCreateSample'});
+ CommonButton({buttonName:'AlphabetIndexerSelectedColor',buttonUrl:'pages/base/alphabetIndexer/AlphabetIndexerSelectedColorSample'});
+ CommonButton({buttonName:'AlphabetIndexerPopupColor',buttonUrl:'pages/base/alphabetIndexer/AlphabetIndexerPopupColorSample'});
+ CommonButton({buttonName:'AlphabetIndexerSelectedBackgroundColor',buttonUrl:'pages/base/alphabetIndexer/AlphabetIndexerSelectedBackgroundColorSample'});
+ CommonButton({buttonName:'AlphabetIndexerPopupBackground',buttonUrl:'pages/base/alphabetIndexer/AlphabetIndexerPopupBackgroundSample'});
+ CommonButton({buttonName:'AlphabetIndexerSelectedFont',buttonUrl:'pages/base/alphabetIndexer/AlphabetIndexerSelectedFontSample'});
+ CommonButton({buttonName:'AlphabetIndexerPopupFont',buttonUrl:'pages/base/alphabetIndexer/AlphabetIndexerPopupFontSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupBackgroundSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupBackgroundSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..614302a3462e236c2ee85f4d3c6229077217d4ad
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupBackgroundSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct AlphabetIndexerPopupBackgroundSample {
+ timeHelper: TimeHelper = new TimeHelper('AlphabetIndexerPopupBackgroundSample');
+ @State popupBackground: Color = Color.Red;
+ value: string[] = ['A', 'B', 'C'];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change PopupBackground')
+ .id('AlphabetIndexerChangePopupBackground')
+ .margin('5vp')
+ .onClick(() => {
+ this.popupBackground = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.popupBackground == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupBackground(this.popupBackground);
+
+ if (this.popupBackground == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cee3508e231190cc112637a8bd5bcc67ba6fc957
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupColorSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct AlphabetIndexerPopupColorSample {
+ timeHelper: TimeHelper = new TimeHelper('AlphabetIndexerPopupColorSample');
+ @State popupColor: Color = Color.Red;
+ value: string[] = ['A', 'B', 'C'];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change PopupColor')
+ .id('AlphabetIndexerChangePopupColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.popupColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.popupColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupColor(this.popupColor);
+
+ if (this.popupColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupFontSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupFontSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..554371bb9a133d573ef125a6fb3e1001a3db5747
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerPopupFontSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct AlphabetIndexerPopupFontSample {
+ timeHelper: TimeHelper = new TimeHelper('AlphabetIndexerPopupFontSample');
+ @State popupFont: Font = {size:16,weight:FontWeight.Normal,style:FontStyle.Normal};
+ value: string[] = ['A', 'B', 'C'];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change PopupFont')
+ .id('AlphabetIndexerChangePopupFont')
+ .margin('5vp')
+ .onClick(() => {
+ this.popupFont = {size:30,weight:FontWeight.Bolder,style:FontStyle.Italic};
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.popupFont.size == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).popupFont(this.popupFont);
+
+ if (this.popupFont.size == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedBackgroundColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedBackgroundColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..57dfc7249e049bb8c7cd9e4fa8ccf81634b682d1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedBackgroundColorSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct AlphabetIndexerSelectedBackgroundColorSample {
+ timeHelper: TimeHelper = new TimeHelper('AlphabetIndexerSelectedBackgroundColorSample');
+ @State selectedBackgroundColor: Color = Color.Red;
+ value: string[] = ['A', 'B', 'C'];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change SelectedBackgroundColor')
+ .id('AlphabetIndexerChangeSelectedBackgroundColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectedBackgroundColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.selectedBackgroundColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedBackgroundColor(this.selectedBackgroundColor);
+
+ if (this.selectedBackgroundColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0f6ef9d241339f55140918b7b880b55915899dc4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedColorSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct AlphabetIndexerSelectedColorSample {
+ timeHelper: TimeHelper = new TimeHelper('AlphabetIndexerSelectedColorSample');
+ @State selectedColor: Color = Color.Red;
+ value: string[] = ['A', 'B', 'C'];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change SelectedColor')
+ .id('AlphabetIndexerChangeSelectedColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectedColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.selectedColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(this.selectedColor);
+
+ if (this.selectedColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedFontSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedFontSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d685f63a72e43413afd74497813c2c14c8af39a3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/alphabetIndexer/AlphabetIndexerSelectedFontSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct AlphabetIndexerSelectedFontSample {
+ timeHelper: TimeHelper = new TimeHelper('AlphabetIndexerSelectedFontSample');
+ @State selectedFont: Font = {size:16,weight:FontWeight.Normal,style:FontStyle.Normal};
+ value: string[] = ['A', 'B', 'C'];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change SelectedFont')
+ .id('AlphabetIndexerChangeSelectedFont')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectedFont = {size:30,weight:FontWeight.Bolder,style:FontStyle.Italic};
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.selectedFont.size == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+ AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedFont(this.selectedFont);
+
+ if (this.selectedFont.size == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f2b1c9da2738134317f29c2a1ea51247a1d7578b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Blank组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BlankCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('BlankCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ Blank()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ac5cec0cb2ee4005135a12bd4cfe71bc9fd1b436
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Blank组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BlankHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('BlankHeightSample');
+ @State blankHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.blankHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.blankHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ Blank().height(this.blankHeight)
+ if (this.blankHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ee775364be3af1ade7a3607c0a8ec7d9eff179cb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankHome.ets
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct BlankHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('BlankHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'BlankCreateSample', buttonUrl: 'pages/base/blank/BlankCreateSample' });
+ CommonButton({ buttonName: 'BlankWidthSample', buttonUrl: 'pages/base/blank/BlankWidthSample' });
+ CommonButton({ buttonName: 'BlankHeightSample', buttonUrl: 'pages/base/blank/BlankHeightSample' });
+ CommonButton({ buttonName: 'BlankPaddingSample', buttonUrl: 'pages/base/blank/BlankPaddingSample' });
+ CommonButton({ buttonName: 'BlankMarginSample', buttonUrl: 'pages/base/blank/BlankMarginSample' });
+ CommonButton({ buttonName: 'BlankMinSample', buttonUrl: 'pages/base/blank/BlankMinSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1163a646c3fe57a44ac8e91e8d102bf32d15857b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Blank组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BlankMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('BlankMarginSample');
+ @State blankMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.blankMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.blankMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ Blank().margin(this.blankMargin)
+ if (this.blankMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankMinSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankMinSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1dc9e60d953138dfe57b1fff02206e00ce5acde8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankMinSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Blank组件min属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BlankMinSample {
+ timeHelper: TimeHelper = new TimeHelper('BlankMinSample');
+ @State blankMin: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change min 0 to 60')
+ .id('change min 0 to 60')
+ .margin('5vp')
+ .onClick(() => {
+ this.blankMin = 60;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.blankMin != null && this.timeHelper.printTime(true)) {
+ }
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ Blank(this.blankMin)
+ if (this.blankMin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6bae67f55b359a6d9f44aefbc6ff8e588b553980
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Blank组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BlankPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('BlankPaddingSample');
+ @State radioPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.radioPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.radioPadding != null && this.timeHelper.printTime(true)) {
+ }
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ Blank().padding(this.radioPadding)
+ if (this.radioPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ce6f0b3de2d46042d95337ba44e716873013b3c9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/blank/BlankWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Blank组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BlankWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('BlankWidthSample');
+ @State blankWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.blankWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.blankWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ Blank().width(this.blankWidth)
+ if (this.blankWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9bb2c6d84df1bbd736f4ea22a0ea7c1b63d55d9d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Button组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ButtonCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ButtonCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ Button()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5691ad7281a221a6248b2faad5e902b055f83f3a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Button组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ButtonHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ButtonHeightSample');
+ @State buttonHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.buttonHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ Button().height(this.buttonHeight)
+ if (this.buttonHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..02940107b2f3ff599fac99dab62684a8c0982fc5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonHome.ets
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct ButtonHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ButtonBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'ButtonCreateSample', buttonUrl: 'pages/base/button/ButtonCreateSample' });
+ CommonButton({ buttonName: 'ButtonWidthSample', buttonUrl: 'pages/base/button/ButtonWidthSample' });
+ CommonButton({ buttonName: 'ButtonHeightSample', buttonUrl: 'pages/base/button/ButtonHeightSample' });
+ CommonButton({ buttonName: 'ButtonPaddingSample', buttonUrl: 'pages/base/button/ButtonPaddingSample' });
+ CommonButton({ buttonName: 'ButtonMarginSample', buttonUrl: 'pages/base/button/ButtonMarginSample' });
+ CommonButton({ buttonName: 'ButtonOptionTypeSample', buttonUrl: 'pages/base/button/ButtonOptionTypeSample' });
+ CommonButton({ buttonName: 'ButtonTypeSample', buttonUrl: 'pages/base/button/ButtonTypeSample' });
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..225a86032d25ea8da36e477dd56263e808df52b7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Button组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ButtonMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ButtonMarginSample');
+ @State buttonMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.buttonMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ Button().margin(this.buttonMargin)
+ if (this.buttonMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonOptionTypeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonOptionTypeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..55f1f1c8cf47ee79ea8f1c69e7bc8edc5ed89f89
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonOptionTypeSample.ets
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Button组件Option内type属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ButtonOptionTypeSample {
+ timeHelper: TimeHelper = new TimeHelper('ButtonOptionTypeSample');
+ @State buttonType: ButtonType = ButtonType.Circle;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Option type to Capsule')
+ .id('change Option type to Capsule')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonType = ButtonType.Capsule;
+ })
+ Button('change Option type to Normal')
+ .id('change Option type to Normal')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonType = ButtonType.Normal;
+ })
+ Button('change Option type to Circle')
+ .id('change Option type to Circle')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonType = ButtonType.Circle;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.buttonType >= 0 && this.timeHelper.printTime(true)) {
+ }
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ Button({ type: this.buttonType })
+ if (this.buttonType >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..07f29bd9f6bb20b54f9cdc81862b42128b9b786b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Button组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ButtonPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ButtonPaddingSample');
+ @State buttonPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.buttonPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ Button().padding(this.buttonPadding)
+ if (this.buttonPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonTypeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonTypeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..281cd0daa8347248a2dc8ce9fad7170cb535da46
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonTypeSample.ets
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Button组件type属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ButtonTypeSample {
+ timeHelper: TimeHelper = new TimeHelper('ButtonTypeSample');
+ @State buttonType: ButtonType = ButtonType.Circle;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Option type to Capsule')
+ .id('change Option type to Capsule')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonType = ButtonType.Capsule;
+ })
+ Button('change Option type to Normal')
+ .id('change Option type to Normal')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonType = ButtonType.Normal;
+ })
+ Button('change Option type to Circle')
+ .id('change Option type to Circle')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonType = ButtonType.Circle;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.buttonType >= 0 && this.timeHelper.printTime(true)) {
+ }
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ Button().type(this.buttonType)
+ if (this.buttonType >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5efee5a67154c543cdb5e68005462aca43cb7b56
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/button/ButtonWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Button组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ButtonWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ButtonWidthSample');
+ @State buttonWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.buttonWidth = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.buttonWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ Button().width(this.buttonWidth)
+ if (this.buttonWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d22c317bfb08a5811bf395aadf653a6d1816dcfd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxCreateSample.ets
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ Checkbox()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxGroupCancelSelectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxGroupCancelSelectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..54f23c3ad5637f6d4df5529646dcf67c614ff953
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxGroupCancelSelectSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxGroupCancelSelectSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxGroupCancelSelectSample');
+ @State checkBoxCancelSelectAll: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Cancel Selected')
+ .id('CheckBoxChangeCancelSelect')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxCancelSelectAll = false;
+ })
+ }.width('100%')
+
+ CheckboxGroup({ group: 'checkboxGroup' }).selectAll(this.checkBoxCancelSelectAll)
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxCancelSelectAll == false && this.timeHelper.printTime(true)) {
+ }
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ if (this.checkBoxCancelSelectAll == false && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxGroupSelectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxGroupSelectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..924a075b624f7e2eb94dbc2cb65cae60cd939550
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxGroupSelectSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxGroupSelectSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxGroupSelectSample');
+ @State checkBoxSelectAll: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Selected')
+ .id('CheckBoxChangeSelect')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxSelectAll = true;
+ })
+ }.width('100%')
+
+ CheckboxGroup({ group: 'checkboxGroup' }).selectAll(this.checkBoxSelectAll)
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxSelectAll == true && this.timeHelper.printTime(true)) {
+ }
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ Checkbox({ group: 'checkboxGroup' })
+ if (this.checkBoxSelectAll == true && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8e5573af8f5426c63191bc7f79b562622b0e02ab
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxHeightSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxHeightSample');
+ @State checkBoxHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Height 100 to 200')
+ .id('CheckBoxChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ Checkbox().height(this.checkBoxHeight)
+ if (this.checkBoxHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bf37e932f1ff6c1daa8e0ef9438e89f69bf2c708
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxHome.ets
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct CheckBoxHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('CheckBoxBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'CheckBoxCreate', buttonUrl: 'pages/base/checkbox/CheckBoxCreateSample' });
+ CommonButton({ buttonName: 'CheckBoxWidth', buttonUrl: 'pages/base/checkbox/CheckBoxWidthSample' });
+ CommonButton({ buttonName: 'CheckBoxHeight', buttonUrl: 'pages/base/checkbox/CheckBoxHeightSample' });
+ CommonButton({ buttonName: 'CheckBoxPadding', buttonUrl: 'pages/base/checkbox/CheckBoxPaddingSample' });
+ CommonButton({ buttonName: 'CheckBoxMargin', buttonUrl: 'pages/base/checkbox/CheckBoxMarginSample' });
+ CommonButton({ buttonName: 'CheckBoxSize', buttonUrl: 'pages/base/checkbox/CheckBoxSizeSample' });
+ CommonButton({ buttonName: 'CheckBoxSelect', buttonUrl: 'pages/base/checkbox/CheckBoxSelectSample' });
+ CommonButton({ buttonName: 'CheckBoxMarkStyle', buttonUrl: 'pages/base/checkbox/CheckBoxMarkStyleSample' });
+ CommonButton({ buttonName: 'CheckBoxGroupSelect', buttonUrl: 'pages/base/checkbox/CheckBoxGroupSelectSample' });
+ CommonButton({ buttonName: 'CheckBoxGroupCancelSelect', buttonUrl: 'pages/base/checkbox/CheckBoxGroupCancelSelectSample' });
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..79b95fcaad1330c51f9b4b915a8395cd671ebae0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxMarginSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxMarginSample');
+ @State checkBoxMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Margin 20 to 30')
+ .id('CheckBoxChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ Checkbox().margin(this.checkBoxMargin)
+ if (this.checkBoxMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxMarkStyleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxMarkStyleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fc964a5e7935cfca3f2ad7b770504a2f038449ba
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxMarkStyleSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxMarkStyleSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxMarkStyleSample');
+ @State checkBoxMarkStyle: MarkStyle = { size: '10vp', strokeWidth: '2vp' };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change MarkStyle')
+ .id('CheckBoxChangeMarkStyle')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxMarkStyle = { size: '20vp', strokeWidth: '4vp' };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxMarkStyle.size == '20vp' && this.timeHelper.printTime(true)) {
+ }
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ Checkbox().mark(this.checkBoxMarkStyle)
+ if (this.checkBoxMarkStyle.size == '20vp' && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..81514d742d8d1f2281d5cb4ea7267f7a4cac3a10
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxPaddingSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxPaddingSample');
+ @State checkBoxPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Padding 20 to 30')
+ .id('CheckBoxChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ Checkbox().padding(this.checkBoxPadding)
+ if (this.checkBoxPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxSelectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxSelectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0060dc650d3939e7c4d10581d6363b922d589364
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxSelectSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxSelectSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxSelectSample');
+ @State checkBoxSelect: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Select')
+ .id('CheckBoxChangeSelect')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxSelect = true;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxSelect == true && this.timeHelper.printTime(true)) {
+ }
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ Checkbox().select(this.checkBoxSelect)
+ if (this.checkBoxSelect == true && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..36ed06a9b56b04a588478c2cee1df6c75e79dcaf
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxSizeSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxSizeSample');
+ @State checkBoxSize: SizeOptions = { width: 100, height: 100 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Size')
+ .id('CheckBoxChangeSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxSize = { width: 200, height: 200 };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxSize.width == 200 && this.timeHelper.printTime(true)) {
+ }
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ Checkbox().size(this.checkBoxSize)
+ if (this.checkBoxSize.width == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..366577f0afd2bc576f6724dfb414c191ec6b34f3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/checkbox/CheckBoxWidthSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CheckBoxWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('CheckBoxWidthSample');
+ @State checkBoxWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('CheckBoxChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.checkBoxWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.checkBoxWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ Checkbox().width(this.checkBoxWidth)
+ if (this.checkBoxWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelCloseEffectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelCloseEffectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..87f380fc554f7dbe99b776e1f2e47c0cd8302a06
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelCloseEffectSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelCloseEffectSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelCloseEffectSample');
+ @State dataPanelCloseEffect: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change CloseEffect')
+ .id('DataPanelChangeCloseEffect')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelCloseEffect = true;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelCloseEffect == true && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+ DataPanel({values:[25]}).closeEffect(this.dataPanelCloseEffect);
+
+ if (this.dataPanelCloseEffect == true && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c07ce6abc24c2878563c0299d3c9067493765344
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+ DataPanel({values:[25]});
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..79418a1d93f859d5e718b7d39faa525f9213181e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelHeightSample');
+ @State dataPanelHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('DataPanelChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+ DataPanel({values:[25]}).height(this.dataPanelHeight)
+
+ if (this.dataPanelHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..17baec79db1f78912144b56ad23f988f9736959c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelHome.ets
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct DataPanelHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('DataPanelBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'DataPanelCreate',buttonUrl:'pages/base/dataPanel/DataPanelCreateSample'});
+ CommonButton({buttonName:'DataPanelWidth',buttonUrl:'pages/base/dataPanel/DataPanelWidthSample'});
+ CommonButton({buttonName:'DataPanelHeight',buttonUrl:'pages/base/dataPanel/DataPanelHeightSample'});
+ CommonButton({buttonName:'DataPanelPadding',buttonUrl:'pages/base/dataPanel/DataPanelPaddingSample'});
+ CommonButton({buttonName:'DataPanelMargin',buttonUrl:'pages/base/dataPanel/DataPanelMarginSample'});
+ CommonButton({buttonName:'DataPanelCloseEffect',buttonUrl:'pages/base/dataPanel/DataPanelCloseEffectSample'});
+ CommonButton({buttonName:'DataPanelStrokeWidth',buttonUrl:'pages/base/dataPanel/DataPanelStrokeWidthSample'});
+ CommonButton({buttonName:'DataPanelRadius',buttonUrl:'pages/base/dataPanel/DataPanelRadiusSample'});
+ CommonButton({buttonName:'DataPanelOffsetX',buttonUrl:'pages/base/dataPanel/DataPanelOffsetXSample'});
+ CommonButton({buttonName:'DataPanelOffsetY',buttonUrl:'pages/base/dataPanel/DataPanelOffsetYSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3715365568e1892bbd56c04fc327fd2b7c586530
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelMarginSample');
+ @State dataPanelMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin')
+ .id('DataPanelChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+ DataPanel({values:[25]}).margin(this.dataPanelMargin);
+
+ if (this.dataPanelMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelOffsetXSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelOffsetXSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2e83c51f3f229abf386de6d52059703a1b7ef115
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelOffsetXSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelOffsetXSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelOffsetXSample');
+ @State dataPanelOffsetX: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change OffsetX')
+ .id('DataPanelChangeOffsetX')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelOffsetX = 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelOffsetX == 10 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetX })
+
+ if (this.dataPanelOffsetX == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelOffsetYSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelOffsetYSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..10d1722ebeed6a4e8b4865fa31da1d60279b06dd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelOffsetYSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelOffsetYSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelOffsetYSample');
+ @State dataPanelOffsetY: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change OffsetY')
+ .id('DataPanelChangeOffsetY')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelOffsetY = 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelOffsetY == 10 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+ DataPanel({values:[25]}).trackShadow({ offsetX:this.dataPanelOffsetY })
+
+ if (this.dataPanelOffsetY == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..159e92b5747888e597d6a59b720b08ae5db54a33
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelPaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelPaddingSample');
+ @State dataPanelPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding')
+ .id('DataPanelChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+ DataPanel({values:[25]}).padding(this.dataPanelPadding);
+
+ if (this.dataPanelPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelRadiusSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelRadiusSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6b9b8b9c4ec5b15b216a121ca49aa3fc16734b39
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelRadiusSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelRadiusSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelRadiusSample');
+ @State dataPanelRadius: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Radius')
+ .id('DataPanelChangeRadius')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelRadius = 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelRadius == 10 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+ DataPanel({values:[25]}).trackShadow({ radius:this.dataPanelRadius })
+
+ if (this.dataPanelRadius == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7d77413994e87ccb6687b593aacbb97195588e53
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelStrokeWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelStrokeWidthSample');
+ @State dataPanelStrokeWidth: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change StrokeWidth')
+ .id('DataPanelChangeStrokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelStrokeWidth = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelStrokeWidth == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+ DataPanel({values:[25]}).strokeWidth(this.dataPanelStrokeWidth);
+
+ if (this.dataPanelStrokeWidth == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..668fb3097d525280175daf3fc5a82fd16404de79
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/dataPanel/DataPanelWidthSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DataPanelWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('DataPanelWidthSample');
+ @State dataPanelWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 100 to 200')
+ .id('DataPanelChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.dataPanelWidth = 200;
+ })
+ }.width('100%')
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dataPanelWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+ DataPanel({values:[25]}).width(this.dataPanelWidth)
+
+ if (this.dataPanelWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..41071e382b4bb6c217f0217efd96ca70466e565e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerColorSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerColorSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerColorSample');
+ @State dividerColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Color')
+ .id('DividerChangeColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerColor = Color.Yellow;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dividerColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ Divider().color(this.dividerColor);
+ if (this.dividerColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a658f701c1899e33acb92f12bb3a0e6dd3054954
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ Divider();
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..14a3bd1bdfa090e441b8f998398bad7b16313935
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerHeightSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerHeightSample');
+ @State dividerHeight: number = 50;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 50 to 100')
+ .id('DividerChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerHeight = 100;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dividerHeight == 100 && this.timeHelper.printTime(true)) {
+ }
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ Divider().height(this.dividerHeight);
+ if (this.dividerHeight == 100 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4b911fcc28fa010d301ee9960a344ff3aa442063
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerHome.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct DividerHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('DividerBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'DividerCreate',buttonUrl:'pages/base/divider/DividerCreateSample'});
+ CommonButton({buttonName:'DividerStrokeWidth',buttonUrl:'pages/base/divider/DividerStrokeWidthSample'});
+ CommonButton({buttonName:'DividerWidth',buttonUrl:'pages/base/divider/DividerWidthSample'});
+ CommonButton({buttonName:'DividerHeight',buttonUrl:'pages/base/divider/DividerHeightSample'});
+ CommonButton({buttonName:'DividerSize',buttonUrl:'pages/base/divider/DividerSizeSample'});
+ CommonButton({buttonName:'DividerPadding',buttonUrl:'pages/base/divider/DividerPaddingSample'});
+ CommonButton({buttonName:'DividerMargin',buttonUrl:'pages/base/divider/DividerMarginSample'});
+ CommonButton({buttonName:'DividerColor',buttonUrl:'pages/base/divider/DividerColorSample'});
+ CommonButton({buttonName:'DividerVertical',buttonUrl:'pages/base/divider/DividerVerticalSample'});
+ CommonButton({buttonName:'DividerLineCap',buttonUrl:'pages/base/divider/DividerLineCapSample'});
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerLineCapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerLineCapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..68812e5fd38a2658c6bc8dd475f2d8f2a361aa7b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerLineCapSample.ets
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerLineCapSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerLineCapSample');
+ @State dividerLineCap: LineCapStyle = LineCapStyle.Round;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change LineCap Butt')
+ .id('DividerChangeLineCapButt')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerLineCap = LineCapStyle.Butt;
+ })
+ Button('change LineCap Round')
+ .id('DividerChangeLineCapRound')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerLineCap = LineCapStyle.Round;
+ })
+ Button('change LineCap Square')
+ .id('DividerChangeLineCapSquare')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerLineCap = LineCapStyle.Square;
+ })
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dividerLineCap != null && this.timeHelper.printTime(true)) {
+ }
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ Divider().lineCap(this.dividerLineCap);
+ if (this.dividerLineCap != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d8dccb5d335342014dcae62e199e74c429dd154f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerMarginSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerMarginSample');
+ @State dividerMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('DividerChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dividerMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ Divider().margin(this.dividerMargin);
+ if (this.dividerMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3e11a4694acbfc3642f08da2bbf4f75ad3be054e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerPaddingSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerPaddingSample');
+ @State dividerPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('DividerChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerPadding = 30;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dividerPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ Divider().padding(this.dividerPadding);
+ if (this.dividerPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6e7c784fc945dfd4af43a989b50fed508caad249
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerSizeSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerSizeSample');
+ @State DividerSize: SizeOptions = { width: 10, height: 50 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change BlockSize')
+ .id('DividerChangeSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.DividerSize = { width: 20, height: 100 };
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.DividerSize.width == 20 && this.timeHelper.printTime(true)) {
+ }
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ Divider().size(this.DividerSize)
+ if (this.DividerSize.width == 20 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..76b846790a62632f0f003ced5f0f8b86e611fb49
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerStrokeWidthSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerStrokeWidthSample');
+ @State sliderStrokeWidth: number = 8;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change StrokeWidth 8 to 16')
+ .id('DividerChangeStrokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderStrokeWidth = 16;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderStrokeWidth == 16 && this.timeHelper.printTime(true)) {
+ }
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ Divider().strokeWidth(this.sliderStrokeWidth);
+ if (this.sliderStrokeWidth == 16 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerVerticalSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerVerticalSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d437c1aad7868c54b6d493bb9a4d03ce6ee7929f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerVerticalSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerVerticalSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerVerticalSample');
+ @State dividerVertical: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Vertical true')
+ .id('DividerChangeVerticalTrue')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerVertical = true;
+ })
+ Button('change Vertical false')
+ .id('DividerChangeVerticalFalse')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerVertical = false;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dividerVertical != null && this.timeHelper.printTime(true)) {
+ }
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ Divider().vertical(this.dividerVertical);
+ if (this.dividerVertical != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6a1769bf7c191342e1b12304a30d489f7f2667b6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/divider/DividerWidthSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerWidthSample');
+ @State dividerWidth: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 10 to 20')
+ .id('DividerChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.dividerWidth = 20;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.dividerWidth == 20 && this.timeHelper.printTime(true)) {
+ }
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ Divider().width(this.dividerWidth);
+ if (this.dividerWidth == 20 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeAngleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeAngleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b165e87bbf70787c1f73fadfa460abb070a31122
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeAngleSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Gauge组件Angle属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GaugeAngleSample {
+ timeHelper: TimeHelper = new TimeHelper('GaugeAngleSample');
+ @State gaugeStartAngle: number = 30;
+ @State gaugeEndAngle: number = 330;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change angle')
+ .id('change angle')
+ .margin('5vp')
+ .onClick(() => {
+ this.gaugeStartAngle = 210;
+ this.gaugeEndAngle = 150;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gaugeStartAngle != null && this.gaugeEndAngle != null && this.timeHelper.printTime(true)) {
+ }
+
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+ Gauge({ value: 0 }).startAngle(this.gaugeStartAngle).endAngle(this.gaugeEndAngle)
+
+ if (this.gaugeStartAngle != null && this.gaugeEndAngle != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b475f4c59b9c98c9ade8e5c7f42f963ba86f62cb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeCreateSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Gauge组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GaugeCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('GaugeCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+ Gauge({value:0})
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e0449f25c52ed5b4f3f2a1697286edad1169415f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Gauge组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GaugeHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('GaugeHeightSample');
+ @State gaugeHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.gaugeHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gaugeHeight != null && this.timeHelper.printTime(true)) {
+ }
+
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+ Gauge({ value: 0 }).height(this.gaugeHeight)
+
+ if (this.gaugeHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..606daacf09931b91d13c90908b85142a47a0e4dc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeHome.ets
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct GaugeHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('GaugeHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'GaugeCreateSample', buttonUrl: 'pages/base/gauge/GaugeCreateSample' });
+ CommonButton({ buttonName: 'GaugeWidthSample', buttonUrl: 'pages/base/gauge/GaugeWidthSample' });
+ CommonButton({ buttonName: 'GaugeHeightSample', buttonUrl: 'pages/base/gauge/GaugeHeightSample' });
+ CommonButton({ buttonName: 'GaugePaddingSample', buttonUrl: 'pages/base/gauge/GaugePaddingSample' });
+ CommonButton({ buttonName: 'GaugeMarginSample', buttonUrl: 'pages/base/gauge/GaugeMarginSample' });
+ CommonButton({ buttonName: 'GaugeStrokeWidthSample', buttonUrl: 'pages/base/gauge/GaugeStrokeWidthSample' });
+ CommonButton({ buttonName: 'GaugeTrackShadowSample', buttonUrl: 'pages/base/gauge/GaugeTrackShadowSample' });
+ CommonButton({ buttonName: 'GaugeAngleSample', buttonUrl: 'pages/base/gauge/GaugeAngleSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..dd687560d2dd76717bbd96baaa1ff89bff560484
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Gauge组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GaugeMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('GaugeMarginSample');
+ @State gaugeMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.gaugeMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gaugeMargin != null && this.timeHelper.printTime(true)) {
+ }
+
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+ Gauge({ value: 0 }).margin(this.gaugeMargin)
+
+ if (this.gaugeMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..eb32a958b3922e4f6474187d7082a00be48ef80d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugePaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Gauge组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GaugePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('GaugePaddingSample');
+ @State gaugePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.gaugePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gaugePadding != null && this.timeHelper.printTime(true)) {
+ }
+
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+ Gauge({ value: 0 }).padding(this.gaugePadding)
+
+ if (this.gaugePadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a06d74c8a235369a8e11b4b1945cb1b6ae5af57a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeStrokeWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Gauge组件strokeWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GaugeStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('GaugeStrokeWidthSample');
+ @State gaugeStrokeWidth: number = 4;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeWidth 4 to 10')
+ .id('change strokeWidth 4 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.gaugeStrokeWidth = 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gaugeStrokeWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+ Gauge({ value: 0 }).strokeWidth(this.gaugeStrokeWidth)
+
+ if (this.gaugeStrokeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeTrackShadowSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeTrackShadowSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..55504ebbd337d51b0736667e89d5d27b1094eb4c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeTrackShadowSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// /**
+// * Gauge组件trackShadow属性更新布局耗时 todo trackShadow属性在11之上存在,暂时屏蔽
+// */
+//
+// import { ArrEntity } from '../../../entity/ArrEntity'
+// import { TimeHelper } from '../../../util/TimeHelper'
+//
+// @Entry
+// @Component
+// struct GaugeTrackShadowSample {
+// timeHelper: TimeHelper = new TimeHelper('GaugeTrackShadowSample');
+// @State gaugeTrackShadow: number = { radius: 5, offsetX: 5, offsetY: 5 };
+//
+// build() {
+// Scroll() {
+// Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+// Column() {
+// Button('change trackShadow')
+// .id('change trackShadow')
+// .margin('5vp')
+// .onClick(() => {
+// this.gaugeTrackShadow = { radius: 10, offsetX: -20, offsetY: -20 };
+// })
+// }.width('100%')
+//
+// ForEach(ArrEntity.arr, (index: number) => {
+// if (this.gaugeTrackShadow != null && this.timeHelper.printTime(true)) {
+// }
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+// Gauge({ value: 0 }).trackShadow(this.gaugeTrackShadow)
+
+// if (this.gaugeTrackShadow != null && this.timeHelper.printTime(false)) {
+// }
+// })
+//
+// }
+// .width('100%')
+// }.margin({ bottom: 60 })
+// .width('100%')
+//
+// }
+// }
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f8135f7d66f96cd3243a88db6f3c5150691aa254
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/gauge/GaugeWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Gauge组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GaugeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('GaugeWidthSample');
+ @State gaugeWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.gaugeWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gaugeWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+ Gauge({value:0}).width(this.gaugeWidth)
+
+ if (this.gaugeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageAutoResizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageAutoResizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d4cd6145416c0f3a86a3837cbafa8bec29e2545a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageAutoResizeSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageAutoResizeSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAutoResizeSample');
+ @State imageAutoResize: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change autoResize')
+ .id('ImageAutoResize')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAutoResize = false;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAutoResize != null && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ Image($r('app.media.app_icon')).autoResize(this.imageAutoResize)
+ if (this.imageAutoResize != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..536a506c720cc77beb1a9ed78496bf6790731fdf
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+ Image($r('app.media.app_icon'))
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageFitOriginalSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageFitOriginalSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d89344cb2393d9fc660bcc0642861b394f7ea879
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageFitOriginalSizeSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageFitOriginalSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageFitOriginalSizeSample');
+ @State imageFitOriginalSize: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change fitOriginalSize')
+ .id('ImageFitOriginalSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageFitOriginalSize = true;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageFitOriginalSize != null && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ Image($r('app.media.app_icon')).fitOriginalSize(this.imageFitOriginalSize)
+ if (this.imageFitOriginalSize != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ca0ad1c2422d4d7afba3b9b4ef71f88d21be2506
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageHeightSample');
+ @State imageHeight: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change height 200 to 300')
+ .id('ImageHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageHeight = 300;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ Image($r('app.media.app_icon')).height(this.imageHeight)
+ if (this.imageHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2b4aceecb64dd4284d7bb2df108a10614e7f4ead
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageHome.ets
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct ImageHome {
+ @State messageTenLength: string = 'Hello-Text';
+ @State message: string = 'Hello-Text';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ImageBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({
+ buttonName: 'ImageCreate',
+ buttonUrl: 'pages/base/image/ImageCreateSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageWidth',
+ buttonUrl: 'pages/base/image/ImageWidthSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageHeight',
+ buttonUrl: 'pages/base/image/ImageHeightSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImagePadding',
+ buttonUrl: 'pages/base/image/ImagePaddingSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageMargin',
+ buttonUrl: 'pages/base/image/ImageMarginSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageObjectFit',
+ buttonUrl: 'pages/base/image/ImageObjectFitSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageObjectRepeat',
+ buttonUrl: 'pages/base/image/ImageObjectRepeatSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageAutoResize',
+ buttonUrl: 'pages/base/image/ImageAutoResizeSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageInterpolation',
+ buttonUrl: 'pages/base/image/ImageInterpolationSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ImageFitOriginalSize',
+ buttonUrl: 'pages/base/image/ImageFitOriginalSizeSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageInterpolationSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageInterpolationSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3acabf84bd44bc0422666e53341bfeefdad62788
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageInterpolationSample.ets
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageInterpolationSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageInterpolationSample');
+ @State imageInterpolation: ImageInterpolation = ImageInterpolation.Low;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change interpolation None')
+ .id('ImageInterpolation_None')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageInterpolation = ImageInterpolation.None;
+ })
+ Button('change interpolation High')
+ .id('ImageInterpolation_High')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageInterpolation = ImageInterpolation.High;
+ })
+ Button('change interpolation Medium')
+ .id('ImageInterpolation_Medium')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageInterpolation = ImageInterpolation.Medium;
+ })
+ Button('change interpolation Low')
+ .id('ImageInterpolation_Low')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageInterpolation = ImageInterpolation.Low;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageInterpolation != null && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ Image($r('app.media.app_icon')).interpolation(this.imageInterpolation)
+ if (this.imageInterpolation != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9f161a67d220fa139671bc9d8654cca3d73a3c2c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageMarginSample');
+ @State imageMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin 20 to 30')
+ .id('ImageMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ Image($r('app.media.app_icon')).margin(this.imageMargin)
+ if (this.imageMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageObjectFitSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageObjectFitSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8c1317bf0d419bf3c76660553ba65f845f8bb463
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageObjectFitSample.ets
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageObjectFitSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageObjectFitSample');
+ @State imageImageFit: ImageFit = ImageFit.Cover;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change objectFit Contain')
+ .id('ImageObjectFit_Contain')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageImageFit = ImageFit.Contain;
+ })
+ Button('change objectFit Cover')
+ .id('ImageObjectFit_Cover')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageImageFit = ImageFit.Cover;
+ })
+ Button('change objectFit Auto')
+ .id('ImageObjectFit_Auto')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageImageFit = ImageFit.Auto;
+ })
+ Button('change objectFit Fill')
+ .id('ImageObjectFit_Fill')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageImageFit = ImageFit.Fill;
+ })
+ Button('change objectFit ScaleDown')
+ .id('ImageObjectFit_ScaleDown')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageImageFit = ImageFit.ScaleDown;
+ })
+ Button('change objectFit None')
+ .id('ImageObjectFit_None')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageImageFit = ImageFit.None;
+ })
+
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageImageFit != null && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ Image($r('app.media.app_icon')).objectFit(this.imageImageFit)
+ if (this.imageImageFit != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageObjectRepeatSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageObjectRepeatSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..653fff40dc018617a0ae783c17cbeafcd6f861a3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageObjectRepeatSample.ets
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageObjectRepeatSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageObjectRepeatSample');
+ @State imageRepeat: ImageRepeat = ImageRepeat.NoRepeat;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change objectRepeat X')
+ .id('ImageObjectRepeat_X')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageRepeat = ImageRepeat.X;
+ })
+ Button('change objectRepeat Y')
+ .id('ImageObjectRepeat_Y')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageRepeat = ImageRepeat.Y;
+ })
+ Button('change objectRepeat XY')
+ .id('ImageObjectRepeat_XY')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageRepeat = ImageRepeat.XY;
+ })
+ Button('change objectRepeat NoRepeat')
+ .id('ImageObjectRepeat_NoRepeat')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageRepeat = ImageRepeat.NoRepeat;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageRepeat != null && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ Image($r('app.media.app_icon')).objectRepeat(this.imageRepeat)
+ if (this.imageRepeat != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImagePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImagePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cea55e318e9f5d426a309f8bec9adf6ef736aa4f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImagePaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImagePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ImagePaddingSample');
+ @State imagePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change padding 20 to 30')
+ .id('ImagePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.imagePadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imagePadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ Image($r('app.media.app_icon')).padding(this.imagePadding)
+ if (this.imagePadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ab04c4f934cb657ba7b8157fa1e0d27fe9714761
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/image/ImageWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ImageWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageWidthSample');
+ @State imageWidth: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 200 to 300')
+ .id('ImageWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageWidth = 300;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ Image($r('app.media.app_icon')).width(this.imageWidth)
+ if (this.imageWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fd01a0fce19781bd846e16abc0a83983acc6bc56
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ ImageAnimator()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorDurationSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorDurationSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3ec6aa2a2c29857e294d400f100692dc592e31b3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorDurationSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件duration属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorDurationSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorDurationSample');
+ @State imageAnimationDuration: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change duration')
+ .id('change duration')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimationDuration = 1000;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimationDuration != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).duration(this.imageAnimationDuration)
+ if (this.imageAnimationDuration != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorFillModeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorFillModeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1d3f2cc567be0d5fe04e7dadae887573259abc53
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorFillModeSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件fillMode属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorFillModeSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorFillModeSample');
+ @State imageAnimatorFillMode: FillMode = FillMode.None;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change fillMode')
+ .id('change fillMode')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorFillMode = FillMode.Forwards;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorFillMode != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fillMode(this.imageAnimatorFillMode)
+ if (this.imageAnimatorFillMode != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorFixedSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorFixedSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..59c0834730777207f96389a6108d8887f6e6c3a8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorFixedSizeSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件fixedSize属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorFixedSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorFixedSizeSample');
+ @State imageAnimatorFixedSize: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change fixedSize')
+ .id('change fixedSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorFixedSize = false;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorFixedSize != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).fixedSize(this.imageAnimatorFixedSize)
+ if (this.imageAnimatorFixedSize != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3c69e6ea0b2cf84ff80f82e5881534f146d64046
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorHeightSample');
+ @State imageAnimatorHeight: number = 300;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 300 to 400')
+ .id('change height 300 to 400')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorHeight = 400;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorHeight != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(this.imageAnimatorHeight).images([{ src: $r('app.media.icon') }])
+ if (this.imageAnimatorHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..932dfdf9ccd514f0ff318a328991a8146b2ff137
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorHome.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct ImageAnimatorHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ImageAnimatorHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'ImageAnimatorCreateSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorCreateSample' });
+ CommonButton({ buttonName: 'ImageAnimatorWidthSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorWidthSample' });
+ CommonButton({ buttonName: 'ImageAnimatorHeightSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorHeightSample' });
+ CommonButton({ buttonName: 'ImageAnimatorPaddingSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorPaddingSample' });
+ CommonButton({ buttonName: 'ImageAnimatorMarginSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorMarginSample' });
+ CommonButton({ buttonName: 'ImageAnimatorImagesSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorImagesSample' });
+ CommonButton({ buttonName: 'ImageAnimatorStateSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorStateSample' });
+ CommonButton({ buttonName: 'ImageAnimatorDurationSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorDurationSample' });
+ CommonButton({ buttonName: 'ImageAnimatorReverseSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorReverseSample' });
+ CommonButton({ buttonName: 'ImageAnimatorFixedSizeSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorFixedSizeSample' });
+ CommonButton({ buttonName: 'ImageAnimatorFillModeSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorFillModeSample' });
+ CommonButton({ buttonName: 'ImageAnimatorIterationsSample', buttonUrl: 'pages/base/imageAnimator/ImageAnimatorIterationsSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorImagesSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorImagesSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1150041ea81f3b9f23aa40f32cebc61fe56e4df1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorImagesSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件images属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorImagesSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorImagesSample');
+ @State imageAnimatorImages: Array = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change images')
+ .id('change images')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorImages = [{ src: $r('app.media.icon') }];
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorImages != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ ImageAnimator().width(100).height(100).images(this.imageAnimatorImages)
+ if (this.imageAnimatorImages != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorIterationsSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorIterationsSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2e1751ad35030e653c3ed8ccd1a43c284fcda057
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorIterationsSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件iterations属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorFixedSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorFixedSizeSample');
+ @State imageAnimatorFixedSize: number = -1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change iterations')
+ .id('change iterations')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorFixedSize = 3;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorFixedSize != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).iterations(this.imageAnimatorFixedSize)
+ if (this.imageAnimatorFixedSize != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6aaee4f0ff65689d8eed39411cb1afd70cad7869
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorMarginSample');
+ @State imageAnimatorMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorMargin != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).margin(this.imageAnimatorMargin).images([{ src: $r('app.media.icon') }])
+ if (this.imageAnimatorMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6765ab2b16211740e5c7123eea7a2fa873a531ca
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorPaddingSample');
+ @State imageAnimatorPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorPadding != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(100).height(100).padding(this.imageAnimatorPadding).images([{ src: $r('app.media.icon') }])
+ if (this.imageAnimatorPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorReverseSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorReverseSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..009243c12a33472ccdfa4812dd5f80b790e66af4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorReverseSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件reverse属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorReverseSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorReverseSample');
+ @State imageAnimationReverse: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change reverse')
+ .id('change reverse')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimationReverse = true;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimationReverse != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).reverse(this.imageAnimationReverse)
+ if (this.imageAnimationReverse != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorStateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorStateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fbed94871a7a5b4c5254338a6c1ecb8cdf34c205
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorStateSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件state属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorStateSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorStateSample');
+ @State imageAnimationState: AnimationStatus = AnimationStatus.Initial;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change state')
+ .id('change state')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimationState = AnimationStatus.Running;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimationState != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ ImageAnimator().width(100).height(100).images([{ src: $r('app.media.icon') }]).state(this.imageAnimationState)
+ if (this.imageAnimationState != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fb2c3773ba79d831787497afbc20c7282e5e961c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/imageAnimator/ImageAnimatorWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ImageAnimator组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ImageAnimatorWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ImageAnimatorWidthSample');
+ @State imageAnimatorWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 80% to 100%')
+ .id('change width 80% to 100%')
+ .margin('5vp')
+ .onClick(() => {
+ this.imageAnimatorWidth = '100%';
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.imageAnimatorWidth != null && this.timeHelper.printTime(true)) {
+ }
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ ImageAnimator().width(this.imageAnimatorWidth).height(100).images([{ src: $r('app.media.icon') }])
+ if (this.imageAnimatorWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..62535558cad7af730cde86cb2a3bbd7a4a5d5875
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * LoadingProgress组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LoadingProgressCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('LoadingProgressCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ LoadingProgress()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressEnableLoadingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressEnableLoadingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..52390b0e66c11988ae0ed67f5e385ef8e9263313
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressEnableLoadingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * LoadingProgress组件enableLoading属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LoadingProgressEnableLoadingSample {
+ timeHelper: TimeHelper = new TimeHelper('LoadingProgressEnableLoadingSample');
+ @State loadingProgressEnableLoading: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change enableLoading')
+ .id('change enableLoading')
+ .margin('5vp')
+ .onClick(() => {
+ this.loadingProgressEnableLoading = false;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.loadingProgressEnableLoading != null && this.timeHelper.printTime(true)) {
+ }
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ LoadingProgress().enableLoading(this.loadingProgressEnableLoading)
+ if (this.loadingProgressEnableLoading != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f64fcf328441e7bc0c4c0d17acad1a606c43711d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * LoadingProgress组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LoadingProgressHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('LoadingProgressHeightSample');
+ @State loadingProgressHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.loadingProgressHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.loadingProgressHeight != null && this.timeHelper.printTime(true)) {
+ }
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ LoadingProgress().height(this.loadingProgressHeight)
+ if (this.loadingProgressHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9d1fcbb8908a53b2370f9cb4f9ea1c1c1c82f509
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressHome.ets
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct LoadingProgressHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('LoadingProgressHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'LoadingProgressCreateSample', buttonUrl: 'pages/base/loadingProgress/LoadingProgressCreateSample' });
+ CommonButton({ buttonName: 'LoadingProgressWidthSample', buttonUrl: 'pages/base/loadingProgress/LoadingProgressWidthSample' });
+ CommonButton({ buttonName: 'LoadingProgressHeightSample', buttonUrl: 'pages/base/loadingProgress/LoadingProgressHeightSample' });
+ CommonButton({ buttonName: 'LoadingProgressPaddingSample', buttonUrl: 'pages/base/loadingProgress/LoadingProgressPaddingSample' });
+ CommonButton({ buttonName: 'LoadingProgressMarginSample', buttonUrl: 'pages/base/loadingProgress/LoadingProgressMarginSample' });
+ CommonButton({ buttonName: 'LoadingProgressEnableLoadingSample', buttonUrl: 'pages/base/loadingProgress/LoadingProgressEnableLoadingSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..af9814ee22e1c249705265ff8f156a23d12dcd36
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * LoadingProgress组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LoadingProgressMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('LoadingProgressMarginSample');
+ @State loadingProgressMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.loadingProgressMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.loadingProgressMargin != null && this.timeHelper.printTime(true)) {
+ }
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ LoadingProgress().margin(this.loadingProgressMargin)
+ if (this.loadingProgressMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fcaf9a6347718c634aebc54566bf49bf1a8d3636
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * LoadingProgress组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LoadingProgressPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('LoadingProgressPaddingSample');
+ @State loadingProgressPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.loadingProgressPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.loadingProgressPadding != null && this.timeHelper.printTime(true)) {
+ }
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ LoadingProgress().padding(this.loadingProgressPadding)
+ if (this.loadingProgressPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..42dbd1b8bc5a05ebff4cd9265012681b9fd3e470
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/loadingProgress/LoadingProgressWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * LoadingProgress组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LoadingProgressWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('LoadingProgressWidthSample');
+ @State loadingProgressWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.loadingProgressWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.loadingProgressWidth != null && this.timeHelper.printTime(true)) {
+ }
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ LoadingProgress().width(this.loadingProgressWidth)
+ if (this.loadingProgressWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..536539805d4294032c297a358610671dd80f34eb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueeCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueeCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+ Marquee({ start: false, src: ArrEntity.textTenLength});
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeFromStartSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeFromStartSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f9c7f19442e79bc761c9984bbe508ea77e96a62d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeFromStartSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueeFromStartSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueeFromStartSample');
+ @State marqueeFromStart: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change FromStart')
+ .id('MarqueeChangeFromStart')
+ .margin('5vp')
+ .onClick(() => {
+ this.marqueeFromStart = false;
+ })
+
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.marqueeFromStart == false && this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+ Marquee({start:true,fromStart:this.marqueeFromStart,src:ArrEntity.textTenLength})
+
+ if (this.marqueeFromStart == false && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5dcab4f9ab7136b7cbc28388fe27651bd1a16909
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueeHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueeHeightSample');
+ @State marqueeHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('MarqueeChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.marqueeHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.marqueeHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+ Marquee({start:false,src:ArrEntity.textTenLength}).height(this.marqueeHeight);
+
+ if (this.marqueeHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e6adbd3f050ad839a2aeb7057b070db7694a2a89
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeHome.ets
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct DividerHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('MarqueeBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'MarqueeCreate',buttonUrl:'pages/base/marquee/MarqueeCreateSample'});
+ CommonButton({buttonName:'MarqueeWidth',buttonUrl:'pages/base/marquee/MarqueeWidthSample'});
+ CommonButton({buttonName:'MarqueeHeight',buttonUrl:'pages/base/marquee/MarqueeHeightSample'});
+ CommonButton({buttonName:'MarqueePadding',buttonUrl:'pages/base/marquee/MarqueePaddingSample'});
+ CommonButton({buttonName:'MarqueeMargin',buttonUrl:'pages/base/marquee/MarqueeMarginSample'});
+ CommonButton({buttonName:'MarqueeSrc',buttonUrl:'pages/base/marquee/MarqueeSrcSample'});
+ CommonButton({buttonName:'MarqueeStep',buttonUrl:'pages/base/marquee/MarqueeStepSample'});
+ CommonButton({buttonName:'MarqueeFromStart',buttonUrl:'pages/base/marquee/MarqueeFromStartSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..24ea38fd1679bd49ae6d95a4a1828781bbfb6484
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueeMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueeMarginSample');
+ @State marqueeMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin')
+ .id('MarqueeChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.marqueeMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.marqueeMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+ Marquee({start:false,src:ArrEntity.textTenLength}).margin(this.marqueeMargin);
+
+ if (this.marqueeMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3e4da391f146d39b49909c4089e4bd4ec7a890ea
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueePaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueePaddingSample');
+ @State marqueePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding')
+ .id('MarqueeChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.marqueePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.marqueePadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+ Marquee({start:false,src:ArrEntity.textTenLength}).padding(this.marqueePadding);
+
+ if (this.marqueePadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeSrcSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeSrcSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..adab14a6906bffab84b8024d71a39dac74a2fd95
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeSrcSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueeSrcSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueeSrcSample');
+ @State marqueeSrc: string = ArrEntity.textTenLength;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Src')
+ .id('MarqueeChangeSrc')
+ .margin('5vp')
+ .onClick(() => {
+ this.marqueeSrc = ArrEntity.textOneHundredHuLength;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.marqueeSrc == ArrEntity.textOneHundredHuLength && this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+ Marquee({start:true,src:this.marqueeSrc})
+
+ if (this.marqueeSrc == ArrEntity.textOneHundredHuLength && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeStepSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeStepSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7a48dd497882ebd7c85e60b62a4776653870975d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeStepSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueeStepSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueeStepSample');
+ @State marqueeStep: number = 3;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Step')
+ .id('MarqueeChangeStep')
+ .margin('5vp')
+ .onClick(() => {
+ this.marqueeStep = 9;
+ })
+
+ }.width('100%')
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.marqueeStep == 9 && this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+ Marquee({start:true,step:this.marqueeStep,src:ArrEntity.textTenLength})
+
+ if (this.marqueeStep == 9 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5aae22d52dc6695a09fa2e187a820c6ecb233413
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/marquee/MarqueeWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MarqueeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('MarqueeWidthSample');
+ @State marqueeWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 100 to 200')
+ .id('MarqueeChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.marqueeWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.marqueeWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+ Marquee({start:false,src:ArrEntity.textTenLength}).width(this.marqueeWidth);
+
+ if (this.marqueeWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2a9523d95b85b7fb4996711e666cb0dd4c2ed85d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuCreateSample.ets
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct DividerCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('DividerCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+ Menu();
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFirstExpendSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFirstExpendSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..15809b73431c6188fd298eba139ed4c9f406dcba
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFirstExpendSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuFirstExpendSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuFirstExpendSample');
+ build() {
+ Button('change First Expend')
+ .id('MenuFirstChangeExpend')
+ .margin('5vp')
+ .bindMenu(this.SubFirstMenu())
+ }
+
+ @Builder
+ SubFirstMenu(){
+ if (this.timeHelper.printTime(true)) {
+ }
+ Menu() {
+ MenuItem({
+ startIcon: $r("app.media.app_icon"),
+ content: "一级菜单",
+ endIcon: $r("app.media.app_icon"),
+ builder: ():void=>this.SubSecondMenu()
+ }).id('MenuFirstChangeExpendSencond')
+ }
+ if (this.timeHelper.printTime(false)) {
+ }
+ }
+
+ @Builder
+ SubSecondMenu() {
+ Menu() {
+ MenuItem({
+ startIcon: $r("app.media.app_icon"),
+ content: "二级菜单",
+ endIcon: $r("app.media.app_icon"),
+ builder: ():void=>this.SubThirdMenu()})
+ }.id('MenuFirstChangeExpendThird')
+ }
+
+ @Builder
+ SubThirdMenu() {
+ Menu() {
+ MenuItem({
+ content: "三级菜单",
+ })
+ }
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFontColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFontColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3a0eb762ee9341f9f392d10f50750a4af92701c2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFontColorSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuFontColorSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuFontColorSample');
+ @State menuFontColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change FontColor')
+ .id('MenuChangeFontColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.menuFontColor = Color.Yellow;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.menuFontColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+ Menu().fontColor(this.menuFontColor);
+
+ if (this.menuFontColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFontSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFontSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c347e862106bd86d20477095f12c83ccfea3466a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuFontSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuFontSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuFontSample');
+ @State menuFont: Font = { size: 16, weight: FontWeight.Normal, style: FontStyle.Normal };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Font')
+ .id('MenuChangeFont')
+ .margin('5vp')
+ .onClick(() => {
+ this.menuFont = { size: 30, weight: FontWeight.Bolder, style: FontStyle.Italic };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.menuFont.size == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+ Menu().font(this.menuFont);
+
+ if (this.menuFont.size == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuGroupCloseExpandSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuGroupCloseExpandSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..474833f250fc26604007bb58dab96985fecc76f8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuGroupCloseExpandSample.ets
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuGroupCloseExpandSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuGroupCloseExpandSample');
+ build() {
+ Button('change GroupCloseExpand')
+ .id('MenuChangeGroupCloseExpand')
+ .margin('5vp')
+ .bindMenu(this.SubFirstMenu())
+ }
+
+ @Builder
+ SubFirstMenu(){
+ if (this.timeHelper.printTime(true)) {
+ }
+ Menu() {
+ MenuItemGroup({ header: '小标题1' })
+ MenuItemGroup({ header: '小标题2' })
+ MenuItemGroup({ header: '小标题3' })
+ }
+ if (this.timeHelper.printTime(false)) {
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuGroupMoreCloseSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuGroupMoreCloseSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b5c534e7484cd9a36ef2e9128fe21e5e1190a717
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuGroupMoreCloseSample.ets
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuGroupMoreCloseSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuGroupMoreCloseSample');
+ build() {
+ Button('change GroupMoreClose')
+ .id('MenuChangeGroupMoreClose')
+ .margin('5vp')
+ .bindMenu(this.SubFirstMenu())
+ }
+
+ @Builder
+ SubFirstMenu(){
+ if (this.timeHelper.printTime(true)) {
+ }
+ Menu() {
+ MenuItemGroup({ header: '小标题1' })
+ MenuItemGroup({ header: '小标题2' })
+ MenuItemGroup({ header: '小标题3' })
+ }
+ if (this.timeHelper.printTime(false)) {
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..50e99f9e1533d9ed09968791503b49e10a6a2266
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuHeightSample');
+ @State menuHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height')
+ .id('MenuChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.menuHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.menuHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+ Menu().width(this.menuHeight);
+
+ if (this.menuHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9c4fb2eb2d41075bdb8d81e3572810ed349eb206
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuHome.ets
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct MenuHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('MenuBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'MenuCreate',buttonUrl:'pages/base/menu/MenuCreateSample'});
+ CommonButton({buttonName:'MenuFont',buttonUrl:'pages/base/menu/MenuFontSample'});
+ CommonButton({buttonName:'MenuFontColor',buttonUrl:'pages/base/menu/MenuFontColorSample'});
+ CommonButton({buttonName:'MenuWidth',buttonUrl:'pages/base/menu/MenuWidthSample'});
+ CommonButton({buttonName:'MenuHeight',buttonUrl:'pages/base/menu/MenuHeightSample'});
+ CommonButton({buttonName:'MenuPadding',buttonUrl:'pages/base/menu/MenuPaddingSample'});
+ CommonButton({buttonName:'MenuMargin',buttonUrl:'pages/base/menu/MenuMarginSample'});
+ CommonButton({buttonName:'MenuFirstExpend',buttonUrl:'pages/base/menu/MenuFirstExpendSample'});
+ CommonButton({buttonName:'MenuSecondExpend',buttonUrl:'pages/base/menu/MenuSecondExpendSample'});
+ CommonButton({buttonName:'MenuMoreClose',buttonUrl:'pages/base/menu/MenuMoreCloseSample'});
+ CommonButton({buttonName:'MenuGroupCloseExpand',buttonUrl:'pages/base/menu/MenuGroupCloseExpandSample'});
+ CommonButton({buttonName:'MenuGroupMoreClose',buttonUrl:'pages/base/menu/MenuGroupMoreCloseSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0185341ec21bb8460f2753a60d3d1b619f34e3b9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuMarginSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuMarginSample');
+ @State menuMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin')
+ .id('MenuChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.menuMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.menuMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+ Menu().margin(this.menuMargin);
+
+ if (this.menuMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuMoreCloseSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuMoreCloseSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..390d79b4e2f925e70eec1f2c06c91913593174d6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuMoreCloseSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuMoreCloseSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuMoreCloseSample');
+ build() {
+ Button('change More Close')
+ .id('MenuMoreCloseFirst')
+ .margin('5vp')
+ .bindMenu(this.SubFirstMenu())
+ }
+
+ @Builder
+ SubFirstMenu(){
+ if (this.timeHelper.printTime(true)) {
+ }
+ Menu() {
+ MenuItem({
+ startIcon: $r("app.media.app_icon"),
+ content: "一级菜单",
+ endIcon: $r("app.media.app_icon"),
+ builder: ():void=>this.SubSecondMenu()
+ }).id('MenuMoreCloseSencond')
+ }
+ if (this.timeHelper.printTime(false)) {
+ }
+ }
+
+ @Builder
+ SubSecondMenu() {
+ Menu() {
+ MenuItem({
+ startIcon: $r("app.media.app_icon"),
+ content: "二级菜单",
+ endIcon: $r("app.media.app_icon"),
+ builder: ():void=>this.SubThirdMenu()})
+ }.id('MenuMoreCloseThird')
+ }
+
+ @Builder
+ SubThirdMenu() {
+ Menu() {
+ MenuItem({
+ content: "三级菜单",
+ })
+ }
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8afabb26c287d47e5ae348ed3738f3709fc4f975
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuPaddingSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuPaddingSample');
+ @State menuPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding')
+ .id('MenuChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.menuPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.menuPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+ Menu().padding(this.menuPadding);
+
+ if (this.menuPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuSecondExpendSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuSecondExpendSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6ebd84d5758ac01e75da3bc49049ec725fa23405
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuSecondExpendSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuSecondExpendSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuSecondExpendSample');
+ build() {
+ Button('change Second Expend')
+ .id('MenuSecondChangeExpend')
+ .margin('5vp')
+ .bindMenu(this.SubFirstMenu())
+ }
+
+ @Builder
+ SubFirstMenu(){
+ if (this.timeHelper.printTime(true)) {
+ }
+ Menu() {
+ MenuItem({
+ startIcon: $r("app.media.app_icon"),
+ content: "一级菜单",
+ endIcon: $r("app.media.app_icon"),
+ builder: ():void=>this.SubSecondMenu()
+ }).id('MenuSecondChangeExpendSencond')
+ }
+ if (this.timeHelper.printTime(false)) {
+ }
+ }
+
+ @Builder
+ SubSecondMenu() {
+ Menu() {
+ MenuItem({
+ startIcon: $r("app.media.app_icon"),
+ content: "二级菜单",
+ endIcon: $r("app.media.app_icon"),
+ builder: ():void=>this.SubThirdMenu()})
+ }.id('MenuSecondChangeExpendThird')
+ }
+
+ @Builder
+ SubThirdMenu() {
+ Menu() {
+ MenuItem({
+ content: "三级菜单",
+ })
+ }
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..682254f7c1ee766599787e26c78ab856de394087
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/menu/MenuWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct MenuWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('MenuWidthSample');
+ @State menuWidth: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Width')
+ .id('MenuChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.menuWidth = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.menuWidth == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+ Menu().width(this.menuWidth);
+
+ if (this.menuWidth == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9fbf1585bad5f4adac097594126256f90a853ff7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ Navigation()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b3fc0169edcd952c9fa1a8959a738e7517383719
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationHeightSample');
+ @State navigationHeight: number = 300;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 300 to 400')
+ .id('change height 300 to 400')
+ .margin('5vp')
+ .onClick(() => {
+ this.navigationHeight = 400;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.navigationHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ Navigation().height(this.navigationHeight)
+ if (this.navigationHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideBackButtonSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideBackButtonSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d27486b12c42f99703f1dc1d809ea1440050e0f1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideBackButtonSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件hideBackButton属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationHideBackButtonSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationHideBackButtonSample');
+ @State hideBackButton: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change hideBackButton true to false')
+ .id('change hideBackButton true to false')
+ .margin('5vp')
+ .onClick(() => {
+ this.hideBackButton = false;
+ })
+ }.width('100%')
+
+
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (!this.hideBackButton && this.timeHelper.printTime(true)) {
+ }
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ if (!this.hideBackButton && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.hideBackButton(this.hideBackButton)
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideNavBarSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideNavBarSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..917764ac6a3c077aff8c95db84de56d70722cc09
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideNavBarSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件hideNavBar属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationHideNavBarSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationHideNavBarSample');
+ @State hideNavBar: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change hideNavBar Stack to Split')
+ .id('change hideNavBar Stack to Split')
+ .margin('5vp')
+ .onClick(() => {
+ this.hideNavBar = false;
+ })
+ }.width('100%')
+
+
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (!this.hideNavBar && this.timeHelper.printTime(true)) {
+ }
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ if (!this.hideNavBar && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.hideNavBar(this.hideNavBar)
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideTitleBarSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideTitleBarSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..103a98db0486462abeebfe9af7f68a6620351348
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideTitleBarSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件hideTitleBar属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationHideTitleBarSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationHideTitleBarSample');
+ @State hideTitleBar: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change hideTitleBar true to false')
+ .id('change hideTitleBar true to false')
+ .margin('5vp')
+ .onClick(() => {
+ this.hideTitleBar = false;
+ })
+ }.width('100%')
+
+
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (!this.hideTitleBar && this.timeHelper.printTime(true)) {
+ }
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ if (!this.hideTitleBar && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.hideTitleBar(this.hideTitleBar)
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideToolBarSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideToolBarSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c0ef6d5822680f04a1b358255d34268803f239d1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHideToolBarSample.ets
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件hideToolBar属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationHideToolBarSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationHideToolBarSample');
+ @State hideToolBar: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change hideToolBar true to false')
+ .id('change hideToolBar true to false')
+ .margin('5vp')
+ .onClick(() => {
+ this.hideToolBar = false;
+ })
+ }.width('100%')
+
+
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (!this.hideToolBar && this.timeHelper.printTime(true)) {
+ }
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ if (!this.hideToolBar && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.hideToolBar(this.hideToolBar).toolbarConfiguration([
+ {
+ value: 'title1',
+ icon: $r("app.media.icon")
+ },
+ {
+ value: 'title2',
+ icon: $r("app.media.icon")
+ },
+ {
+ value: 'title3',
+ icon: $r("app.media.icon")
+ }
+ ]).width(300).height(300)
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7e433ab700fd9cd9689ecc2e84bbde6dbc056e6f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationHome.ets
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct NavigationHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('NavigationBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'NavigationCreateSample', buttonUrl: 'pages/base/navigation/NavigationCreateSample' });
+ CommonButton({ buttonName: 'NavigationWidthSample', buttonUrl: 'pages/base/navigation/NavigationWidthSample' });
+ CommonButton({ buttonName: 'NavigationHeightSample', buttonUrl: 'pages/base/navigation/NavigationHeightSample' });
+ CommonButton({ buttonName: 'NavigationPaddingSample', buttonUrl: 'pages/base/navigation/NavigationPaddingSample' });
+ CommonButton({ buttonName: 'NavigationMarginSample', buttonUrl: 'pages/base/navigation/NavigationMarginSample' });
+ CommonButton({ buttonName: 'NavigationTitleModeSample', buttonUrl: 'pages/base/navigation/NavigationTitleModeSample' });
+ CommonButton({ buttonName: 'NavigationHideToolBarSample', buttonUrl: 'pages/base/navigation/NavigationHideToolBarSample' });
+ CommonButton({ buttonName: 'NavigationHideTitleBarSample', buttonUrl: 'pages/base/navigation/NavigationHideTitleBarSample' });
+ CommonButton({ buttonName: 'NavigationHideBackButtonSample', buttonUrl: 'pages/base/navigation/NavigationHideBackButtonSample' });
+ CommonButton({ buttonName: 'NavigationNavBarWidthSample', buttonUrl: 'pages/base/navigation/NavigationNavBarWidthSample' });
+ CommonButton({ buttonName: 'NavigationNavBarPositionSample', buttonUrl: 'pages/base/navigation/NavigationNavBarPositionSample' });
+ CommonButton({ buttonName: 'NavigationModeSample', buttonUrl: 'pages/base/navigation/NavigationModeSample' });
+ CommonButton({ buttonName: 'NavigationHideNavBarSample', buttonUrl: 'pages/base/navigation/NavigationHideNavBarSample' });
+ CommonButton({ buttonName: 'NavigationStackJumpSample', buttonUrl: 'pages/base/navigation/NavigationStackJumpSample' });
+ CommonButton({ buttonName: 'NavigationSplitJumpSample', buttonUrl: 'pages/base/navigation/NavigationSplitJumpSample' });
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2d9c7b3cf7a36c3627d92dc80b6fc8abf041052e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationMarginSample');
+ @State navigationMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.navigationMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.navigationMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ Navigation().margin(this.navigationMargin)
+ if (this.navigationMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationModeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationModeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..48adf2b5aa1fd58e6ef77495e556a720f94f767e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationModeSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationModeSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationModeSample');
+ @State navigationMode: NavigationMode = NavigationMode.Stack;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change navigationMode Stack to Split')
+ .id('change navigationMode Stack to Split')
+ .margin('5vp')
+ .onClick(() => {
+ this.navigationMode = NavigationMode.Split;
+ })
+ }.width('100%')
+
+
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.navigationMode > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ if (this.navigationMode > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.mode(this.navigationMode)
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationNavBarPositionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationNavBarPositionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fa5750e749773046e5a2a0424969c304eeeac63f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationNavBarPositionSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件navBarPosition属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationNavBarPositionSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationNavBarPositionSample');
+ @State navBarPosition: NavBarPosition = NavBarPosition.Start;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change navBarPosition Start to End')
+ .id('change navBarPosition Start to End')
+ .margin('5vp')
+ .onClick(() => {
+ this.navBarPosition = NavBarPosition.End;
+ })
+ }.width('100%')
+
+
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.navBarPosition > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ if (this.navBarPosition > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.navBarPosition(this.navBarPosition)
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationNavBarWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationNavBarWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7fa16254ace3957ee37056f3790bfb5818a1979a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationNavBarWidthSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件navBarWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationNavBarWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationNavBarWidthSample');
+ @State navBarWidth: number = 240;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change navBarWidth 240 to 400')
+ .id('change navBarWidth 240 to 400')
+ .margin('5vp')
+ .onClick(() => {
+ this.navBarWidth = 400;
+ })
+ }.width('100%')
+
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.navBarWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ if (this.navBarWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.navBarWidth(this.navBarWidth)
+
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c68268d98a21535f93639c50a13c47de284fb2a0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationPaddingSample');
+ @State navigationPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.navigationPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.navigationPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ Navigation().padding(this.navigationPadding)
+ if (this.navigationPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationSplitJumpSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationSplitJumpSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d8cd282bee4db983cb7bb9545c12f2885bb17a83
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationSplitJumpSample.ets
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件Split模式触发页面跳转更新布局耗时
+ */
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationSplitJumpSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationSplitJumpSample');
+ @Provide navPathStack: NavPathStack = new NavPathStack();
+
+ @Builder
+ PageTwo(name: string) {
+ if (this.timeHelper.printTime(false)) {
+ }
+ NavDestination() {
+ }.title('PageTwo')
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('Split jump to next page')
+ .id('Split jump to next page')
+ .margin('5vp')
+ .onClick(() => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ this.navPathStack.pushPath({ name: '' })
+ })
+ }.width('100%')
+
+ Navigation(this.navPathStack) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ })
+ }.mode(NavigationMode.Split).title('PageOne').navDestination(this.PageTwo)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationStackJumpSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationStackJumpSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4a5b41d031a3ca87f956b45081ced0d282940f1c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationStackJumpSample.ets
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件Stack模式触发页面跳转更新布局耗时
+ */
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationStackJumpSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationStackJumpSample');
+ @Provide navPathStack: NavPathStack = new NavPathStack();
+
+ @Builder
+ PageTwo(name: string) {
+ if (this.timeHelper.printTime(false)) {
+ }
+ NavDestination() {
+ }.title('PageTwo')
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('Stack jump to next page')
+ .id('Stack jump to next page')
+ .margin('5vp')
+ .onClick(() => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ this.navPathStack.pushPath({ name: '' })
+ })
+ }.width('100%')
+
+ Navigation(this.navPathStack) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ })
+ }.mode(NavigationMode.Stack).title('PageOne').navDestination(this.PageTwo)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationTitleModeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationTitleModeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ae5604c09653ac7855b602951778149b76844c71
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationTitleModeSample.ets
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件titleMode属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationTitleModeSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationTitleModeSample');
+ @State titleModeValue: NavigationTitleMode = NavigationTitleMode.Full;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change titleMode to Free')
+ .id('change titleMode to Free')
+ .margin('5vp')
+ .onClick(() => {
+ this.titleModeValue = NavigationTitleMode.Free;
+ })
+ Button('change titleMode to Full')
+ .id('change titleMode to Full')
+ .margin('5vp')
+ .onClick(() => {
+ this.titleModeValue = NavigationTitleMode.Full;
+ })
+ Button('change titleMode to Mini')
+ .id('change titleMode to Mini')
+ .margin('5vp')
+ .onClick(() => {
+ this.titleModeValue = NavigationTitleMode.Mini;
+ })
+ }.width('100%')
+
+ if (this.titleModeValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Navigation() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ Text("" + index)
+ })
+ }.titleMode(this.titleModeValue)
+
+ if (this.titleModeValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..126236471441f3e3620eaa0f417d6c2803af56c7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/navigation/NavigationWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Navigation组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct NavigationWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('NavigationWidthSample');
+ @State navigationWidth: number = 500;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 500 to 600')
+ .id('change width 500 to 600')
+ .margin('5vp')
+ .onClick(() => {
+ this.navigationWidth = 600;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.navigationWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ Navigation().width(this.navigationWidth)
+ if (this.navigationWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockActiveColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockActiveColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..78d5f169a41fa6d55bd9b458302d8d783c539805
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockActiveColorSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockActiveColorSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockActiveColorSample');
+ @State patternLockActiveColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change ActiveColor')
+ .id('PatternLockChangeActiveColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockActiveColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockActiveColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+ PatternLock().selectedColor(this.patternLockActiveColor)
+
+ if (this.patternLockActiveColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockCircleRadiusSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockCircleRadiusSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..dcd9bb711a4bb9fdd0408fb6a64b14269af3b14f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockCircleRadiusSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockCircleRadiusSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockCircleRadiusSample');
+ @State patternLockCircleRadius: string = '6vp';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change CircleRadius')
+ .id('PatternLockChangeCircleRadius')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockCircleRadius = '12vp';
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockCircleRadius == '12vp' && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+ PatternLock().circleRadius(this.patternLockCircleRadius)
+
+ if (this.patternLockCircleRadius == '12vp' && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2f9cfe6ce651640d8f2c03b7ad5af3783f31d178
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+ PatternLock();
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8df5fa6101f5804babb46d0d277dea96fc7318c7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct patternLockHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('patternLockHeightSample');
+ @State patternLockHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height')
+ .id('PatternLockChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+ PatternLock().height(this.patternLockHeight)
+
+ if (this.patternLockHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1a828777d2c0f64dbfd83262b1afa3a0b42dff6e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockHome.ets
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct PatternLockHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('PatternLockBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'PatternLockCreate',buttonUrl:'pages/base/patternLock/PatternLockCreateSample'});
+ CommonButton({buttonName:'PatternLockSideLength',buttonUrl:'pages/base/patternLock/PatternLockSideLengthSample'});
+ CommonButton({buttonName:'PatternLockCircleRadius',buttonUrl:'pages/base/patternLock/PatternLockCircleRadiusSample'});
+ CommonButton({buttonName:'PatternLockRegularColor',buttonUrl:'pages/base/patternLock/PatternLockRegularColorSample'});
+ CommonButton({buttonName:'PatternLockSelectedColor',buttonUrl:'pages/base/patternLock/PatternLockSelectedColorSample'});
+ CommonButton({buttonName:'PatternLockActiveColor',buttonUrl:'pages/base/patternLock/PatternLockActiveColorSample'});
+ CommonButton({buttonName:'PatternLockPathColor',buttonUrl:'pages/base/patternLock/PatternLockPathColorSample'});
+ CommonButton({buttonName:'PatternLockPathStrokeWidth',buttonUrl:'pages/base/patternLock/PatternLockPathStrokeWidthSample'});
+ CommonButton({buttonName:'PatternLockWidth',buttonUrl:'pages/base/patternLock/PatternLockWidthSample'});
+ CommonButton({buttonName:'PatternLockHeight',buttonUrl:'pages/base/patternLock/PatternLockHeightSample'});
+ CommonButton({buttonName:'PatternLockPadding',buttonUrl:'pages/base/patternLock/PatternLockPaddingSample'});
+ CommonButton({buttonName:'PatternLockMargin',buttonUrl:'pages/base/patternLock/PatternLockMarginSample'});
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d81f7d5b4999736f960b78a6ce7ab3372561a11e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockMarginSample');
+ @State patternLockMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin')
+ .id('PatternLockChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+ PatternLock().margin(this.patternLockMargin)
+
+ if (this.patternLockMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f9661d434a978c923b968534d5a055105de02244
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockPaddingSample');
+ @State patternLockPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding')
+ .id('PatternLockChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+ Counter().padding(this.patternLockPadding)
+
+ if (this.patternLockPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPathColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPathColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c725500da3ddccde3a67dcc296f33668d83780b4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPathColorSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockPathColorSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockPathColorSample');
+ @State patternLockPathColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change PathColor')
+ .id('PatternLockChangePathColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockPathColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockPathColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+ PatternLock().pathColor(this.patternLockPathColor)
+
+ if (this.patternLockPathColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPathStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPathStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..93642c46ac681931494075af4bfa1b372c26ac89
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPathStrokeWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockPathStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockPathStrokeWidthSample');
+ @State patternLockPathStrokeWidth: string = '12vp';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change PathStrokeWidth')
+ .id('PatternLockChangePathStrokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockPathStrokeWidth = '20vp';
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockPathStrokeWidth == '20vp' && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+ PatternLock().pathStrokeWidth(this.patternLockPathStrokeWidth)
+
+ if (this.patternLockPathStrokeWidth == '20vp' && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockRegularColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockRegularColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9641777c169eeef54ff42195e9790596bbe0e003
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockRegularColorSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockRegularColorSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockRegularColorSample');
+ @State patternLockRegularColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change RegularColor')
+ .id('PatternLockChangeRegularColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockRegularColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockRegularColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+ PatternLock().regularColor(this.patternLockRegularColor)
+
+ if (this.patternLockRegularColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockSelectedColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockSelectedColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ce946ad7138dcac4174c53d54f516acf5222e1e2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockSelectedColorSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockSelectedColorSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockSelectedColorSample');
+ @State patternLockSelectedColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change SelectedColor')
+ .id('PatternLockChangeSelectedColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockSelectedColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockSelectedColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+ PatternLock().selectedColor(this.patternLockSelectedColor)
+
+ if (this.patternLockSelectedColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockSideLengthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockSideLengthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bcc60033c2e1c373fc731f394ce0854d31ba0994
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockSideLengthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockSideLengthSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockSideLengthSample');
+ @State patternLockSideLength: string = '228vp';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change SideLength')
+ .id('PatternLockChangeSideLength')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockSideLength = '400vp';
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockSideLength == '400vp' && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+ PatternLock().sideLength(this.patternLockSideLength)
+
+ if (this.patternLockSideLength == '400vp' && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..249279703ebd4a5e714dc9ec4f08decb92359062
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PatternLockWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('PatternLockWidthSample');
+ @State patternLockWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Width')
+ .id('PatternLockChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.patternLockWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.patternLockWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+ PatternLock().width(this.patternLockWidth)
+
+ if (this.patternLockWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2d5f5e525c24bcfad1bd8eed7098ed2628b3e42f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ Progress({ value: 50 })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b88ad5e543ce25e0770c127c6090079ca6e10108
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressHeightSample');
+ @State progressHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.progressHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ Progress({ value: 50 }).height(this.progressHeight)
+ if (this.progressHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..72fc87d62df040137f6fb0ef9b6b971705eb3fd9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressHome.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct ProgressHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ProgressHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'ProgressCreateSample', buttonUrl: 'pages/base/progress/ProgressCreateSample' });
+ CommonButton({ buttonName: 'ProgressWidthSample', buttonUrl: 'pages/base/progress/ProgressWidthSample' });
+ CommonButton({ buttonName: 'ProgressHeightSample', buttonUrl: 'pages/base/progress/ProgressHeightSample' });
+ CommonButton({ buttonName: 'ProgressPaddingSample', buttonUrl: 'pages/base/progress/ProgressPaddingSample' });
+ CommonButton({ buttonName: 'ProgressMarginSample', buttonUrl: 'pages/base/progress/ProgressMarginSample' });
+ CommonButton({ buttonName: 'ProgressProgressTypeSample', buttonUrl: 'pages/base/progress/ProgressProgressTypeSample' });
+ CommonButton({ buttonName: 'ProgressProgressStyleSample', buttonUrl: 'pages/base/progress/ProgressProgressStyleSample' });
+ CommonButton({ buttonName: 'ProgressLinearSample', buttonUrl: 'pages/base/progress/ProgressLinearSample' });
+ CommonButton({ buttonName: 'ProgressRingSample', buttonUrl: 'pages/base/progress/ProgressRingSample' });
+ CommonButton({ buttonName: 'ProgressScaleRingSample', buttonUrl: 'pages/base/progress/ProgressScaleRingSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressLinearSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressLinearSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..da1cb106417951ac0224a8b9d01b9eff619fe3bb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressLinearSample.ets
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件style样式中LinearStyleOptions属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressLinearSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressLinearSample');
+ @State strokeWidth: number = 4;
+ @State strokeRadius: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeWidth(4-20) add strokeRadius(0-10)')
+ .id('change strokeWidth(4-20) add strokeRadius(0-10)')
+ .margin('5vp')
+ .onClick(() => {
+ this.strokeWidth = 20;
+ this.strokeRadius = 10;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.strokeWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ Progress({ value: 50, type: ProgressType.Linear })
+ .style({ strokeWidth: this.strokeWidth, strokeRadius: this.strokeRadius })
+ if (this.strokeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8edbb027e02fda795d13ce0ad051f58810f07a3c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressMarginSample');
+ @State progressMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.progressMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ Progress({ value: 50 }).margin(this.progressMargin)
+ if (this.progressMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cdc795c75fb2c45f49c8deec1ce24b7f1254fa2c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressPaddingSample');
+ @State progressPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.progressPadding != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ Progress({ value: 50 }).padding(this.progressPadding)
+ if (this.progressPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressProgressStyleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressProgressStyleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c27b85a64906cdd2d75ec35e9d852f30a3d7e073
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressProgressStyleSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件style样式中ProgressStyleOptions属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ProgressProgressStyleSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressProgressStyleSample');
+ @State strokeWidth: number = 4;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeWidth 4 to 20')
+ .id('change strokeWidth 4 to 20')
+ .margin('5vp')
+ .onClick(() => {
+ this.strokeWidth = 20;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.strokeWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50, style: ProgressStyle.Linear }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Eclipse }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.ScaleRing }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Capsule }).style({ strokeWidth: this.strokeWidth })
+
+ Progress({ value: 50, style: ProgressStyle.Linear }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Eclipse }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.ScaleRing }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Capsule }).style({ strokeWidth: this.strokeWidth })
+
+ Progress({ value: 50, style: ProgressStyle.Linear }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Eclipse }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.ScaleRing }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Capsule }).style({ strokeWidth: this.strokeWidth })
+
+ Progress({ value: 50, style: ProgressStyle.Linear }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Eclipse }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.ScaleRing }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, style: ProgressStyle.Capsule }).style({ strokeWidth: this.strokeWidth })
+ if (this.strokeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressProgressTypeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressProgressTypeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ad1e14dc57b542e760e2fd1c2fadd58fa5a04263
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressProgressTypeSample.ets
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件ProgressType属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressProgressTypeSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressProgressTypeSample');
+ @State progressType: ProgressType = ProgressType.Ring;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change progressType to Linear')
+ .id('change progressType to Linear')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressType = ProgressType.Linear;
+ })
+ Button('change progressType to Ring')
+ .id('change progressType to Ring')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressType = ProgressType.Ring;
+ })
+ Button('change progressType to Eclipse')
+ .id('change progressType to Eclipse')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressType = ProgressType.Eclipse;
+ })
+ Button('change progressType to ScaleRing')
+ .id('change progressType to ScaleRing')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressType = ProgressType.ScaleRing;
+ })
+ Button('change progressType to Capsule')
+ .id('change progressType to Capsule')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressType = ProgressType.Capsule;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.progressType != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ Progress({ value: 50, type: this.progressType })
+ if (this.progressType != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressRingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressRingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3f3505a5ef338b9bc8cf99cad766f6a00d5c76a0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressRingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件style样式中RingStyleOptions属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressRingSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressRingSample');
+ @State strokeWidth: number = 4;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeWidth 4 to 20')
+ .id('change strokeWidth 4 to 20')
+ .margin('5vp')
+ .onClick(() => {
+ this.strokeWidth = 20;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.strokeWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.Ring }).style({ strokeWidth: this.strokeWidth })
+ if (this.strokeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressScaleRingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressScaleRingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..acf74c6242d54888a7e259834cd70314fc14aedf
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressScaleRingSample.ets
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件style样式中RingStyleOptions属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressScaleRingSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressScaleRingSample');
+ @State strokeWidth: number = 4;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeWidth 4 to 20')
+ .id('change strokeWidth 4 to 20')
+ .margin('5vp')
+ .onClick(() => {
+ this.strokeWidth = 20;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.strokeWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ Progress({ value: 50, type: ProgressType.ScaleRing })
+ .style({ strokeWidth: this.strokeWidth })
+ if (this.strokeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..41ed3aa759d32641d7111fb01319fc5a71b3e3c0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/progress/ProgressWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Progress组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ProgressWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ProgressWidthSample');
+ @State progressWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.progressWidth = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.progressWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ Progress({ value: 50 }).width(this.progressWidth)
+ if (this.progressWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e594663dedcad322a563f5e60ccb778807832e15
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeCreateSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * QRCode组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct QRCodeCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('QRCodeCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+ QRCode("")
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ba5e5baf16c99f9ddfe96a41dfbb705e4de0f359
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * QRCode组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct QRCodeHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('QRCodeHeightSample');
+ @State qrcodeHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.qrcodeHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.qrcodeHeight != null && this.timeHelper.printTime(true)) {
+ }
+
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+ QRCode("").height(this.qrcodeHeight)
+
+ if (this.qrcodeHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8ab62afb7a91a69f8109cd1116885b300494a251
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeHome.ets
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct QRCodeHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('QRCodeHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'QRCodeCreateSample', buttonUrl: 'pages/base/qRCode/QRCodeCreateSample' });
+ CommonButton({ buttonName: 'QRCodeWidthSample', buttonUrl: 'pages/base/qRCode/QRCodeWidthSample' });
+ CommonButton({ buttonName: 'QRCodeHeightSample', buttonUrl: 'pages/base/qRCode/QRCodeHeightSample' });
+ CommonButton({ buttonName: 'QRCodePaddingSample', buttonUrl: 'pages/base/qRCode/QRCodePaddingSample' });
+ CommonButton({ buttonName: 'QRCodeMarginSample', buttonUrl: 'pages/base/qRCode/QRCodeMarginSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..32c83a9eb32b57a8cf079529d7ccca83db9e0862
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * QRCode组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct QRCodeMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('QRCodeMarginSample');
+ @State qrcodeMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.qrcodeMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.qrcodeMargin != null && this.timeHelper.printTime(true)) {
+ }
+
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+ QRCode("").margin(this.qrcodeMargin)
+
+ if (this.qrcodeMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7e6445b1eef620cc606d7e433423aa0cbc9d0365
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodePaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * QRCode组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct QRCodePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('QRCodePaddingSample');
+ @State qrcodePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.qrcodePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.qrcodePadding != null && this.timeHelper.printTime(true)) {
+ }
+
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+ QRCode("").padding(this.qrcodePadding)
+
+ if (this.qrcodePadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d482881201bf9bdd05ee8a37aed97c2a44ef6f1b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/qRCode/QRCodeWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * QRCode组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct QRCodeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('QRCodeWidthSample');
+ @State qrcodeWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.qrcodeWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.qrcodeWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+ QRCode("").width(this.qrcodeWidth)
+
+ if (this.qrcodeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4d7e0d812951465fd20ce085c3320bed0cc11dcb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Radio组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RadioCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('RadioCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ Radio({ value: '', group: '' })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0d33dc2ae33e031345a0af0db55a72c5935127aa
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Radio组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RadioHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('RadioHeightSample');
+ @State radioHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.radioHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.radioHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ Radio({ value: '', group: '' }).height(this.radioHeight)
+ if (this.radioHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4282af503595dd92114cd8df7beb94c8de2725f5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioHome.ets
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct RadioHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('RadioHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'RadioCreateSample', buttonUrl: 'pages/base/radio/RadioCreateSample' });
+ CommonButton({ buttonName: 'RadioWidthSample', buttonUrl: 'pages/base/radio/RadioWidthSample' });
+ CommonButton({ buttonName: 'RadioHeightSample', buttonUrl: 'pages/base/radio/RadioHeightSample' });
+ CommonButton({ buttonName: 'RadioPaddingSample', buttonUrl: 'pages/base/radio/RadioPaddingSample' });
+ CommonButton({ buttonName: 'RadioMarginSample', buttonUrl: 'pages/base/radio/RadioMarginSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b2e8aaf3904596f955a9b09848f4d075073b5c66
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Radio组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RadioMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('RadioMarginSample');
+ @State radioMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.radioMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.radioMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ Radio({ value: '', group: '' }).margin(this.radioMargin)
+ if (this.radioMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..90a525057f387807b65ac57f9d4b896d83a511d5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Radio组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RadioPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('RadioPaddingSample');
+ @State radioPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.radioPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.radioPadding != null && this.timeHelper.printTime(true)) {
+ }
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ Radio({ value: '', group: '' }).padding(this.radioPadding)
+ if (this.radioPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4e25230d9bae288a177b02a4a8c5bc2de4527008
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/radio/RadioWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Radio组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RadioWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('RadioWidthSample');
+ @State radioWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.radioWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.radioWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ Radio({ value: '', group: '' }).width(this.radioWidth)
+ if (this.radioWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingClickSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingClickSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fd1e8fe9e397f022be03d29f53cad757e946d073
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingClickSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingClickSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingClickSample');
+ index: number = 0;
+
+ nextIndex(): number {
+ return this.index++;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+ Rating().stars(10).id('RatingClickIndex' + this.nextIndex());
+
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1625050b39ae7342a1ca1822fca80eb558690af0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingCreateSample.ets
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+ Rating();
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5a9583a6b79b76d4cdbfe713b97a994fe2486d45
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingHeightSample');
+ @State ratingHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('RatingChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.ratingHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ratingHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+ Rating().height(this.ratingHeight)
+
+ if (this.ratingHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d9dc3f49e841262ad1abb6d79e32863343b345ee
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingHome.ets
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct RatingHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('RatingBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'RatingCreate',buttonUrl:'pages/base/rating/RatingCreateSample'});
+ CommonButton({buttonName:'RatingWidth',buttonUrl:'pages/base/rating/RatingWidthSample'});
+ CommonButton({buttonName:'RatingHeight',buttonUrl:'pages/base/rating/RatingHeightSample'});
+ CommonButton({buttonName:'RatingPadding',buttonUrl:'pages/base/rating/RatingPaddingSample'});
+ CommonButton({buttonName:'RatingMargin',buttonUrl:'pages/base/rating/RatingMarginSample'});
+ CommonButton({buttonName:'RatingStars',buttonUrl:'pages/base/rating/RatingStarsSample'});
+ CommonButton({buttonName:'RatingStarStyle',buttonUrl:'pages/base/rating/RatingStarStyleSample'});
+ CommonButton({buttonName:'RatingOptionsRating',buttonUrl:'pages/base/rating/RatingOptionsRatingSample'});
+ CommonButton({buttonName:'RatingClick',buttonUrl:'pages/base/rating/RatingClickSample'});
+ CommonButton({buttonName:'RatingSwip',buttonUrl:'pages/base/rating/RatingSwipSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c84a3b7f3ae196a1e6b78170bf97f444b68f9c24
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingMarginSample');
+ @State ratingMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin')
+ .id('RatingChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.ratingMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ratingMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+ Rating().margin(this.ratingMargin);
+
+ if (this.ratingMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingOptionsRatingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingOptionsRatingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..504c64da248b4c975ac35f67650185210d567a55
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingOptionsRatingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingOptionsRatingSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingOptionsRatingSample');
+ @State ratingOptionsRating: number = 3;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change OptionsRating')
+ .id('RatingChangeOptionsRating')
+ .margin('5vp')
+ .onClick(() => {
+ this.ratingOptionsRating = 8;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ratingOptionsRating == 8 && this.timeHelper.printTime(true)) {
+ }
+
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+ Rating({rating:this.ratingOptionsRating}).stars(10)
+
+ if (this.ratingOptionsRating == 8 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b0a5b8f5e9c69aee742298d31e9c2db18de725b6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingPaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingPaddingSample');
+ @State ratingPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding')
+ .id('RatingChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.ratingPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ratingPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+ Rating().padding(this.ratingPadding);
+
+ if (this.ratingPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingStarStyleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingStarStyleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1fde0092ba84bd2e48e52080c112b2c73fd58ab0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingStarStyleSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingStarStyletyleSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingStarStyletyleSample');
+ @State ratingStarStyle: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change StarStyle')
+ .id('RatingChangeStarStyle')
+ .margin('5vp')
+ .onClick(() => {
+ this.ratingStarStyle = 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ratingStarStyle == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+ Rating().starStyle({ backgroundUri: '/common/notCompleteStar.svg', foregroundUri: '/common/completeStar.svg', secondaryUri: '/common/halfStar.svg' })
+
+ if (this.ratingStarStyle == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingStarsSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingStarsSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..17aff1deb164dd027ddfd289f6e9467d3166a491
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingStarsSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingStarsSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingStarsSample');
+ @State ratingStars: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Stars')
+ .id('RatingChangeStars')
+ .margin('5vp')
+ .onClick(() => {
+ this.ratingStars = 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ratingStars == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+ Rating().stars(this.ratingStars)
+
+ if (this.ratingStars == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingSwipSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingSwipSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..956b2f2367c05f7609a28086581b539b4e441b73
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingSwipSample.ets
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingSwipSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingSwipSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+ Rating().stars(10)
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9d7702ebcf5da0f89205e306701df261680298cc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/rating/RatingWidthSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RatingWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('RatingWidthSample');
+ @State ratingWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 100 to 200')
+ .id('RatingChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.ratingWidth = 200;
+ })
+ }.width('100%')
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ratingWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+ Rating().width(this.ratingWidth)
+
+ if (this.ratingWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..58f125ea147600e688550b988e20fa4307e698d6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarCreateSample.ets
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScrollBar组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollBarCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollBarCreateSample');
+ scroller: Scroller = new Scroller();
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ ScrollBar({ scroller: this.scroller })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarDirectionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarDirectionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..db5e3e8892b683389246214db021642bc5cdd236
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarDirectionSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScrollBar组件direction属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollBarDirectionSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollBarDirectionSample');
+ scroller: Scroller = new Scroller();
+ @State scrollBarDirection: ScrollBarDirection = ScrollBarDirection.Vertical;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change direction')
+ .id('change direction')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBarDirection = ScrollBarDirection.Horizontal;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollBarDirection != null && this.timeHelper.printTime(true)) {
+ }
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ ScrollBar({ scroller: this.scroller, direction: this.scrollBarDirection })
+ if (this.scrollBarDirection != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..de0c8f153bb82a05134c03bba004785a70f33551
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarHeightSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScrollBar组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollBarHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollBarHeightSample');
+ scroller: Scroller = new Scroller();
+ @State scrollBarHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBarHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollBarHeight != null && this.timeHelper.printTime(true)) {
+ }
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ ScrollBar({ scroller: this.scroller }).height(this.scrollBarHeight)
+ if (this.scrollBarHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d7e7e5060f8deb133436269a8aa3dfbde9e1fb55
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarHome.ets
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct ScrollBarHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ScrollBarHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'ScrollBarCreateSample', buttonUrl: 'pages/base/scrollBar/ScrollBarCreateSample' });
+ CommonButton({ buttonName: 'ScrollBarWidthSample', buttonUrl: 'pages/base/scrollBar/ScrollBarWidthSample' });
+ CommonButton({ buttonName: 'ScrollBarHeightSample', buttonUrl: 'pages/base/scrollBar/ScrollBarHeightSample' });
+ CommonButton({ buttonName: 'ScrollBarPaddingSample', buttonUrl: 'pages/base/scrollBar/ScrollBarPaddingSample' });
+ CommonButton({ buttonName: 'ScrollBarMarginSample', buttonUrl: 'pages/base/scrollBar/ScrollBarMarginSample' });
+ CommonButton({ buttonName: 'ScrollBarDirectionSample', buttonUrl: 'pages/base/scrollBar/ScrollBarDirectionSample' });
+ CommonButton({ buttonName: 'ScrollBarStateSample', buttonUrl: 'pages/base/scrollBar/ScrollBarStateSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2a70855569ed356dc9320ce496de91b51869a9d9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarMarginSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScrollBar组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollBarMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollBarMarginSample');
+ scroller: Scroller = new Scroller();
+ @State scrollBarMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBarMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollBarMargin != null && this.timeHelper.printTime(true)) {
+ }
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ ScrollBar({ scroller: this.scroller }).margin(this.scrollBarMargin)
+ if (this.scrollBarMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f3d85377c241f28ad96d61bcc4d9afcc0d0247eb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarPaddingSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScrollBar组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollBarPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollBarPaddingSample');
+ scroller: Scroller = new Scroller();
+ @State scrollBarPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBarPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollBarPadding != null && this.timeHelper.printTime(true)) {
+ }
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ ScrollBar({ scroller: this.scroller }).padding(this.scrollBarPadding)
+ if (this.scrollBarPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarStateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarStateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6d7599dfb4bd32bc17c63e2912410f7d5d2e6e35
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarStateSample.ets
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScrollBar组件state属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollBarStateSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollBarStateSample');
+ scroller: Scroller = new Scroller();
+ @State scrollBarState: BarState = BarState.Off;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change state to On')
+ .id('change state to On')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBarState = BarState.On;
+ })
+ Button('change state to Auto')
+ .id('change state to Auto')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBarState = BarState.Auto;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollBarState != null && this.timeHelper.printTime(true)) {
+ }
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ ScrollBar({ scroller: this.scroller, state: this.scrollBarState })
+ if (this.scrollBarState != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6d141652eacb16e99ad7a4db4d8f4995d7aab5db
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/scrollBar/ScrollBarWidthSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScrollBar组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollBarWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollBarWidthSample');
+ scroller: Scroller = new Scroller();
+ @State scrollBarWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBarWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollBarWidth != null && this.timeHelper.printTime(true)) {
+ }
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ ScrollBar({ scroller: this.scroller }).width(this.scrollBarWidth)
+ if (this.scrollBarWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2cb98cfcda16f8522a1c6c4302bb204bd2e608a6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ Search()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2aac73fc6b774df5d1601ce551dde67080cab4d0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchHeightSample');
+ @State searchHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ /*Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)
+ Search().height(this.searchHeight)*/
+ if (this.searchHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..afc13cca6c272da6372aa3d0ea31030fc2eb92a6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchHome.ets
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct SearchHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('SearchHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'SearchCreateSample', buttonUrl: 'pages/base/search/SearchCreateSample' });
+ CommonButton({ buttonName: 'SearchValueSample', buttonUrl: 'pages/base/search/SearchValueSample' });
+ CommonButton({ buttonName: 'SearchTextAlignSample', buttonUrl: 'pages/base/search/SearchTextAlignSample' });
+ CommonButton({ buttonName: 'SearchWidthSample', buttonUrl: 'pages/base/search/SearchWidthSample' });
+ CommonButton({ buttonName: 'SearchHeightSample', buttonUrl: 'pages/base/search/SearchHeightSample' });
+ CommonButton({ buttonName: 'SearchPaddingSample', buttonUrl: 'pages/base/search/SearchPaddingSample' });
+ CommonButton({ buttonName: 'SearchMarginSample', buttonUrl: 'pages/base/search/SearchMarginSample' });
+ CommonButton({ buttonName: 'SearchTextFontSample', buttonUrl: 'pages/base/search/SearchTextFontSample' });
+ CommonButton({ buttonName: 'SearchPlaceholderFontSample', buttonUrl: 'pages/base/search/SearchPlaceholderFontSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ccb6538a51b244218b5460e989d5bc9277a24c33
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchMarginSample');
+ @State searchMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ /*Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)
+ Search().margin(this.searchMargin)*/
+ if (this.searchMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..67a358f3e5478cfbbea369aa40fad4483438bfc6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchPaddingSample');
+ @State searchPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchPadding != null && this.timeHelper.printTime(true)) {
+ }
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ /* Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)
+ Search().padding(this.searchPadding)*/
+ if (this.searchPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchPlaceholderFontSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchPlaceholderFontSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d6658347d4236476bc25c0ad1516f82e86625a85
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchPlaceholderFontSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件placeholderFont属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchPlaceholderFontSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchPlaceholderFontSample');
+ @State searchPlaceholderFont: Font = { size: 16, weight: FontWeight.Normal, style: FontStyle.Normal };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change placeholderFont')
+ .id('change placeholderFont')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchPlaceholderFont = { size: 30, weight: FontWeight.Bolder, style: FontStyle.Italic };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchPlaceholderFont != null && this.timeHelper.printTime(true)) {
+ }
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ /* Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)
+ Search().placeholderFont(this.searchPlaceholderFont)*/
+ if (this.searchPlaceholderFont != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchTextAlignSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchTextAlignSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..36874ae09b23c4769a404dad78d6b20c5ed7b686
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchTextAlignSample.ets
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件TextAlign属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchTextAlignSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchTextAlignSample');
+ @State searchTextAlign: TextAlign = TextAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change textAlign to Start')
+ .id('change textAlign to Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchTextAlign = TextAlign.Start;
+ })
+ Button('change textAlign to Center')
+ .id('change textAlign to Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchTextAlign = TextAlign.Center;
+ })
+ Button('change textAlign to End')
+ .id('change textAlign to End')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchTextAlign = TextAlign.End;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchTextAlign != null && this.timeHelper.printTime(true)) {
+ }
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ /*Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)
+ Search().textAlign(this.searchTextAlign)*/
+ if (this.searchTextAlign != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchTextFontSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchTextFontSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d0ccee2d238f527da1ae57e9008d1885c63ec376
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchTextFontSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件textFont属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchTextFontSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchTextFontSample');
+ @State searchTextFont: Font = { size: 16, weight: FontWeight.Normal, style: FontStyle.Normal };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change textFont')
+ .id('change textFont')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchTextFont = { size: 30, weight: FontWeight.Bolder, style: FontStyle.Italic };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchTextFont != null && this.timeHelper.printTime(true)) {
+ }
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ /*Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)
+ Search().textFont(this.searchTextFont)*/
+ if (this.searchTextFont != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchValueSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchValueSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..76614f6120c5ca7242da48c38a33ee8b57a063c1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchValueSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件value内容更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchValueSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchValueSample');
+ @State searchValue: string = ArrEntity.textTenLength;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change searchValueLength 10 to 100')
+ .id('change searchValueLength 10 to 100')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchValue = ArrEntity.textTwentyLength;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchValue != null && this.timeHelper.printTime(true)) {
+ }
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ /* Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })
+ Search({ value: this.searchValue })*/
+ if (this.searchValue != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5b52d459846f8da9af38e0ea323d43dee22741ac
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/search/SearchWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Search组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SearchWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SearchWidthSample');
+ @State searchWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.searchWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.searchWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ /*Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)
+ Search().width(this.searchWidth)*/
+ if (this.searchWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectArrowPositionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectArrowPositionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..62c01d607329e53b0b549816777bca4704954d4f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectArrowPositionSample.ets
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectArrowPositionSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectArrowPositionSample');
+ @State selectArrowPosition: ArrowPosition = ArrowPosition.END;
+ selectOption: SelectOption[] = [{ value: 'aaa', icon: $r('app.media.app_icon') },
+ { value: 'bbb', icon: $r('app.media.app_icon') },
+ { value: 'ccc', icon: $r('app.media.app_icon') },
+ { value: 'ddd', icon: $r('app.media.app_icon') },
+ { value: 'eee', icon: $r('app.media.app_icon') }];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change ArrowPosition')
+ .id('SelectChangeArrowPosition')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectArrowPosition = ArrowPosition.START;
+ })
+ }.width('100%')
+
+ if (this.selectArrowPosition == ArrowPosition.START && this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption)
+ .arrowPosition(this.selectArrowPosition)
+
+ if (this.selectArrowPosition == ArrowPosition.START && this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e14a6bd423991886aab3c9bd856fb762ba63c63c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectCreateSample.ets
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectCreateSample');
+ selectOption: SelectOption[] = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ if (this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption);
+
+ if (this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectFirstExpandCollapseSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectFirstExpandCollapseSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e96430c01e42d475f04ac1c80c03285e4ba368bd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectFirstExpandCollapseSample.ets
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectFirstExpandCollapseSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectFirstExpandCollapseSample');
+ selectOption: SelectOption[] = [{ value: 'aaa', icon: $r('app.media.app_icon') },
+ { value: 'bbb', icon: $r('app.media.app_icon') },
+ { value: 'ccc', icon: $r('app.media.app_icon') },
+ { value: 'ddd', icon: $r('app.media.app_icon') },
+ { value: 'eee', icon: $r('app.media.app_icon') }];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ Select(this.selectOption)
+ .id('SelectFirstExpandCollapse')
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectFirstExpandSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectFirstExpandSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5418c063c5b5eb9150eec651473b6585db65b8df
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectFirstExpandSample.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectFirstExpandSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectFirstExpandSample');
+ // @State selectWidth: number = 100;
+ selectOption: SelectOption[] = [{ value: 'aaa', icon: $r('app.media.app_icon') },
+ { value: 'bbb', icon: $r('app.media.app_icon') },
+ { value: 'ccc', icon: $r('app.media.app_icon') },
+ { value: 'ddd', icon: $r('app.media.app_icon') },
+ { value: 'eee', icon: $r('app.media.app_icon') }];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Select(this.selectOption)
+ .id('SelectFirstExpand')
+
+ if (this.timeHelper.printTime(false)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bcfd25f3f1be87238df5b660c18cdbc19c1837fd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectHeightSample.ets
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectHeightSample');
+ @State selectHeight: number = 100;
+ selectOption: SelectOption[] = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('SelectChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectHeight = 200;
+ })
+ }.width('100%')
+
+ if (this.selectHeight == 200 && this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption)
+ .height(this.selectHeight)
+
+ if (this.selectHeight == 200 && this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..023291c149b79224344d9de9deac1b231e169fa4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectHome.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct SelectHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('SelectBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'SelectCreate',buttonUrl:'pages/base/select/SelectCreateSample'});
+ CommonButton({buttonName:'SelectWidth',buttonUrl:'pages/base/select/SelectWidthSample'});
+ CommonButton({buttonName:'SelectHeight',buttonUrl:'pages/base/select/SelectHeightSample'});
+ CommonButton({buttonName:'SelectSize',buttonUrl:'pages/base/select/SelectSizeSample'});
+ CommonButton({buttonName:'SelectPadding',buttonUrl:'pages/base/select/SelectPaddingSample'});
+ CommonButton({buttonName:'SelectMargin',buttonUrl:'pages/base/select/SelectMarginSample'});
+ CommonButton({buttonName:'SelectSpace',buttonUrl:'pages/base/select/SelectSpaceSample'});
+ CommonButton({buttonName:'SelectArrowPosition',buttonUrl:'pages/base/select/SelectArrowPositionSample'});
+ CommonButton({buttonName:'SelectFirstExpand',buttonUrl:'pages/base/select/SelectFirstExpandSample'});
+ CommonButton({buttonName:'SelectSecondExpand',buttonUrl:'pages/base/select/SelectSecondExpandSample'});
+ CommonButton({buttonName:'SelectFirstExpandCollapse',buttonUrl:'pages/base/select/SelectFirstExpandCollapseSample'});
+ CommonButton({buttonName:'SelectSecondExpandCollapse',buttonUrl:'pages/base/select/SelectSecondExpandCollapseSample'});
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..279e53249f72311b906fbc63f3e9e88bfb709bc1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectMarginSample.ets
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectMarginSample');
+ @State selectMargin: number = 0;
+ selectOption: SelectOption[] = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 0 to 10')
+ .id('SelectChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectMargin = 10;
+ })
+ }.width('100%')
+
+ if (this.selectMargin == 10 && this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption)
+ .margin(this.selectMargin)
+
+ if (this.selectMargin == 10 && this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..104005aba3587098e152398d892b76ebf9e54173
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectPaddingSample.ets
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectPaddingSample');
+ @State selectPadding: number = 0;
+ selectOption: SelectOption[] = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 0 to 10')
+ .id('SelectChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectPadding = 10;
+ })
+ }.width('100%')
+
+ if (this.selectPadding == 10 && this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption)
+ .padding(this.selectPadding)
+
+ if (this.selectPadding == 10 && this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSecondExpandCollapseSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSecondExpandCollapseSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..92843d0e4b6a0e24e7fadc5b1f51911d38dace3d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSecondExpandCollapseSample.ets
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectSecondExpandCollapseSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectSecondExpandCollapseSample');
+ selectOption: SelectOption[] = [{ value: 'aaa', icon: $r('app.media.app_icon') },
+ { value: 'bbb', icon: $r('app.media.app_icon') },
+ { value: 'ccc', icon: $r('app.media.app_icon') },
+ { value: 'ddd', icon: $r('app.media.app_icon') },
+ { value: 'eee', icon: $r('app.media.app_icon') }];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ Select(this.selectOption)
+ .id('SelectSecondExpandCollapse')
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSecondExpandSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSecondExpandSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..857c42f172e8e67970e904a41c6b7d45218d3c63
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSecondExpandSample.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectSecondExpandSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectSecondExpandSample');
+ // @State selectWidth: number = 100;
+ selectOption: SelectOption[] = [{ value: 'aaa', icon: $r('app.media.app_icon') },
+ { value: 'bbb', icon: $r('app.media.app_icon') },
+ { value: 'ccc', icon: $r('app.media.app_icon') },
+ { value: 'ddd', icon: $r('app.media.app_icon') },
+ { value: 'eee', icon: $r('app.media.app_icon') }];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ // if (this.selectWidth == 200 && this.timeHelper.printTime(true)) {
+ // }
+
+ Select(this.selectOption)
+ .id('SelectSecondExpand')
+
+ // if (this.selectWidth == 200 && this.timeHelper.printTime(false)) {
+ // }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..dfb16644cd37dab960cdd238ecb449671bf4d256
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSizeSample.ets
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectSizeSample');
+ @State sizeOptions: SizeOptions = { width: 10, height: 10 };
+ selectOption: SelectOption[] = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Size')
+ .id('SelectChangeSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.sizeOptions = { width: 20, height: 20 };
+ })
+ }.width('100%')
+
+ if (this.sizeOptions.width == 20 && this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption)
+ .size(this.sizeOptions)
+
+ if (this.sizeOptions.height == 20 && this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSpaceSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSpaceSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5a14e9e293798721e2bffa07c2230311f300e0e9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectSpaceSample.ets
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectSpaceSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectSpaceSample');
+ @State selectSpace: number = 8;
+ selectOption: SelectOption[] = [{ value: 'aaa', icon: $r('app.media.app_icon') },
+ { value: 'bbb', icon: $r('app.media.app_icon') },
+ { value: 'ccc', icon: $r('app.media.app_icon') },
+ { value: 'ddd', icon: $r('app.media.app_icon') },
+ { value: 'eee', icon: $r('app.media.app_icon') }];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Space 8 to 200')
+ .id('SelectChangeSpace')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectSpace = 200;
+ })
+ }.width('100%')
+
+ if (this.selectSpace == 200 && this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption)
+ .space(this.selectSpace)
+
+ if (this.selectSpace == 200 && this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e88a553d5c457a56ead1090fa13bf2b0f41899ea
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/select/SelectWidthSample.ets
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SelectWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SelectWidthSample');
+ @State selectWidth: number = 100;
+ selectOption: SelectOption[] = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 100 to 200')
+ .id('SelectChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectWidth = 200;
+ })
+ }.width('100%')
+
+ if (this.selectWidth == 200 && this.timeHelper.printTime(true,1)) {
+ }
+
+ Select(this.selectOption)
+ .width(this.selectWidth)
+
+ if (this.selectWidth == 200 && this.timeHelper.printTime(false,1)) {
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderBlockSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderBlockSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8ca2d54ecdf476bc88e011db72b1a073459ec08a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderBlockSizeSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderBlockSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderBlockSizeSample');
+ @State sliderBlockSize: SizeOptions = { width: 4, height: 4 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change BlockSize')
+ .id('SliderChangeBlockSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderBlockSize = { width: 10, height: 10 };
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderBlockSize.width == 10 && this.timeHelper.printTime(true)) {
+ }
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ Slider().blockSize(this.sliderBlockSize)
+ if (this.sliderBlockSize.width == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderClickSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderClickSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..edb680a3100ce20af3166e96bad16e53ccf89e57
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderClickSample.ets
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderClickSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderClickSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..afb5b1b098de937445229feb0d939c7219f03481
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderCreateSample');
+ selectOption: SelectOption[] = [];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ Slider();
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderDirectionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderDirectionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..745d80f059ef77b2be867e5c978c5bc6e35e2080
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderDirectionSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderDirectionSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderDirectionSample');
+ @State sliderDirection: Axis = Axis.Horizontal;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Direction')
+ .id('SliderChangeDirection')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderDirection = Axis.Vertical;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderDirection == Axis.Vertical && this.timeHelper.printTime(true)) {
+ }
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ Slider({ direction: this.sliderDirection })
+ if (this.sliderDirection == Axis.Vertical && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderFingerSlidingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderFingerSlidingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..14833c06b9ab7aeda04858addc599ae6e3497473
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderFingerSlidingSample.ets
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderFingerSlidingSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderFingerSlidingSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1c17cb0859fe7b9e0da6e2c89d9d7f4b1f89896f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderHeightSample');
+ @State sliderHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('SliderChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderHeight = 200;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ Slider().height(this.sliderHeight);
+ if (this.sliderHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..368be4ce7693019bae741cca2192fa90ec3f4f70
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderHome.ets
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct SliderHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('SliderBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'SliderCreate',buttonUrl:'pages/base/slider/SliderCreateSample'});
+ CommonButton({buttonName:'SliderWidth',buttonUrl:'pages/base/slider/SliderWidthSample'});
+ CommonButton({buttonName:'SliderHeight',buttonUrl:'pages/base/slider/SliderHeightSample'});
+ CommonButton({buttonName:'SliderPadding',buttonUrl:'pages/base/slider/SliderPaddingSample'});
+ CommonButton({buttonName:'SliderMargin',buttonUrl:'pages/base/slider/SliderMarginSample'});
+ CommonButton({buttonName:'SliderStep',buttonUrl:'pages/base/slider/SliderStepSample'});
+ CommonButton({buttonName:'SliderDirection',buttonUrl:'pages/base/slider/SliderDirectionSample'});
+ CommonButton({buttonName:'SliderReverse',buttonUrl:'pages/base/slider/SliderReverseSample'});
+ CommonButton({buttonName:'SliderStyle',buttonUrl:'pages/base/slider/SliderStyleSample'});
+ CommonButton({buttonName:'SliderTrackThickness',buttonUrl:'pages/base/slider/SliderTrackThicknessSample'});
+ CommonButton({buttonName:'SliderBlockSize',buttonUrl:'pages/base/slider/SliderBlockSizeSample'});
+ CommonButton({buttonName:'SliderFingerSliding',buttonUrl:'pages/base/slider/SliderFingerSlidingSample'});
+ CommonButton({buttonName:'SliderClick',buttonUrl:'pages/base/slider/SliderClickSample'});
+ CommonButton({buttonName:'SliderMouseScroll',buttonUrl:'pages/base/slider/SliderMouseScrollSample'});
+ CommonButton({buttonName:'SliderKeyboardScroll',buttonUrl:'pages/base/slider/SliderKeyboardScrollSample'});
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderKeyboardScrollSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderKeyboardScrollSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..487c6bee181a2677506db44c5ce30e4bcbee2cfc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderKeyboardScrollSample.ets
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderKeyboardScrollSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderKeyboardScrollSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..40d8cee1cc2b1cc5f693015a3a81fe7d05c1a9b5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderMarginSample');
+ @State sliderMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('SliderChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderMargin = 30;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ Slider().margin(this.sliderMargin);
+ if (this.sliderMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderMouseScrollSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderMouseScrollSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2e2ba50fad4c5a940765ad0bc8f65d39253fd74f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderMouseScrollSample.ets
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderMouseScrollSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderMouseScrollSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ Slider()
+ .onChange((value: number, mode: SliderChangeMode) => {
+ if (mode == SliderChangeMode.Begin) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (mode == SliderChangeMode.End) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..175534578124a92ba3f3a96fb3074aac543677d7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderPaddingSample');
+ @State sliderPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('SliderChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ Slider().padding(this.sliderPadding);
+ if (this.sliderPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderReverseSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderReverseSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5ce9808d20d08a178f563b0fd6ed00a53db12616
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderReverseSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderReverseSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderReverseSample');
+ @State sliderReverse: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Reverse')
+ .id('SliderChangeReverse')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderReverse = true;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderReverse == true && this.timeHelper.printTime(true)) {
+ }
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ Slider({ reverse: this.sliderReverse })
+ if (this.sliderReverse == true && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderStepSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderStepSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..230fb570e668edec2bed64352b729a6f1f694c3e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderStepSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderStepSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderStepSample');
+ @State sliderStep: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Step')
+ .id('SliderChangeStep')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderStep = 10;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderStep == 10 && this.timeHelper.printTime(true)) {
+ }
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ Slider({ step: this.sliderStep })
+ if (this.sliderStep == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderStyleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderStyleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e1f8cc0a146aa9b4fde46b22f4d8cfc3d2b69143
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderStyleSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderStyleSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderStyleSample');
+ @State sliderStyle: SliderStyle = SliderStyle.OutSet;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Style')
+ .id('SliderChangeStyle')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderStyle = SliderStyle.InSet;
+ })
+ }.width('100%')
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderStyle == SliderStyle.InSet && this.timeHelper.printTime(true)) {
+ }
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ Slider({ style: this.sliderStyle })
+ if (this.sliderStyle == SliderStyle.InSet && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderTrackThicknessSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderTrackThicknessSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bca6e313558d5b3da29ae20244d34993235713ad
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderTrackThicknessSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderTrackThicknessSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderTrackThicknessSample');
+ @State sliderTrackThickness: number = 4;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change TrackThickness')
+ .id('SliderChangeTrackThickness')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderTrackThickness = 10;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderTrackThickness == 10 && this.timeHelper.printTime(true)) {
+ }
+
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ Slider().trackThickness(this.sliderTrackThickness)
+ if (this.sliderTrackThickness == 10 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..af322b445a8aece6184aa597a197bdc8910f56fd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/slider/SliderWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SliderWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SliderWidthSample');
+ @State sliderWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 100 to 200')
+ .id('SliderChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.sliderWidth = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sliderWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ Slider().width(this.sliderWidth);
+ if (this.sliderWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+
+ }
+ .width('100%')
+ .padding({ right: '30%' })
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanCreateInRichEditorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanCreateInRichEditorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c930e0c7720a3400d76cf38d419fd8539aceb92e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanCreateInRichEditorSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanCreateInRichEditorSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanCreateInRichEditorSample');
+ controller: RichEditorController = new RichEditorController();
+ options: RichEditorOptions = { controller: this.controller };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ RichEditor(this.options) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanCreateInTextSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanCreateInTextSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b90f9ccd50e5e779300ca75fd91aa2b241c7ddad
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanCreateInTextSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text() {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ Span('this is span' + index)
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanFontInRichEditorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanFontInRichEditorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b79129c418f1286d9ad691ae4509ebbb2f53240c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanFontInRichEditorSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanFontInRichEditorSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanFontInRichEditorSample');
+ @State textFont: Font = {size:16,weight:FontWeight.Normal,style:FontStyle.Normal};
+ controller: RichEditorController = new RichEditorController();
+ options: RichEditorOptions = { controller: this.controller };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change LetterSpacing')
+ .id('SpanChangeFontInRichEditor')
+ .margin('5vp')
+ .onClick(() => {
+ this.textFont = {size:30,weight:FontWeight.Bolder,style:FontStyle.Italic};
+ })
+ }.width('100%')
+
+ RichEditor(this.options) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textFont.size == 30 && this.timeHelper.printTime(true)) {
+ }
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ if (this.textFont.size == 30 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanFontInTextSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanFontInTextSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4fcb7e0dd6fca6cc53e6e3825062cf6d3bc432ca
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanFontInTextSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanFontInTextSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanFontInTextSample');
+ @State textFont: Font = {size:16,weight:FontWeight.Normal,style:FontStyle.Normal};
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Font')
+ .id('SpanChangeFontInText')
+ .margin('5vp')
+ .onClick(() => {
+ this.textFont = {size:30,weight:FontWeight.Bolder,style:FontStyle.Italic};
+ })
+ }.width('100%')
+
+ Text() {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textFont.size == 30 && this.timeHelper.printTime(true)) {
+ }
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ Span('this is span ' + index).font(this.textFont)
+ if (this.textFont.size == 30 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..19677bd1a71419b69506643a5955849624473c38
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanHome.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct SpanHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('SpanBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'SpanCreateInText', buttonUrl: 'pages/base/span/SpanCreateInTextSample' });
+ CommonButton({ buttonName: 'SpanCreateInRichEditor', buttonUrl: 'pages/base/span/SpanCreateInRichEditorSample' });
+ CommonButton({ buttonName: 'SpanValueInText', buttonUrl: 'pages/base/span/SpanValueInTextSample' });
+ CommonButton({ buttonName: 'SpanValueInRichEditor', buttonUrl: 'pages/base/span/SpanValueInRichEditorSample' });
+ CommonButton({ buttonName: 'SpanLetterSpacingInText', buttonUrl: 'pages/base/span/SpanLetterSpacingInTextSample' });
+ CommonButton({ buttonName: 'SpanLetterSpacingInRichEditor', buttonUrl: 'pages/base/span/SpanLetterSpacingInRichEditorSample' });
+ CommonButton({ buttonName: 'SpanTextCaseInText', buttonUrl: 'pages/base/span/SpanTextCaseInTextSample' });
+ CommonButton({ buttonName: 'SpanTextCaseInRichEditor', buttonUrl: 'pages/base/span/SpanTextCaseInRichEditorSample' });
+ CommonButton({ buttonName: 'SpanFontInText', buttonUrl: 'pages/base/span/SpanFontInTextSample' });
+ CommonButton({ buttonName: 'SpanFontInRichEditor', buttonUrl: 'pages/base/span/SpanFontInRichEditorSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanLetterSpacingInRichEditorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanLetterSpacingInRichEditorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..52a3ab8d89df4217b23ffc0d19205063b8d473c7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanLetterSpacingInRichEditorSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanLetterSpacingInRichEditorSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanLetterSpacingInRichEditorSample');
+ @State letterSpacing: number = 0;
+ controller: RichEditorController = new RichEditorController();
+ options: RichEditorOptions = { controller: this.controller };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change LetterSpacing')
+ .id('SpanChangeLetterSpacingInRichEditor')
+ .margin('5vp')
+ .onClick(() => {
+ this.letterSpacing = 20;
+ })
+ }.width('100%')
+
+ RichEditor(this.options) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.letterSpacing == 20 && this.timeHelper.printTime(true)) {
+ }
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ Span('this is span '+ index).letterSpacing(this.letterSpacing)
+ if (this.letterSpacing == 20 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanLetterSpacingInTextSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanLetterSpacingInTextSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bc0c373ba16275f6e7d9f917ba37151be60f763f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanLetterSpacingInTextSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanLetterSpacingInTextSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanLetterSpacingInTextSample');
+ @State letterSpacing: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change LetterSpacing')
+ .id('SpanChangeLetterSpacingInText')
+ .margin('5vp')
+ .onClick(() => {
+ this.letterSpacing = 20;
+ })
+ }.width('100%')
+
+ Text() {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.letterSpacing == 20 && this.timeHelper.printTime(true)) {
+ }
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ Span('this is span ' + index).letterSpacing(this.letterSpacing)
+ if (this.letterSpacing == 20 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanTextCaseInRichEditorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanTextCaseInRichEditorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9b1a73c03a7afb59eec3a8ae72cbdd8cf82db4a4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanTextCaseInRichEditorSample.ets
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanTextCaseInRichEditorSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanTextCaseInRichEditorSample');
+ @State testCase: TextCase = TextCase.LowerCase;
+ controller: RichEditorController = new RichEditorController();
+ options: RichEditorOptions = { controller: this.controller };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextCase.Normal')
+ .id('TextCase.Normal.RichEditor')
+ .margin('5vp')
+ .onClick(() => {
+ this.testCase = TextCase.Normal;
+ })
+ Button('TextCase.LowerCase')
+ .id('TextCase.LowerCase.RichEditor')
+ .margin('5vp')
+ .onClick(() => {
+ this.testCase = TextCase.LowerCase;
+ })
+ Button('TextCase.UpperCase')
+ .id('TextCase.UpperCase.RichEditor')
+ .margin('5vp')
+ .onClick(() => {
+ this.testCase = TextCase.UpperCase;
+ })
+
+ RichEditor(this.options) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.testCase != null && this.timeHelper.printTime(true)) {
+ }
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ if (this.testCase != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanTextCaseInTextSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanTextCaseInTextSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c5021d9d06411d76cd02897feb18dbb8c108d004
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanTextCaseInTextSample.ets
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanTextCaseInTextSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanTextCaseInTextSample');
+ @State testCase: TextCase = TextCase.LowerCase;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextCase.Normal')
+ .id('TextCase.Normal.Text')
+ .margin('5vp')
+ .onClick(() => {
+ this.testCase = TextCase.Normal;
+ })
+ Button('TextCase.LowerCase')
+ .id('TextCase.LowerCase.Text')
+ .margin('5vp')
+ .onClick(() => {
+ this.testCase = TextCase.LowerCase;
+ })
+ Button('TextCase.UpperCase')
+ .id('TextCase.UpperCase.Text')
+ .margin('5vp')
+ .onClick(() => {
+ this.testCase = TextCase.UpperCase;
+ })
+
+ Text() {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.testCase !=null && this.timeHelper.printTime(true)) {
+ }
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ Span('this is span '+ index).textCase(this.testCase)
+ if (this.testCase !=null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanValueInRichEditorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanValueInRichEditorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1451c32fca679cec9a0b65e932480ed59ffef7af
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanValueInRichEditorSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanValueInRichEditorSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanValueInRichEditorSample');
+ @State textStr: string = ArrEntity.textTenLength;
+ controller: RichEditorController = new RichEditorController();
+ options: RichEditorOptions = { controller: this.controller };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change value')
+ .id('SpanChangeValueInRichEditor')
+ .margin('5vp')
+ .onClick(() => {
+ this.textStr = ArrEntity.textOneHundredHuLength;
+ })
+ }.width('100%')
+
+ RichEditor(this.options) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textStr.length > 10 && this.timeHelper.printTime(true)) {
+ }
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+
+ if (this.textStr.length > 10 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanValueInTextSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanValueInTextSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0912121dbcf0bfc1c57b45dbdfd67a1eb32b9134
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/span/SpanValueInTextSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SpanValueInTextSample {
+ timeHelper: TimeHelper = new TimeHelper('SpanValueInTextSample');
+ @State textStr: string = ArrEntity.textTenLength;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change value')
+ .id('SpanChangeValueInText')
+ .margin('5vp')
+ .onClick(() => {
+ this.textStr = ArrEntity.textTwentyLength;
+ })
+ }.width('100%')
+
+ Text() {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textStr.length > 10 && this.timeHelper.printTime(true)) {
+ }
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ Span(this.textStr)
+ if (this.textStr.length > 10 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextAlign100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextAlign100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e7cdc999b330df921572f444cac3bd2822ab3a05
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextAlign100CharSample.ets
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAlign100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAlign100CharSample');
+ @State textStr: string = '';
+ @State textAlign: TextAlign = TextAlign.End;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextAlign.Start')
+ .id('TextAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Start;
+ })
+ Button('TextAlign.Center')
+ .id('TextAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Center;
+ })
+ Button('TextAlign.End')
+ .id('TextAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.End;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAlign != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ if (this.textAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextAlign10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextAlign10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c816e7279ecb45080d1a11d1b1341662662a3151
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextAlign10CharSample.ets
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAlign10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAlign10CharSample');
+ @State textStr: string = '';
+ @State textAlign: TextAlign = TextAlign.End;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextAlign.Start')
+ .id('TextAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Start;
+ })
+ Button('TextAlign.Center')
+ .id('TextAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Center;
+ })
+ Button('TextAlign.End')
+ .id('TextAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.End;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAlign != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ Text(this.textStr).width('100%').textAlign(this.textAlign)
+ if (this.textAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextBaselineOffset100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextBaselineOffset100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9dc29ebaa20f66b27b2e58e2c9f7e325e44376e7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextBaselineOffset100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextBaselineOffset100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextBaselineOffset100CharSample');
+ @State textBaselineOffset: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change baselineOffset')
+ .id('TextChangeTextBaselineOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.textBaselineOffset = -20;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textBaselineOffset != 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ if (this.textBaselineOffset != 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextBaselineOffset10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextBaselineOffset10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..940927843548ba308058d72016574825129b05a1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextBaselineOffset10CharSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextBaselineOffset10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextBaselineOffset10CharSample');
+ @State textBaselineOffset: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change baselineOffset')
+ .id('TextChangeTextBaselineOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.textBaselineOffset = -20;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textBaselineOffset != 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ Text(this.textStr).baselineOffset(this.textBaselineOffset)
+ if (this.textBaselineOffset != 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextContent100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextContent100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f9922991b739bf38c720eeab48c0bc0f56bf0c81
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextContent100CharSample.ets
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextContent100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextContent100CharSample');
+ @State textContent: string = ArrEntity.textTenLength;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change contentLength')
+ .id('TextChangeContent')
+ .margin('5vp')
+ .onClick(() => {
+ this.textContent = ArrEntity.textOneHundredHuLength;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textContent.length > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ if (this.textContent.length > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextContent10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextContent10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f41ea47e071e19e471e34405c88d16eba3396ec9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextContent10CharSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextContent10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextContent10CharSample');
+ @State textContent: string = ArrEntity.textTenLength;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change contentLength')
+ .id('TextChangeContent')
+ .margin('5vp')
+ .onClick(() => {
+ this.textContent = ArrEntity.textTwentyLength;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textContent.length > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ Text(this.textContent)
+ if (this.textContent.length > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextCreate100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextCreate100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..15ae134bbc53177fb1da3a86c6b5f54110e7bfd0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextCreate100CharSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextCreate100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextCreate100CharSample');
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextCreate10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextCreate10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cee48eb88ae0db0ae453374a7f63e5ef2a68d5cd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextCreate10CharSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextCreate10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextCreate10CharSample');
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+ Text(this.textStr)
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextFont100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextFont100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..72ab79a6b24d80f318a5c11e7655dee5e724c3dd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextFont100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextFont100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextFont100CharSample');
+ @State textFont: Font = { size: 16, weight: FontWeight.Normal, style: FontStyle.Normal };
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Font')
+ .id('TextChangeFont')
+ .margin('5vp')
+ .onClick(() => {
+ this.textFont = { size: 30, weight: FontWeight.Bolder, style: FontStyle.Italic };
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textFont != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ if (this.textFont != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextFont10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextFont10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d5f84b53b3b494152ef6dc07bd75879fc4b035cc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextFont10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextFont10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextFont10CharSample');
+ @State textFont: Font = { size: 16, weight: FontWeight.Normal, style: FontStyle.Normal };
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Font')
+ .id('TextChangeFont')
+ .margin('5vp')
+ .onClick(() => {
+ this.textFont = { size: 30, weight: FontWeight.Bolder, style: FontStyle.Italic };
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textFont != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ Text(this.textStr).font(this.textFont)
+ if (this.textFont != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeight100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeight100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3012a63bc28551b1f67fead051ea75d546299f8e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeight100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeight100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeight100CharSample');
+ @State textHeight: number = 100;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('TextChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.textHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ if (this.textHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeight10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeight10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..64b91000797d900601132e3ea2d1bc03334288ea
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeight10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeight10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeight10CharSample');
+ @State textHeight: number = 100;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('TextChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.textHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ Text(this.textStr).height(this.textHeight)
+ if (this.textHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharOneSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharOneSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..65ef3beb22a35446d0272500119ad5d68fe673b9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharOneSample.ets
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeightAdaptivePolicy100CharOneSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeightAdaptivePolicy100CharOneSample');
+ @State textStr: string = '';
+ @State maxLine: number = 2;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change maxLines')
+ .id('TextChangeheightAdaptivePolicyOne')
+ .margin('5vp')
+ .onClick(() => {
+ this.maxLine = 1;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.maxLine != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ if (this.maxLine != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharThreeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharThreeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..803a4d38a7ef07944e17bf0f52ad8873a111868b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharThreeSample.ets
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeightAdaptivePolicy100CharThreeSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeightAdaptivePolicy100CharThreeSample');
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change content to 1')
+ .id('TextChangeheightAdaptivePolicyThree')
+ .margin('5vp')
+ .onClick(() => {
+ this.textStr = ArrEntity.textTenLength;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textStr != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ if (this.textStr != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharTwoSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharTwoSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6093413cdc0c98c2106c414cb5d89c008726f5df
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy100CharTwoSample.ets
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeightAdaptivePolicy100CharTwoSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeightAdaptivePolicy100CharTwoSample');
+ @State textStr: string = '';
+ @State minfontSize: number = 20;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change minfontSize')
+ .id('TextChangeheightAdaptivePolicyTwo')
+ .margin('5vp')
+ .onClick(() => {
+ this.minfontSize = 10;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.minfontSize != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ if (this.minfontSize != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharOneSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharOneSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..83fcbb52a3fff8b127cdedd6afb02884f6e1bc40
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharOneSample.ets
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeightAdaptivePolicy10CharOneSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeightAdaptivePolicy10CharOneSample');
+ @State textStr: string = '';
+ @State maxLine: number = 2;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change maxLines')
+ .id('TextChangeheightAdaptivePolicyOne')
+ .margin('5vp')
+ .onClick(() => {
+ this.maxLine = 1;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.maxLine != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(this.maxLine)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST)
+ .minFontSize(10)
+ .maxFontSize(30)
+ if (this.maxLine != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharThreeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharThreeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d793d9620a82e2580587bed390ddf04d12aa57e2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharThreeSample.ets
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeightAdaptivePolicy10CharThreeSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeightAdaptivePolicy10CharThreeSample');
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change content to 1')
+ .id('TextChangeheightAdaptivePolicyThree')
+ .margin('5vp')
+ .onClick(() => {
+ this.textStr = ArrEntity.textTenLength;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textStr != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .maxLines(1)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST)
+ .minFontSize(20)
+ .maxFontSize(30)
+ if (this.textStr != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharTwoSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharTwoSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e698dd7deead6e9052335b4dc550ec261bdb7191
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHeightAdaptivePolicy10CharTwoSample.ets
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextHeightAdaptivePolicy10CharTwoSample {
+ timeHelper: TimeHelper = new TimeHelper('TextHeightAdaptivePolicy10CharTwoSample');
+ @State textStr: string = '';
+ @State minfontSize: number = 20;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change minfontSize')
+ .id('TextChangeheightAdaptivePolicyTwo')
+ .margin('5vp')
+ .onClick(() => {
+ this.minfontSize = 10;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.minfontSize != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ Text(this.textStr)
+ .minFontSize(this.minfontSize)
+ .heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST)
+ .maxFontSize(30)
+ if (this.minfontSize != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..87338c0edbe4cc2072a56bfe5e17d3b8201dd6c9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextHome.ets
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct TextHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('TextBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'TextCreate10Char',buttonUrl:'pages/base/text/TextCreate10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextCreate100Char',buttonUrl:'pages/base/text/TextCreate100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextAlign10char',buttonUrl:'pages/base/text/TextAlign10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextAlign100Char',buttonUrl:'pages/base/text/TextAlign100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextWidth10Char',buttonUrl:'pages/base/text/TextWidth10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextWidth100Char',buttonUrl:'pages/base/text/TextWidth100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextHeight10Char',buttonUrl:'pages/base/text/TextHeight10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextHeight100Char',buttonUrl:'pages/base/text/TextHeight100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextPadding10Char',buttonUrl:'pages/base/text/TextPadding10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextPadding100Char',buttonUrl:'pages/base/text/TextPadding100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextMargin10Char',buttonUrl:'pages/base/text/TextMargin10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextMargin100Char',buttonUrl:'pages/base/text/TextMargin100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextFont10Char',buttonUrl:'pages/base/text/TextFont10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextFont100Char',buttonUrl:'pages/base/text/TextFont100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextContent10Char',buttonUrl:'pages/base/text/TextContent10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextContent100Char',buttonUrl:'pages/base/text/TextContent100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextTextIndent10Char',buttonUrl:'pages/base/text/TextTextIndent10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextTextIndent100Char',buttonUrl:'pages/base/text/TextTextIndent100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextTextCase10Char',buttonUrl:'pages/base/text/TextTextCase10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextTextCase100Char',buttonUrl:'pages/base/text/TextTextCase100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextLetterSpacing10Char',buttonUrl:'pages/base/text/TextLetterSpacing10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextLetterSpacing100Char',buttonUrl:'pages/base/text/TextLetterSpacing100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextBaselineOffset10Char',buttonUrl:'pages/base/text/TextBaselineOffset10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextBaselineOffset100Char',buttonUrl:'pages/base/text/TextBaselineOffset100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextLineHeight10Char',buttonUrl:'pages/base/text/TextLineHeight10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextLineHeight100Char',buttonUrl:'pages/base/text/TextLineHeight100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextMaxLines10Char',buttonUrl:'pages/base/text/TextMaxLines10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextMaxLines100Char',buttonUrl:'pages/base/text/TextMaxLines100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextOverflow10Char',buttonUrl:'pages/base/text/TextOverflow10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextOverflow100Char',buttonUrl:'pages/base/text/TextOverflow100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'heightAdaptivePolicyOne10Char',buttonUrl:'pages/base/text/TextHeightAdaptivePolicy10CharOneSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'heightAdaptivePolicyOne100Char',buttonUrl:'pages/base/text/TextHeightAdaptivePolicy100CharOneSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'heightAdaptivePolicyTwo10Char',buttonUrl:'pages/base/text/TextHeightAdaptivePolicy10CharTwoSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'heightAdaptivePolicyTwo100Char',buttonUrl:'pages/base/text/TextHeightAdaptivePolicy100CharTwoSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'heightAdaptivePolicyThree10Char',buttonUrl:'pages/base/text/TextHeightAdaptivePolicy10CharThreeSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'heightAdaptivePolicyThree100Char',buttonUrl:'pages/base/text/TextHeightAdaptivePolicy100CharThreeSample',data:ArrEntity.textOneHundredHuLength});
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLetterSpacing100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLetterSpacing100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7de505d57b12305e393134c2a233d2b8608c8949
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLetterSpacing100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextLetterSpacing100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextLetterSpacing100CharSample');
+ @State textLetterSpacing: number = 5;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change textLetterSpacing')
+ .id('TextChangeTextLetterSpacing')
+ .margin('5vp')
+ .onClick(() => {
+ this.textLetterSpacing = 10;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textLetterSpacing > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ if (this.textLetterSpacing > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLetterSpacing10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLetterSpacing10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6d9b61ce8b1d001c48cc3389eb9d5ff118c89b88
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLetterSpacing10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextLetterSpacing10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextLetterSpacing10CharSample');
+ @State textLetterSpacing: number = 5;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change textLetterSpacing')
+ .id('TextChangeTextLetterSpacing')
+ .margin('5vp')
+ .onClick(() => {
+ this.textLetterSpacing = 10;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textLetterSpacing > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ Text(this.textStr).letterSpacing(this.textLetterSpacing)
+ if (this.textLetterSpacing > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLineHeight100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLineHeight100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..233c826ae61d0cc83a09d6401eb2346de85714cc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLineHeight100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextLineHeight100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextLineHeight100CharSample');
+ @State textLineHeight: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change LineHeight 20 to 50')
+ .id('TextChangeTextBaselineOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.textLineHeight = 50;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textLineHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ if (this.textLineHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLineHeight10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLineHeight10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..548948720ee14f86fc6af7ee466e8cb9ef66f224
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextLineHeight10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextLineHeight10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextLineHeight10CharSample');
+ @State textLineHeight: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change LineHeight 20 to 50')
+ .id('TextChangeTextBaselineOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.textLineHeight = 50;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textLineHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ Text(this.textStr).height(this.textLineHeight)
+ if (this.textLineHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMargin100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMargin100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e87aedd7c83ea4bb671b59b18908f2db0a782322
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMargin100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextMargin100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextMargin100CharSample');
+ @State textMargin: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('TextChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.textMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ if (this.textMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMargin10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMargin10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..507a1539e55bf669beb93a1842a7be2fa5996c6e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMargin10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextMargin10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextMargin10CharSample');
+ @State textMargin: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('TextChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.textMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ Text(this.textStr).margin(this.textMargin)
+ if (this.textMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMaxLines100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMaxLines100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3ef153ad8de8910194e2572435a526da64f575ac
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMaxLines100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextMaxLines100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextMaxLines100CharSample');
+ @State textMaxLines: number = 1;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change MaxLines 1 to 2')
+ .id('TextChangeMaxLines')
+ .margin('5vp')
+ .onClick(() => {
+ this.textMaxLines = 2;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textMaxLines > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ if (this.textMaxLines > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMaxLines10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMaxLines10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..188b4f117ff79b74fcaf31ca671b64e5d019e358
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextMaxLines10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextMaxLines10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextMaxLines10CharSample');
+ @State textMaxLines: number = 1;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change MaxLines 1 to 2')
+ .id('TextChangeMaxLines')
+ .margin('5vp')
+ .onClick(() => {
+ this.textMaxLines = 2;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textMaxLines > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ Text(this.textStr).maxLines(this.textMaxLines)
+ if (this.textMaxLines > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextOverflow100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextOverflow100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6e60765981a10a0f40e884b2291350d1f6ef0c74
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextOverflow100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextOverflow100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextOverflow100CharSample');
+ @State textTextOverflow: TextOverflow = TextOverflow.Clip;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change TextOverflow')
+ .id('TextChangeOverflow')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTextOverflow = TextOverflow.Ellipsis;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTextOverflow != 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ if (this.textTextOverflow != 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextOverflow10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextOverflow10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9dad0830bebf28c344afb2c7886b11ac34cf7d42
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextOverflow10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextOverflow10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextOverflow10CharSample');
+ @State textTextOverflow: TextOverflow = TextOverflow.Clip;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change TextOverflow')
+ .id('TextChangeOverflow')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTextOverflow = TextOverflow.Ellipsis;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTextOverflow != 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ Text(this.textStr).textOverflow({ overflow: this.textTextOverflow })
+ if (this.textTextOverflow != 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextPadding100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextPadding100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..66a3795dad9851cbfc39950c1498b68dfb30b799
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextPadding100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPadding100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPadding100CharSample');
+ @State textPadding: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('TextChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ if (this.textPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextPadding10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextPadding10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..15f490e14e4cefbec53f1ed074a07d2193808ef0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextPadding10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPadding10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPadding10CharSample');
+ @State textPadding: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('TextChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ Text(this.textStr).padding(this.textPadding)
+ if (this.textPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextCase100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextCase100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c1ca97d00a3f9e5dca4badcc7c37e54349faf824
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextCase100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTextCase100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTextCase100CharSample');
+ @State textCase: TextCase = TextCase.LowerCase;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change TextCase')
+ .id('TextChangeTextCase')
+ .margin('5vp')
+ .onClick(() => {
+ this.textCase = TextCase.UpperCase;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textCase != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ if (this.textCase != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextCase10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextCase10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b3c922e9dba01a0a09ad84d6f9a29f016437df5f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextCase10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTextCase10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTextCase10CharSample');
+ @State textCase: TextCase = TextCase.LowerCase;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change TextCase')
+ .id('TextChangeTextCase')
+ .margin('5vp')
+ .onClick(() => {
+ this.textCase = TextCase.UpperCase;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textCase != null && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ Text(this.textStr).textCase(this.textCase)
+ if (this.textCase != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextIndent100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextIndent100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fad1609f14a778b670104d6f0850679420e69968
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextIndent100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTextIndent100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTextIndent100CharSample');
+ @State textIndentNum: number = 2;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change textIndent')
+ .id('TextChangeTextIndent')
+ .margin('5vp')
+ .onClick(() => {
+ this.textIndentNum = 5;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textIndentNum > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ if (this.textIndentNum > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextIndent10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextIndent10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..42e6f984737a665aa169309a4732df0b685b998a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextTextIndent10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTextIndent10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTextIndent10CharSample');
+ @State textIndentNum: number = 2;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change textIndent')
+ .id('TextChangeTextIndent')
+ .margin('5vp')
+ .onClick(() => {
+ this.textIndentNum = 5;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textIndentNum > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ Text(this.textStr).textIndent(this.textIndentNum)
+ if (this.textIndentNum > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextWidth100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextWidth100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f09d5328f70d7b7804a558b88a2305679f654223
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextWidth100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextWidth100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextWidth100CharSample');
+ @State textWidth: number = 100;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 100 to 200')
+ .id('TextChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.textWidth = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ if (this.textWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextWidth10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextWidth10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1d85432ff1102e6047459f7c6e820e50dd35c8ce
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/text/TextWidth10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextWidth10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextWidth10CharSample');
+ @State textWidth: number = 100;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 100 to 200')
+ .id('TextChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.textWidth = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ Text(this.textStr).width(this.textWidth)
+ if (this.textWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5e6f66811a97b6b19499b2c1a27c0ed2422141f3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ TextArea()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaFontSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaFontSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ee061122835056e17c94a9ec96fc2a785bdc6a80
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaFontSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件font属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaFontSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaFontSample');
+ @State textAreaFont: Font = { size: 16, weight: FontWeight.Normal, style: FontStyle.Normal };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change font')
+ .id('change font')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAreaFont = { size: 30, weight: FontWeight.Bolder, style: FontStyle.Italic };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAreaFont != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ TextArea({ text: ArrEntity.textTenLength })
+ if (this.textAreaFont != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c1b68912344ea7139d4d80d91e19543dda0f0e07
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaHeightSample');
+ @State textAreaHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAreaHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAreaHeight != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ TextArea({ text: ArrEntity.textTenLength }).height(this.textAreaHeight)
+ if (this.textAreaHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..58dbd9c8c6ded216eeb92b95090103912cce79c3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaHome.ets
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct TextAreaHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('TextAreaBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'TextAreaCreateSample', buttonUrl: 'pages/base/textArea/TextAreaCreateSample' });
+ CommonButton({ buttonName: 'TextAreaTextAlignSample', buttonUrl: 'pages/base/textArea/TextAreaTextAlignSample' });
+ CommonButton({ buttonName: 'TextAreaWidthSample', buttonUrl: 'pages/base/textArea/TextAreaWidthSample' });
+ CommonButton({ buttonName: 'TextAreaHeightSample', buttonUrl: 'pages/base/textArea/TextAreaHeightSample' });
+ CommonButton({ buttonName: 'TextAreaPaddingSample', buttonUrl: 'pages/base/textArea/TextAreaPaddingSample' });
+ CommonButton({ buttonName: 'TextAreaMarginSample', buttonUrl: 'pages/base/textArea/TextAreaMarginSample' });
+ CommonButton({ buttonName: 'TextAreaFontSample', buttonUrl: 'pages/base/textArea/TextAreaFontSample' });
+ CommonButton({ buttonName: 'TextAreaTextSample', buttonUrl: 'pages/base/textArea/TextAreaTextSample' });
+ CommonButton({ buttonName: 'TextAreaMaxLinesSample', buttonUrl: 'pages/base/textArea/TextAreaMaxLinesSample' });
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5c310b7f97dbd5508fb22da28c70015e6fe139b2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaMarginSample');
+ @State textAreaMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAreaMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAreaMargin != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ TextArea({ text: ArrEntity.textTenLength }).margin(this.textAreaMargin)
+ if (this.textAreaMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaMaxLinesSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaMaxLinesSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..98973475897b7e40a81df3518884da3a9eb30091
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaMaxLinesSample.ets
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件maxLines属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaMaxLinesSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaMaxLinesSample');
+ @State maxLines: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change maxLines 1 to 3')
+ .id('change maxLines 1 to 3')
+ .margin('5vp')
+ .onClick(() => {
+ this.maxLines = 3;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.maxLines != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ TextArea({ text: ArrEntity.textTenLength + ArrEntity.textTenLength })
+ .maxLines(this.maxLines)
+ if (this.maxLines != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..05d19567ccbf7bd3305bd2e2792e3feca7b0c1ed
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaPaddingSample');
+ @State textAreaPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAreaPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAreaPadding != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ TextArea({ text: ArrEntity.textTenLength }).padding(this.textAreaPadding)
+ if (this.textAreaPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaTextAlignSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaTextAlignSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b989c7755ba6b7624d44782b7c6dcdbba7cfd5d7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaTextAlignSample.ets
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件maxLines属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaTextAlignSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaTextAlignSample');
+ @State textAlign: TextAlign = TextAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change textAlign to Start')
+ .id('change textAlign to Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Start;
+ })
+ Button('change textAlign to Center')
+ .id('change textAlign to Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Center;
+ })
+ Button('change textAlign to End')
+ .id('change textAlign to End')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.End;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAlign != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ TextArea({ text: ArrEntity.textTenLength }).textAlign(this.textAlign)
+ if (this.textAlign != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaTextSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaTextSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d0d04d5383b998669f051862ab60c2b6fbfa3253
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaTextSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件预置文本内容更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaTextSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaTextSample');
+ @State textAreaText: string = ArrEntity.textTenLength;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change textAreaTextLength 10 to 100')
+ .id('change textAreaTextLength 10 to 100')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAreaText = ArrEntity.textTwentyLength;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAreaText != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ TextArea({ text: this.textAreaText })
+ if (this.textAreaText != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d9b4818a954bb6afaf6bf5486b49a3014559da40
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textArea/TextAreaWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextArea组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextAreaWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAreaWidthSample');
+ @State textAreaWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAreaWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAreaWidth != null && this.timeHelper.printTime(true)) {
+ }
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ TextArea({ text: ArrEntity.textTenLength }).width(this.textAreaWidth)
+ if (this.textAreaWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..14f1fbf56dc54e7cb06de86a244085724edda790
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockCreateSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextClock组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextClockCreateSample {
+ controller: TextClockController = new TextClockController();
+ timeHelper: TimeHelper = new TimeHelper('TextClockCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).onAppear(() => { this.controller.stop() })
+
+ if (this.timeHelper.printTime(false)) {
+ }
+
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockFormatSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockFormatSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fe23896f8c67598bef0424c85bb0538ed8949529
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockFormatSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextClock组件format属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextClockFormatSample {
+ controller: TextClockController = new TextClockController();
+ timeHelper: TimeHelper = new TimeHelper('TextClockFormatSample');
+ @State textClockFormat: string = 'aa hh:mm:ss';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change format')
+ .id('change format')
+ .margin('5vp')
+ .onClick(() => {
+ this.textClockFormat = 'yyyy/MM/dd aa hh:mm:ss.SS';
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textClockFormat != null && this.timeHelper.printTime(true)) {
+ }
+
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).format(this.textClockFormat).onAppear(() => { this.controller.stop() })
+
+
+ if (this.textClockFormat != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0b30c2015d57bf7d6d147b36128cd11829d800ed
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockHeightSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextClock组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextClockHeightSample {
+ controller: TextClockController = new TextClockController();
+ timeHelper: TimeHelper = new TimeHelper('TextClockHeightSample');
+ @State textClockHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.textClockHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textClockHeight != null && this.timeHelper.printTime(true)) {
+ }
+
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).height(this.textClockHeight).onAppear(() => { this.controller.stop() })
+
+ if (this.textClockHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cf8320a25d250c76348d9d783e491969e73fa918
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockHome.ets
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct TextClockHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('TextClockHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'TextClockCreateSample', buttonUrl: 'pages/base/textClock/TextClockCreateSample' });
+ CommonButton({ buttonName: 'TextClockWidthSample', buttonUrl: 'pages/base/textClock/TextClockWidthSample' });
+ CommonButton({ buttonName: 'TextClockHeightSample', buttonUrl: 'pages/base/textClock/TextClockHeightSample' });
+ CommonButton({ buttonName: 'TextClockPaddingSample', buttonUrl: 'pages/base/textClock/TextClockPaddingSample' });
+ CommonButton({ buttonName: 'TextClockMarginSample', buttonUrl: 'pages/base/textClock/TextClockMarginSample' });
+ CommonButton({ buttonName: 'TextClockFormatSample', buttonUrl: 'pages/base/textClock/TextClockFormatSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..40a88ba0365369d50d4333b70419bf9ce1526716
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockMarginSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextClock组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextClockMarginSample {
+ controller: TextClockController = new TextClockController();
+ timeHelper: TimeHelper = new TimeHelper('TextClockMarginSample');
+ @State textClockMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.textClockMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textClockMargin != null && this.timeHelper.printTime(true)) {
+ }
+
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).margin(this.textClockMargin).onAppear(() => { this.controller.stop() })
+
+ if (this.textClockMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..06f2476c1f9f1a019b65e1c482aaf147ac563f28
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockPaddingSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextClock组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextClockPaddingSample {
+ controller: TextClockController = new TextClockController();
+ timeHelper: TimeHelper = new TimeHelper('TextClockPaddingSample');
+ @State textClockPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.textClockPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textClockPadding != null && this.timeHelper.printTime(true)) {
+ }
+
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).padding(this.textClockPadding).onAppear(() => { this.controller.stop() })
+
+ if (this.textClockPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..16cd5019bad38fa4d0168fde4f94a24a916f0ee0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textClock/TextClockWidthSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextClock组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextClockWidthSample {
+ controller: TextClockController = new TextClockController();
+ timeHelper: TimeHelper = new TimeHelper('TextClockWidthSample');
+ @State textClockWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.textClockWidth = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textClockWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+ TextClock({ controller: this.controller }).width(this.textClockWidth).onAppear(() => { this.controller.stop() })
+
+ if (this.textClockWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputAlign100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputAlign100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..118a43e9423e9c934c1ff9cd421efe152ad94229
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputAlign100CharSample.ets
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputAlign100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputAlign100CharSample');
+ @State textStr: string = '';
+ @State textAlign: TextAlign = TextAlign.End;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextInputAlign.Start')
+ .id('TextInputAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Start;
+ })
+ Button('TextInputAlign.Center')
+ .id('TextInputAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Center;
+ })
+ Button('TextInputAlign.End')
+ .id('TextInputAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.End;
+ })
+
+
+ // ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAlign != null && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ if (this.textAlign != null && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputAlign10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputAlign10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..60de63c1bef649747bf4817d5a93a71cc252b67c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputAlign10CharSample.ets
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputAlign10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputAlign10CharSample');
+ @State textStr: string = '';
+ @State textAlign: TextAlign = TextAlign.End;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextInputAlign.Start')
+ .id('TextInputAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Start;
+ })
+ Button('TextInputAlign.Center')
+ .id('TextInputAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.Center;
+ })
+ Button('TextInputAlign.End')
+ .id('TextInputAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAlign = TextAlign.End;
+ })
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAlign != null && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ TextInput({text:this.textStr}).textAlign(this.textAlign)
+ if (this.textAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputCreate100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputCreate100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6fb1e08e6656bbba100ccbf972da2dceafefff88
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputCreate100CharSample.ets
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputCreate100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputCreate100CharSample');
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ // ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ if (this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputCreate10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputCreate10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7d426d83a41db2f5e0073d52c759ca9774f1e219
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputCreate10CharSample.ets
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputCreate10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputCreate10CharSample');
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+ TextInput({text:this.textStr})
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHeight100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHeight100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4091b017a165fe195fed981ba383c4c706a004d2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHeight100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputHeight100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputHeight100CharSample');
+ @State textHeight: number = 200;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('TextInputChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.textHeight = 300;
+ })
+ }.width('100%')
+
+
+ // ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ if (this.textHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHeight10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHeight10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9b39aef16b24d815b30cdc980f2a842a18f48a5c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHeight10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputHeight10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputHeight10CharSample');
+ @State textHeight: number = 200;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height 100 to 200')
+ .id('TextInputChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.textHeight = 300;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ TextInput({text:this.textStr}).height(this.textHeight)
+ if (this.textHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..679fb6bb1934e62c9ef05cb9428f49adab0d4d66
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputHome.ets
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct TextInputHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('TextInputBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'TextInputCreate10Char',buttonUrl:'pages/base/textInput/TextInputCreate10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextInputCreate100Char',buttonUrl:'pages/base/textInput/TextInputCreate100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextInputWidth10Char',buttonUrl:'pages/base/textInput/TextInputWidth10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextInputWidth100Char',buttonUrl:'pages/base/textInput/TextInputWidth100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextInputHeight10Char',buttonUrl:'pages/base/textInput/TextInputHeight10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextInputHeight100Char',buttonUrl:'pages/base/textInput/TextInputHeight100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextInputPadding10Char',buttonUrl:'pages/base/textInput/TextInputPadding10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextInputPadding100Char',buttonUrl:'pages/base/textInput/TextInputPadding100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextInputMargin10Char',buttonUrl:'pages/base/textInput/TextInputMargin10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextInputMargin100Char',buttonUrl:'pages/base/textInput/TextInputMargin100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextInputAlign10Char',buttonUrl:'pages/base/textInput/TextInputAlign10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextInputAlign100Char',buttonUrl:'pages/base/textInput/TextInputAlign100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+ CommonButton({buttonName:'TextInputType10Char',buttonUrl:'pages/base/textInput/TextInputType10CharSample',data:ArrEntity.textTenLength});
+ CommonButton({buttonName:'TextInputType100Char',buttonUrl:'pages/base/textInput/TextInputType100CharSample',data:ArrEntity.textOneHundredHuLength});
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputMargin100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputMargin100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e9f9262d275dff1afc5470414d8a529f96416ffb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputMargin100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputMargin100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputMargin100CharSample');
+ @State textMargin: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('TextInputChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.textMargin = 30;
+ })
+ }.width('100%')
+
+
+ // ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ if (this.textMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputMargin10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputMargin10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..25a1c15b9c15e86b4db7d35256f2cc5bc546f0b9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputMargin10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputMargin10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputMargin10CharSample');
+ @State textMargin: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('TextInputChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.textMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ TextInput({text:this.textStr}).margin(this.textMargin)
+ if (this.textMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputPadding100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputPadding100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2098a49c631ed37376ff9e7f98e4b47e49f3f53e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputPadding100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputPadding100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputPadding100CharSample');
+ @State textPadding: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('TextInputChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPadding = 30;
+ })
+ }.width('100%')
+
+
+ // ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ if (this.textPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputPadding10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputPadding10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6eb6bff39883a86acc5be4ac4b0234d4f70cab7f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputPadding10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputPadding10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputPadding10CharSample');
+ @State textPadding: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('TextInputChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ TextInput({text:this.textStr}).padding(this.textPadding)
+ if (this.textPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputType100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputType100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1fb8a698a0d35765fb882cbaebcfe5b6aad9e318
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputType100CharSample.ets
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputType100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputType100CharSample');
+ @State textStr: string = '';
+ @State textInputType: InputType = InputType.Password;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextInputType.Norma')
+ .id('TextInputType.Norma')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Normal;
+ })
+ Button('TextInputType.Password')
+ .id('TextInputType.Password')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Password;
+ })
+ Button('TextInputType.Email')
+ .id('TextInputType.Email')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Email;
+ })
+ Button('TextInputType.Number')
+ .id('TextInputType.Number')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Number;
+ })
+ Button('TextInputType.PhoneNumber')
+ .id('TextInputType.PhoneNumber')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.PhoneNumber;
+ })
+
+
+
+ // ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textInputType != null && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ if (this.textInputType != null && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputType10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputType10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ca68ec2c6bc510e6b6f54f1b7b5c19fc02f75a9a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputType10CharSample.ets
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputType10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputType10CharSample');
+ @State textStr: string = '';
+ @State textInputType: InputType = InputType.Password;
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('TextInputType.Norma')
+ .id('TextInputType.Norma')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Normal;
+ })
+ Button('TextInputType.Password')
+ .id('TextInputType.Password')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Password;
+ })
+ Button('TextInputType.Email')
+ .id('TextInputType.Email')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Email;
+ })
+ Button('TextInputType.Number')
+ .id('TextInputType.Number')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.Number;
+ })
+ Button('TextInputType.PhoneNumber')
+ .id('TextInputType.PhoneNumber')
+ .margin('5vp')
+ .onClick(() => {
+ this.textInputType = InputType.PhoneNumber;
+ })
+
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textInputType != null && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ TextInput({text:this.textStr}).type(this.textInputType)
+ if (this.textInputType != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputWidth100CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputWidth100CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d82f8a3286694b3ab77b384dda8852cc01deb2c8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputWidth100CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputWidth100CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputWidth100CharSample');
+ @State textWidth: number = 200;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 200 to 300')
+ .id('TextInputChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.textWidth = 300;
+ })
+ }.width('100%')
+
+
+ // ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ if (this.textWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputWidth10CharSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputWidth10CharSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2042cde959528b3ff32368e3b20a3956eac16600
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textInput/TextInputWidth10CharSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextInputWidth10CharSample {
+ timeHelper: TimeHelper = new TimeHelper('TextInputWidth10CharSample');
+ @State textWidth: number = 200;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 200 to 300')
+ .id('TextInputChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.textWidth = 300;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ TextInput({text:this.textStr}).width(this.textWidth)
+ if (this.textWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerClickSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerClickSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..15b6219ff0715c9cdaff9d8f6508778de7b09d83
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerClickSample.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerClickSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerClickSample');
+ dataStr: string[] = [];
+
+ aboutToAppear() {
+ for (let i = 0;i < 100; i++) {
+ this.dataStr.push('item '+i);
+ }
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ TextPicker({ range: this.dataStr })
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false);
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..da2bc54b50eed9ee7d064b4aecea16961108b5e5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+ // TextPicker({ range: ['1'] });
+
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerDisappearTextStyleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerDisappearTextStyleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4082a917d026b3b81bc0ef26363f09192fb26be5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerDisappearTextStyleSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerDisappearTextStyleSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerDisappearTextStyleSample');
+ @State disappearTextStyle: PickerTextStyle = {
+ color: '#ff007dff',
+ font: { size: '20vp', weight: FontWeight.Medium }
+ };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change DisappearTextStyle')
+ .id('TextPickerChangeDisappearTextStyle')
+ .margin('5vp')
+ .onClick(() => {
+ this.disappearTextStyle = { color: '#ff007dff', font: { size: '40vp', weight: FontWeight.Normal } };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.disappearTextStyle.font != undefined && this.disappearTextStyle.font.weight != undefined &&
+ this.disappearTextStyle.font.weight == FontWeight.Normal && this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] }).disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+ // TextPicker().disappearTextStyle(this.disappearTextStyle);
+
+ if (this.disappearTextStyle.font != undefined && this.disappearTextStyle.font.weight != undefined &&
+ this.disappearTextStyle.font.weight == FontWeight.Normal && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerFingerSwipSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerFingerSwipSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..624b383be5436c807101a8e75b5b216e2a365c3d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerFingerSwipSample.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerFingerSwipSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerFingerSwipSample');
+ dataStr: string[] = [];
+
+ aboutToAppear() {
+ for (let i = 0;i < 100; i++) {
+ this.dataStr.push('item '+i);
+ }
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ TextPicker({ range: this.dataStr })
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false);
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..aa0483e4e60a827ed0bf72e8aee0a664b50e11f1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerHeightSample');
+ @State textPickerHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height')
+ .id('TextPickerChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPickerHeight = 200;
+ })
+ }
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPickerHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] }).height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+ // TextPicker().height(this.textPickerHeight);
+
+ if (this.textPickerHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b7a706464e4eb84b197a5cc3f5518e50372ca6d9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerHome.ets
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct TextPickerHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('TextPickerBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'TextPickerCreate',buttonUrl:'pages/base/textPicker/TextPickerCreateSample'});
+ CommonButton({buttonName:'TextPickerTextStyle',buttonUrl:'pages/base/textPicker/TextPickerTextStyleSample'});
+ CommonButton({buttonName:'TextPickerSelectedTextStyle',buttonUrl:'pages/base/textPicker/TextPickerSelectedTextStyleSample'});
+ CommonButton({buttonName:'TextPickerDisappearTextStyle',buttonUrl:'pages/base/textPicker/TextPickerDisappearTextStyleSample'});
+ CommonButton({buttonName:'TextPickerWidth',buttonUrl:'pages/base/textPicker/TextPickerWidthSample'});
+ CommonButton({buttonName:'TextPickerHeight',buttonUrl:'pages/base/textPicker/TextPickerHeightSample'});
+ CommonButton({buttonName:'TextPickerPadding',buttonUrl:'pages/base/textPicker/TextPickerPaddingSample'});
+ CommonButton({buttonName:'TextPickerMargin',buttonUrl:'pages/base/textPicker/TextPickerMarginSample'});
+ CommonButton({buttonName:'TextPickerFingerSwip',buttonUrl:'pages/base/textPicker/TextPickerFingerSwipSample'});
+ CommonButton({buttonName:'TextPickerClick',buttonUrl:'pages/base/textPicker/TextPickerClickSample'});
+ CommonButton({buttonName:'TextPickerMouseScroll',buttonUrl:'pages/base/textPicker/TextPickerMouseScrollSample'});
+ CommonButton({buttonName:'TextPickerKeyBoardScroll',buttonUrl:'pages/base/textPicker/TextPickerKeyBoardScrollSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerKeyBoardScrollSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerKeyBoardScrollSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9c4d6cfee2d92acf3fd3f86376ce8ec9cd45f279
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerKeyBoardScrollSample.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerKeyBoardScrollSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerKeyBoardScrollSample');
+ dataStr: string[] = [];
+
+ aboutToAppear() {
+ for (let i = 0;i < 100; i++) {
+ this.dataStr.push('item '+i);
+ }
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ TextPicker({ range: this.dataStr })
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false);
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..df09de08eb6df27d4010adbfc7859f2af033caa9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerMarginSample');
+ @State textPickerMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin')
+ .id('TextPickerChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPickerMargin = 30;
+ })
+ }
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPickerMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] }).margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+ // TextPicker().margin(this.textPickerMargin);
+
+ if (this.textPickerMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerMouseScrollSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerMouseScrollSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0386ad6cca51303d371a1ca2e56d6d9bbae9657b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerMouseScrollSample.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerMouseScrollSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerMouseScrollSample');
+ dataStr: string[] = [];
+
+ aboutToAppear() {
+ for (let i = 0;i < 100; i++) {
+ this.dataStr.push('item '+i);
+ }
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ TextPicker({ range: this.dataStr })
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false);
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f0d2ac346b6dc35f4ce16d47614ec891ac54ca48
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerPaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerPaddingSample');
+ @State textPickerPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding')
+ .id('TextPickerChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPickerPadding = 30;
+ })
+ }
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPickerPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] }).padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+ // TextPicker().padding(this.textPickerPadding);
+
+ if (this.textPickerPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerSelectedTextStyleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerSelectedTextStyleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f65e91c89a70572a257930613d2e6a8893dbd159
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerSelectedTextStyleSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerSelectedTextStyleSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerSelectedTextStyleSample');
+ @State selectedTextStyle: PickerTextStyle = { color: '#ff007dff', font: { size: '20vp', weight: FontWeight.Medium } };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change SelectedTextStyle')
+ .id('TextPickerChangeSelectedTextStyle')
+ .margin('5vp')
+ .onClick(() => {
+ this.selectedTextStyle = { color: '#ff007dff', font: { size: '40vp', weight: FontWeight.Normal } };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.selectedTextStyle.font != undefined && this.selectedTextStyle.font.weight != undefined &&
+ this.selectedTextStyle.font.weight == FontWeight.Normal && this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] }).selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+ // TextPicker().selectedTextStyle(this.selectedTextStyle);
+
+ if (this.selectedTextStyle.font != undefined && this.selectedTextStyle.font.weight != undefined &&
+ this.selectedTextStyle.font.weight == FontWeight.Normal && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerTextStyleSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerTextStyleSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..67de9aa66a04caff5e2a7e6e9fdd1d2abe8a8289
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerTextStyleSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerTextStyleSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerTextStyleSample');
+ @State textStyle: PickerTextStyle = { color: '#ff007dff', font: { size: '20vp', weight: FontWeight.Medium } };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change TextStyle')
+ .id('TextPickerChangeTextStyle')
+ .margin('5vp')
+ .onClick(() => {
+ this.textStyle = { color: '#ff007dff', font: { size: '40vp', weight: FontWeight.Normal } };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textStyle.font != undefined && this.textStyle.font.weight != undefined &&
+ this.textStyle.font.weight == FontWeight.Normal && this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] }).textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+ // TextPicker().textStyle(this.textStyle);
+
+ if (this.textStyle.font != undefined && this.textStyle.font.weight != undefined &&
+ this.textStyle.font.weight == FontWeight.Normal && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b73e0075954767539be3d98082a0925dab6f7b4a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textPicker/TextPickerWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextPickerWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('TextPickerWidthSample');
+ @State textPickerWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Width')
+ .id('TextPickerChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.textPickerWidth = 200;
+ })
+ }
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textPickerWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ TextPicker({ range: ['1'] }).width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+ // TextPicker().width(this.textPickerWidth);
+
+ if (this.textPickerWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerControllerSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerControllerSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6b1c8082fc137320478e6ed809d63eed04d3ac36
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerControllerSample.ets
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextTimer组件TextTimerController更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTimerControllerSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTimerControllerSample');
+ textTimerController: TextTimerController = new TextTimerController();
+ @State textTimerEvent: string = '';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change controller to start')
+ .id('change controller to start')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerController.start();
+ this.textTimerEvent = 'start'
+ })
+ }.width('100%')
+
+ Column() {
+ Button('change controller to pause')
+ .id('change controller to pause')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerController.pause();
+ this.textTimerEvent = 'pause'
+ })
+ }.width('100%')
+
+ Column() {
+ Button('change controller to reset')
+ .id('change controller to reset')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerController.reset();
+ this.textTimerEvent = 'reset'
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTimerEvent != null && this.timeHelper.printTime(true)) {
+ }
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ TextTimer({ controller: this.textTimerController })
+ if (this.textTimerEvent != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e6f04acd0e69e1138dcd1f2dffa3b54a0e43502a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextTimer组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTimerCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTimerCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ TextTimer()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerFormatSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerFormatSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..50e6a5f587077185f6804721a780ed7bc678dfa3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerFormatSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextTimer组件format属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTimerFormatSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTimerFormatSample');
+ @State textTimerFormat: string = 'HH:mm:ss.SS';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change format')
+ .id('change format')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerFormat = 'HH:mm';
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTimerFormat != null && this.timeHelper.printTime(true)) {
+ }
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ TextTimer().format(this.textTimerFormat)
+ if (this.textTimerFormat != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f504958ea1b6ba293aaf63a6a310e73e421873ad
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextTimer组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTimerHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTimerHeightSample');
+ @State textTimerHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTimerHeight != null && this.timeHelper.printTime(true)) {
+ }
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ TextTimer().height(this.textTimerHeight)
+ if (this.textTimerHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8d4df2e4692d52e62254daa114271012249f8cac
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerHome.ets
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct TextTimerHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('TextTimerHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'TextTimerCreateSample', buttonUrl: 'pages/base/textTimer/TextTimerCreateSample' });
+ CommonButton({ buttonName: 'TextTimerWidthSample', buttonUrl: 'pages/base/textTimer/TextTimerWidthSample' });
+ CommonButton({ buttonName: 'TextTimerHeightSample', buttonUrl: 'pages/base/textTimer/TextTimerHeightSample' });
+ CommonButton({ buttonName: 'TextTimerPaddingSample', buttonUrl: 'pages/base/textTimer/TextTimerPaddingSample' });
+ CommonButton({ buttonName: 'TextTimerMarginSample', buttonUrl: 'pages/base/textTimer/TextTimerMarginSample' });
+ CommonButton({ buttonName: 'TextTimerControllerSample', buttonUrl: 'pages/base/textTimer/TextTimerControllerSample' });
+ CommonButton({ buttonName: 'TextTimerFormatSample', buttonUrl: 'pages/base/textTimer/TextTimerFormatSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7ced3420ada006c9edcda2c21682f8945079c443
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextTimer组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTimerMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTimerMarginSample');
+ @State textTimerMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTimerMargin != null && this.timeHelper.printTime(true)) {
+ }
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ TextTimer().margin(this.textTimerMargin)
+ if (this.textTimerMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..afbcb837eccfba19d3000fc6170d7ec566084948
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextTimer组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTimerPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTimerPaddingSample');
+ @State textTimerPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTimerPadding != null && this.timeHelper.printTime(true)) {
+ }
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ TextTimer().padding(this.textTimerPadding)
+ if (this.textTimerPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5fd9725fa82fcff46b0c9bbb683e6f39de184a0a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/textTimer/TextTimerWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * TextTimer组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TextTimerWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('TextTimerWidthSample');
+ @State textTimerWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.textTimerWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textTimerWidth != null && this.timeHelper.printTime(true)) {
+ }
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ TextTimer().width(this.textTimerWidth)
+ if (this.textTimerWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCheckboxCancelSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCheckboxCancelSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..84b4e8b61d4fd71c08d423b865048f6360be2043
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCheckboxCancelSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 手指点击取消选中
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleCheckboxCancelSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleCheckboxCancelSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ CheckboxGroup() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ Toggle({ type: ToggleType.Checkbox, isOn: true })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }.id('change cancel')
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCheckboxSelectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCheckboxSelectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c223bab3868990077452900530beb5c0802cd6a4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCheckboxSelectSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 手指点击选中
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleCheckboxSelectSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleCheckboxSelectSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ CheckboxGroup() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ Toggle({ type: ToggleType.Checkbox, isOn: false })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }.id('change select')
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ed1e180e3121be169f5c2441c8af77ac12116bd1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ToggleCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ Toggle({ type: ToggleType.Switch })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c71a4de5e33b291b0d4ecde0f4a5f478b536cb69
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleHeightSample');
+ @State toggleHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.toggleHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.toggleHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ Toggle({ type: ToggleType.Switch }).height(this.toggleHeight)
+ if (this.toggleHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d6ccb207063a3090ab91e7177149bc82b4027fe2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleHome.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct ToggleHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ToggleBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'ToggleCreateSample', buttonUrl: 'pages/base/toggle/ToggleCreateSample' });
+ CommonButton({ buttonName: 'ToggleSelectedColorSample', buttonUrl: 'pages/base/toggle/ToggleSelectedColorSample' });
+ CommonButton({ buttonName: 'ToggleSwitchPointColorSample', buttonUrl: 'pages/base/toggle/ToggleSwitchPointColorSample' });
+ CommonButton({ buttonName: 'ToggleWidthSample', buttonUrl: 'pages/base/toggle/ToggleWidthSample' });
+ CommonButton({ buttonName: 'ToggleHeightSample', buttonUrl: 'pages/base/toggle/ToggleHeightSample' });
+ CommonButton({ buttonName: 'ToggleSizeSample', buttonUrl: 'pages/base/toggle/ToggleSizeSample' });
+ CommonButton({ buttonName: 'TogglePaddingSample', buttonUrl: 'pages/base/toggle/TogglePaddingSample' });
+ CommonButton({ buttonName: 'ToggleMarginSample', buttonUrl: 'pages/base/toggle/ToggleMarginSample' });
+ CommonButton({ buttonName: 'ToggleSwitchSample', buttonUrl: 'pages/base/toggle/ToggleSwitchSample' });
+ CommonButton({ buttonName: 'ToggleCheckboxSelectSample', buttonUrl: 'pages/base/toggle/ToggleCheckboxSelectSample' });
+ CommonButton({ buttonName: 'ToggleCheckboxCancelSample', buttonUrl: 'pages/base/toggle/ToggleCheckboxCancelSample' });
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ce4c400c6c7358a193b57da20e5dd446895c09e6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleMarginSample');
+ @State textAreaMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.textAreaMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.textAreaMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ Toggle({ type: ToggleType.Switch }).margin(this.textAreaMargin)
+ if (this.textAreaMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/TogglePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/TogglePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..42e452292fcfb76b8748a6f24d323fdad79c9f16
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/TogglePaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TogglePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('TogglePaddingSample');
+ @State togglePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.togglePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.togglePadding != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ Toggle({ type: ToggleType.Switch }).padding(this.togglePadding)
+ if (this.togglePadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSelectedColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSelectedColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6d5ea751f0d30e1d8ad48fcba7c8fa2cd66ee96e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSelectedColorSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件selectedColor属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleSelectedColorSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleSelectedColorSample');
+ @State toggleSelectedColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change selectedColor')
+ .id('change selectedColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.toggleSelectedColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.toggleSelectedColor != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ Toggle({ type: ToggleType.Switch, isOn: true }).selectedColor(this.toggleSelectedColor)
+ if (this.toggleSelectedColor != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fab2da2fd347308f6430156ffec77463be5b483d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSizeSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleSizeSample');
+ @State toggleSize: SizeOptions = { width: 100, height: 100 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change size')
+ .id('change size')
+ .margin('5vp')
+ .onClick(() => {
+ this.toggleSize = { width: 200, height: 200 };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.toggleSize != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ Toggle({ type: ToggleType.Switch }).size(this.toggleSize)
+ if (this.toggleSize != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSwitchPointColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSwitchPointColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..69f71de6da35defa9018ad71cc7decdef6093384
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSwitchPointColorSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件switchPointColor属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleSwitchPointColorSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleSwitchPointColorSample');
+ @State toggleSwitchPointColor: string = '0xffffff';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change switchPointColor')
+ .id('change switchPointColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.toggleSwitchPointColor = '#182431';
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.toggleSwitchPointColor != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ Toggle({ type: ToggleType.Switch }).switchPointColor(this.toggleSwitchPointColor)
+ if (this.toggleSwitchPointColor != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSwitchSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSwitchSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0cc83a3521989b6373d0dc35568578e3db49bd2c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleSwitchSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 手指滑动开关耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleSwitchSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleSwitchSample');
+ @State toggleIsOn: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change toggleIsOn')
+ .id('change toggleIsOn')
+ .margin('5vp')
+ .onClick(() => {
+ this.toggleIsOn = !this.toggleIsOn;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.toggleIsOn != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ Toggle({ type: ToggleType.Switch, isOn: this.toggleIsOn })
+ if (this.toggleIsOn != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..56010a44e60c3da26ef29ec79f2046c826b293bc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/toggle/ToggleWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * toggle组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ToggleWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ToggleWidthSample');
+ @State toggleWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.toggleWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.toggleWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ Toggle({ type: ToggleType.Switch }).width(this.toggleWidth)
+ if (this.toggleWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/xComponent/XComponentCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/xComponent/XComponentCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7b610d283eb6166a9682ad6584f44a2bc0d8d3a0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/xComponent/XComponentCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2023 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct XComponentCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('XComponentCreateSample');
+ xcomponentController: XComponentController = new XComponentController()
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+ XComponent({ id: 'xcomponent', type: 'surface', controller: this.xcomponentController })
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/xComponent/XComponentHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/xComponent/XComponentHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..64e83a52d868f1ca3993fbe7d3edde8376e403e6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/xComponent/XComponentHome.ets
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct XComponentHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('XComponentBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'XComponentCreate',buttonUrl:'pages/base/xComponent/XComponentCreateSample'});
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeBorderWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeBorderWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4d15b7ec61c6cc92a72e8c2c4f3feb9537b493b5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeBorderWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BadgeBorderWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('BadgeBorderWidthSample');
+ @State badgeBorderWidth: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change BorderWidth')
+ .id('BadgeChangeBorderWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.badgeBorderWidth = 5;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.badgeBorderWidth == 5 && this.timeHelper.printTime(true)) {
+ }
+
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+ Badge({count: 1,style:{borderWidth:this.badgeBorderWidth}})
+
+ if (this.badgeBorderWidth == 5 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeColorSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeColorSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4038f985b9ad580c178c9c5ed8811bd7b673f774
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeColorSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BadgeColorSample {
+ timeHelper: TimeHelper = new TimeHelper('BadgeColorSample');
+ @State badgeColor: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Color')
+ .id('BadgeChangeColor')
+ .margin('5vp')
+ .onClick(() => {
+ this.badgeColor = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.badgeColor == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+ Badge({count: 1,style:{badgeColor:this.badgeColor}})
+
+ if (this.badgeColor == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b9870c2b49c793f84db010cdaedc8295303ddf23
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BadgeCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('BadgeCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+ Badge({count:1,style:{}});
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeFontSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeFontSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..aec436084a8fcc14fb3bd18f64f3d4f11f208528
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeFontSizeSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BadgeFontSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('BadgeFontSizeSample');
+ @State badgeFontSize: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change FontSize')
+ .id('BadgeChangeFontSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.badgeFontSize = 40;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.badgeFontSize == 40 && this.timeHelper.printTime(true)) {
+ }
+
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+ Badge({count: 1,style:{fontSize:this.badgeFontSize}})
+
+ if (this.badgeFontSize == 40 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeFontWeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeFontWeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..07f3460bb615529c70e90782806a84f5101d348f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeFontWeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BadgeFontWeightSample {
+ timeHelper: TimeHelper = new TimeHelper('BadgeFontWeightSample');
+ @State badgeFontWeight: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change FontWeight')
+ .id('BadgeChangeFontWeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.badgeFontWeight = 40;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.badgeFontWeight == 40 && this.timeHelper.printTime(true)) {
+ }
+
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+ Badge({count: 1,style:{fontWeight:this.badgeFontWeight}})
+
+ if (this.badgeFontWeight == 40 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ea23233e6f600e5369b5e9ade5efd27ff88a9315
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeHome.ets
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct BadgeHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('BadgeBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'BadgeCreate',buttonUrl:'pages/container/badge/BadgeCreateSample'});
+ CommonButton({buttonName:'BadgeSize',buttonUrl:'pages/container/badge/BadgeSizeSample'});
+ CommonButton({buttonName:'BadgeColor',buttonUrl:'pages/container/badge/BadgeColorSample'});
+ CommonButton({buttonName:'BadgeFontSize',buttonUrl:'pages/container/badge/BadgeFontSizeSample'});
+ CommonButton({buttonName:'BadgeFontWeight',buttonUrl:'pages/container/badge/BadgeFontWeightSample'});
+ CommonButton({buttonName:'BadgeBorderWidth',buttonUrl:'pages/container/badge/BadgeBorderWidthSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0da7e88d2e80e16595411b3604f68b571df42c10
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/badge/BadgeSizeSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct BadgeSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('BadgeSizeSample');
+ @State badgeSize: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Size')
+ .id('BadgeChangeSize')
+ .margin('5vp')
+ .onClick(() => {
+ this.badgeSize = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.badgeSize == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+ Badge({count: 1,style:{badgeSize:this.badgeSize}})
+
+ if (this.badgeSize == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnAlignSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnAlignSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a313d3a72add7fc74f33279a861c56d9943f2bd1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnAlignSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnAlignSample {
+ timeHelper: TimeHelper = new TimeHelper('TextAlignSample');
+ @State columnAlign: HorizontalAlign = HorizontalAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('HorizontalAlign.Start')
+ .id('HorizontalAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnAlign = HorizontalAlign.Start;
+ })
+ Button('HorizontalAlign.Center')
+ .id('HorizontalAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnAlign = HorizontalAlign.Center;
+ })
+ Button('HorizontalAlign.End')
+ .id('HorizontalAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnAlign = HorizontalAlign.End;
+ })
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnAlign != null && this.timeHelper.printTime(true)) {
+ }
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ Column().alignItems(this.columnAlign)
+ if (this.columnAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e0eecfce3258a2f0f68634141cd9be2ef90a2b82
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnCreateSample.ets
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ColumnCreateSample');
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ Column();
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4eebf9558c6e0bb52d28f78b39f733ad26bcfa62
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnHeightSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ColumnHeightSample');
+ @State ColumnHeight: number = 200;
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change Height 200 to 300')
+ .id('ColumnChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.ColumnHeight = 300;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.ColumnHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ Column().height(this.ColumnHeight)
+ if (this.ColumnHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6030ee8c150d584db4babe9a919c1989645be833
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnHome.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct ColumnHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('CloumnBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'ColumnCreate',buttonUrl:'pages/container/column/ColumnCreateSample'});
+ CommonButton({buttonName:'ColumnWidth',buttonUrl:'pages/container/column/ColumnWidthSample'});
+ CommonButton({buttonName:'ColumnHeight',buttonUrl:'pages/container/column/ColumnHeightSample'});
+ CommonButton({buttonName:'ColumnPadding',buttonUrl:'pages/container/column/ColumnPaddingSample'});
+ CommonButton({buttonName:'ColumnMargin',buttonUrl:'pages/container/column/ColumnMarginSample'});
+ CommonButton({buttonName:'ColumnSpace',buttonUrl:'pages/container/column/ColumnSpaceSample'});
+ CommonButton({buttonName:'ColumnMarginSpace',buttonUrl:'pages/container/column/ColumnSpaceMarginSample'});
+ CommonButton({buttonName:'ColumnAlign',buttonUrl:'pages/container/column/ColumnAlignSample'});
+ CommonButton({buttonName:'ColumnJustify',buttonUrl:'pages/container/column/ColumnJustifySample'});
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnJustifySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnJustifySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..509ffd3f910a85195d4d6a7d6f548adaea98533d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnJustifySample.ets
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnJustifySample {
+ timeHelper: TimeHelper = new TimeHelper('ColumnJustifySample');
+ @State columnFlexAlign: FlexAlign = FlexAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Button('FlexAlign.Start')
+ .id('FlexAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnFlexAlign = FlexAlign.Start;
+ })
+ Button('FlexAlign.Center')
+ .id('FlexAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnFlexAlign = FlexAlign.Center;
+ })
+ Button('FlexAlign.End')
+ .id('FlexAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnFlexAlign = FlexAlign.End;
+ })
+ Button('FlexAlign.SpaceBetween')
+ .id('FlexAlign.SpaceBetween')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnFlexAlign = FlexAlign.SpaceBetween;
+ })
+ Button('FlexAlign.SpaceAround')
+ .id('FlexAlign.SpaceAround')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnFlexAlign = FlexAlign.SpaceAround;
+ })
+ Button('FlexAlign.SpaceEvenly')
+ .id('FlexAlign.SpaceEvenly')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnFlexAlign = FlexAlign.SpaceEvenly;
+ })
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnFlexAlign != null && this.timeHelper.printTime(true)) {
+ }
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ Column().justifyContent(this.columnFlexAlign)
+ if (this.columnFlexAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7b21241209866f02b4317ed21220d1716d59aef0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ColumnMarginSample');
+ @State columnMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('ColumnChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ Column().margin(this.columnMargin)
+ if (this.columnMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6529a3bc0b2cb38cfa90eb3b1b79568997c0da19
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnPaddingSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ColumnPaddingSample');
+ @State columnPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('ColumnChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ Column().padding(this.columnPadding)
+ if (this.columnPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnSpaceMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnSpaceMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7d81ae7682f476ed12fd44058186d64e4d11089f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnSpaceMarginSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct columnSpaceMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('columnSpaceMarginSample');
+ @State columnSpace: number = 20;
+ @State columnMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin space')
+ .id('ColumnChangeMarginSpace')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnSpace = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnSpace != null && this.timeHelper.printTime(true)) {
+ }
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ Column({space:this.columnSpace}).margin(this.columnMargin)
+ if (this.columnSpace != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnSpaceSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnSpaceSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b59102a18e976cd4baebee275e96cb14df73d681
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnSpaceSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnSpaceSample {
+ timeHelper: TimeHelper = new TimeHelper('ColumnSpaceSample');
+ @State columnSpace: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change space')
+ .id('ColumnChangeSpace')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnSpace = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnSpace != null && this.timeHelper.printTime(true)) {
+ }
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ Column({space:this.columnSpace})
+ if (this.columnSpace != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cc7449fe4b7313e99beba54d981548f09dacbddb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/column/ColumnWidthSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ColumnWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ColumnWidthSample');
+ @State columnWidth: number = 200;
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change width 200 to 300')
+ .id('ColumnChangeWidth')
+ .margin('15vp')
+ .onClick(() => {
+ this.columnWidth = 300;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ Column().width(this.columnWidth).height(200)
+ if (this.columnWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1ee0a9020c404b6c29676416c8d91a8d8dcecefb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CounterCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('CounterCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Counter();
+ Counter();
+ Counter();
+ Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+ // Counter();
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7692d28652105c0a57cee248c218e72e712b0a6c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CounterHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('CounterHeightSample');
+ @State counterHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Height')
+ .id('CounterChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.counterHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.counterHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Counter().height(this.counterHeight)
+ Counter().height(this.counterHeight)
+ Counter().height(this.counterHeight)
+ Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+ // Counter().height(this.counterHeight)
+
+ if (this.counterHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6e5cc0f91da8bf958e50a1a7442e8c3aab414ce7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterHome.ets
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct CounterHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('CounterBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'CounterCreate',buttonUrl:'pages/container/counter/CounterCreateSample'});
+ CommonButton({buttonName:'CounterWidth',buttonUrl:'pages/container/counter/CounterWidthSample'});
+ CommonButton({buttonName:'CounterHeight',buttonUrl:'pages/container/counter/CounterHeightSample'});
+ CommonButton({buttonName:'CounterPadding',buttonUrl:'pages/container/counter/CounterPaddingSample'});
+ CommonButton({buttonName:'CounterMargin',buttonUrl:'pages/container/counter/CounterMarginSample'});
+
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0c85e3fb192a7020e750fb873d4a373475867553
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CounterMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('CounterMarginSample');
+ @State counterMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin')
+ .id('CounterChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.counterMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.counterMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Counter().margin(this.counterMargin)
+ Counter().margin(this.counterMargin)
+ Counter().margin(this.counterMargin)
+ Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+ // Counter().margin(this.counterMargin)
+
+ if (this.counterMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6f94e0970a03ec6a612a55cf240ba1ce597037fb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterPaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CounterPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('CounterPaddingSample');
+ @State counterPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding')
+ .id('CounterChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.counterPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.counterPadding == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Counter().padding(this.counterPadding)
+ Counter().padding(this.counterPadding)
+ Counter().padding(this.counterPadding)
+ Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+ // Counter().padding(this.counterPadding)
+
+ if (this.counterPadding == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..806474d62d5df1d95629fcdb674c4dee7a1db2c0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/counter/CounterWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CounterWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('CounterWidthSample');
+ @State counterWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Width')
+ .id('CounterChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.counterWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.counterWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Counter().width(this.counterWidth)
+ Counter().width(this.counterWidth)
+ Counter().width(this.counterWidth)
+ Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+ // Counter().width(this.counterWidth)
+
+ if (this.counterWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7f35039fe1cd515b51dcc520c2ceab544f58e5d2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexCreateSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ Flex()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4ac19e8c4f42d4290baf9618e8f6b514e1ca0ecf
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexHeightSample');
+ @State flexHeight: number = 300;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 300 to 400')
+ .id('change height 300 to 400')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexHeight = 400;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ Flex().height(this.flexHeight)
+ if (this.flexHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fad4b3ad57d43222391b7ee18ec4c05528518aa8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexHome.ets
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct FlexHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('FlexBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'FlexCreateSample', buttonUrl: 'pages/container/flex/FlexCreateSample' });
+ CommonButton({ buttonName: 'FlexWidthSample', buttonUrl: 'pages/container/flex/FlexWidthSample' });
+ CommonButton({ buttonName: 'FlexHeightSample', buttonUrl: 'pages/container/flex/FlexHeightSample' });
+ CommonButton({ buttonName: 'FlexPaddingSample', buttonUrl: 'pages/container/flex/FlexPaddingSample' });
+ CommonButton({ buttonName: 'FlexMarginSample', buttonUrl: 'pages/container/flex/FlexMarginSample' });
+ CommonButton({ buttonName: 'FlexValueDirectionSample', buttonUrl: 'pages/container/flex/FlexValueDirectionSample' });
+ CommonButton({ buttonName: 'FlexValueWrapSample', buttonUrl: 'pages/container/flex/FlexValueWrapSample' });
+ CommonButton({ buttonName: 'FlexValueJustifyContentSample', buttonUrl: 'pages/container/flex/FlexValueJustifyContentSample' });
+ CommonButton({ buttonName: 'FlexValueAlignItemsSample', buttonUrl: 'pages/container/flex/FlexValueAlignItemsSample' });
+ CommonButton({ buttonName: 'FlexValueAlignContentSample', buttonUrl: 'pages/container/flex/FlexValueAlignContentSample' });
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5cf546b0b16c75dc5fcd37d568404b422f45006a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexMarginSample');
+ @State flexMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ Flex().margin(this.flexMargin)
+ if (this.flexMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7572d24fdce7a551c22b9a5ebd8303b8fab2b836
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexPaddingSample');
+ @State flexPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ Flex().padding(this.flexPadding)
+ if (this.flexPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueAlignContentSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueAlignContentSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ef5918abaac70ef0f9fd322caf0b70d9dfed3ad9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueAlignContentSample.ets
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件value内alignContent属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexValueAlignContentSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexValueAlignContentSample');
+ @State flexAlign: FlexAlign = FlexAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change value alignContent to FlexAlign.Start')
+ .id('change value alignContent to FlexAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.Start;
+ })
+ Button('change value alignContent to FlexAlign.Center')
+ .id('change value alignContent to FlexAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.Center;
+ })
+ Button('change value alignContent to FlexAlign.End')
+ .id('change value alignContent to FlexAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.End;
+ })
+ Button('change value alignContent to FlexAlign.SpaceBetween')
+ .id('change value alignContent to FlexAlign.SpaceBetween')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.SpaceBetween;
+ })
+ Button('change value alignContent to FlexAlign.SpaceAround')
+ .id('change value alignContent to FlexAlign.SpaceAround')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.SpaceAround;
+ })
+ Button('change value alignContent to FlexAlign.SpaceEvenly')
+ .id('change value alignContent to FlexAlign.SpaceEvenly')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.SpaceEvenly;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexAlign >= 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ Flex({ alignContent: this.flexAlign })
+ if (this.flexAlign >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueAlignItemsSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueAlignItemsSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8f6f3e3b53df8e855f029a769f77bc8d3281dc20
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueAlignItemsSample.ets
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件value内alignItems属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexValueAlignItemsSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexValueAlignItemsSample');
+ @State itemAlign: ItemAlign = ItemAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change value alignItems to ItemAlign.Auto')
+ .id('change value alignItems to ItemAlign.Auto')
+ .margin('5vp')
+ .onClick(() => {
+ this.itemAlign = ItemAlign.Auto;
+ })
+ Button('change value alignItems to ItemAlign.Start')
+ .id('change value alignItems to ItemAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.itemAlign = ItemAlign.Start;
+ })
+ Button('change value alignItems to ItemAlign.Center')
+ .id('change value alignItems to ItemAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.itemAlign = ItemAlign.Center;
+ })
+ Button('change value alignItems to ItemAlign.End')
+ .id('change value alignItems to ItemAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.itemAlign = ItemAlign.End;
+ })
+ Button('change value alignItems to ItemAlign.Stretch')
+ .id('change value alignItems to ItemAlign.Stretch')
+ .margin('5vp')
+ .onClick(() => {
+ this.itemAlign = ItemAlign.Stretch;
+ })
+ Button('change value alignItems to ItemAlign.Baseline')
+ .id('change value alignItems to ItemAlign.Baseline')
+ .margin('5vp')
+ .onClick(() => {
+ this.itemAlign = ItemAlign.Baseline;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.itemAlign >= 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ Flex({ alignItems: this.itemAlign })
+ if (this.itemAlign >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueDirectionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueDirectionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f6ea80135548424eb8bba654eb5c854a3848c754
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueDirectionSample.ets
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件value内direction属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexValueDirectionSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexValueDirectionSample');
+ @State flexDirection: FlexDirection = FlexDirection.Column;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change value direction to FlexDirection.Row')
+ .id('change value direction to FlexDirection.Row')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexDirection = FlexDirection.Row;
+ })
+ Button('change value direction to FlexDirection.RowReverse')
+ .id('change value direction to FlexDirection.RowReverse')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexDirection = FlexDirection.RowReverse;
+ })
+ Button('change value direction to FlexDirection.Column')
+ .id('change value direction to FlexDirection.Column')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexDirection = FlexDirection.Column;
+ })
+ Button('change value direction to FlexDirection.ColumnReverse')
+ .id('change value direction to FlexDirection.ColumnReverse')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexDirection = FlexDirection.ColumnReverse;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexDirection >= 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ Flex({ direction: this.flexDirection })
+ if (this.flexDirection >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueJustifyContentSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueJustifyContentSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..29bdc2c1f96f6d005a16ca8cc8d6d524737c794a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueJustifyContentSample.ets
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件value内justifyContent属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexValueJustifyContentSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexValueJustifyContentSample');
+ @State flexAlign: FlexAlign = FlexAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change value justifyContent to FlexAlign.Start')
+ .id('change value justifyContent to FlexAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.Start;
+ })
+ Button('change value justifyContent to FlexAlign.Center')
+ .id('change value justifyContent to FlexAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.Center;
+ })
+ Button('change value justifyContent to FlexAlign.End')
+ .id('change value justifyContent to FlexAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.End;
+ })
+ Button('change value justifyContent to FlexAlign.SpaceBetween')
+ .id('change value justifyContent to FlexAlign.SpaceBetween')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.SpaceBetween;
+ })
+ Button('change value justifyContent to FlexAlign.SpaceAround')
+ .id('change value justifyContent to FlexAlign.SpaceAround')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.SpaceAround;
+ })
+ Button('change value justifyContent to FlexAlign.SpaceEvenly')
+ .id('change value justifyContent to FlexAlign.SpaceEvenly')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexAlign = FlexAlign.SpaceEvenly;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexAlign >= 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ Flex({ justifyContent: this.flexAlign })
+ if (this.flexAlign >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueWrapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueWrapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ba2461fff3464046d128a989b41518f27650d3ab
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexValueWrapSample.ets
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件value内wrap属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexValueWrapSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexValueWrapSample');
+ @State flexWrap: FlexWrap = FlexWrap.Wrap;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change value wrap to FlexWrap.NoWrap')
+ .id('change value wrap to FlexWrap.NoWrap')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexWrap = FlexWrap.NoWrap;
+ })
+ Button('change value wrap to FlexWrap.Wrap')
+ .id('change value wrap to FlexWrap.Wrap')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexWrap = FlexWrap.Wrap;
+ })
+ Button('change value wrap to FlexWrap.WrapReverse')
+ .id('change value wrap to FlexWrap.WrapReverse')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexWrap = FlexWrap.WrapReverse;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexWrap >= 0 && this.timeHelper.printTime(true)) {
+ }
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ Flex({ wrap: this.flexWrap })
+ if (this.flexWrap >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..674d3b9239ba8d748bfc7ab7d16cb8aca70c961c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/flex/FlexWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Flex组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexWidthSample');
+ @State flexWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 80% to 100%')
+ .id('change width 80% to 100%')
+ .margin('5vp')
+ .onClick(() => {
+ this.flexWidth = '100%';
+ })
+ }.width('100%').height(120)
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.flexWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ Flex().width(this.flexWidth)
+ if (this.flexWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3df6f307b88007487c8d34bd855f91036545bc65
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridCreateSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('GridCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridEdgeEffectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridEdgeEffectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4d06c95a51de01a467ce370fcd7ede8205ed7c8a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridEdgeEffectSample.ets
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件edgeEffect属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridEdgeEffectSample {
+ // timeHelper: TimeHelper = new TimeHelper('GridEdgeEffectSample');
+ @State edgeEffect: EdgeEffect = EdgeEffect.None;
+ scroller: Scroller = new Scroller()
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change edgeEffect to EdgeEffect.Spring')
+ .id('change edgeEffect to EdgeEffect.Spring')
+ .margin('5vp')
+ .onClick(() => {
+ this.edgeEffect = EdgeEffect.Spring;
+ })
+ Button('change edgeEffect to EdgeEffect.Fade')
+ .id('change edgeEffect to EdgeEffect.Fade')
+ .margin('5vp')
+ .onClick(() => {
+ this.edgeEffect = EdgeEffect.Fade;
+ })
+ Button('change edgeEffect to EdgeEffect.None')
+ .id('change edgeEffect to EdgeEffect.None')
+ .margin('5vp')
+ .onClick(() => {
+ this.edgeEffect = EdgeEffect.None;
+ })
+ }.width('100%')
+
+ Grid(this.scroller) {
+ // if (this.edgeValue >= 0 && this.timeHelper.printTime(true)) {
+ // }
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+
+ })
+ // if (this.edgeValue >= 0 && this.timeHelper.printTime(false)) {
+ // }
+ }
+ .height('100%')
+ .columnsTemplate('1fr')
+ .edgeEffect(this.edgeEffect)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..afe512f9b8afe8affc936070d5a35edba24526e3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridHeightSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('GridHeightSample');
+ @State gridHeight: number = 300;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 300 to 400')
+ .id('change height 300 to 400')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridHeight = 400;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+ GridItem().height(this.gridHeight)
+
+ if (this.gridHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..80cda450b0a46a0492b9052f57427becef3accb9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridHome.ets
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct GridHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('GridBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'GridCreateSample', buttonUrl: 'pages/container/grid/GridCreateSample' });
+ CommonButton({ buttonName: 'GridWidthSample', buttonUrl: 'pages/container/grid/GridWidthSample' });
+ CommonButton({ buttonName: 'GridHeightSample', buttonUrl: 'pages/container/grid/GridHeightSample' });
+ CommonButton({ buttonName: 'GridPaddingSample', buttonUrl: 'pages/container/grid/GridPaddingSample' });
+ CommonButton({ buttonName: 'GridMarginSample', buttonUrl: 'pages/container/grid/GridMarginSample' });
+ CommonButton({ buttonName: 'GridSetRCColumnsTemplateSample', buttonUrl: 'pages/container/grid/GridSetRCColumnsTemplateSample' });
+ CommonButton({ buttonName: 'GridSetRCRowsTemplateSample', buttonUrl: 'pages/container/grid/GridSetRCRowsTemplateSample' });
+ CommonButton({ buttonName: 'GridSetRCRowsGapSample', buttonUrl: 'pages/container/grid/GridSetRCRowsGapSample' });
+ CommonButton({ buttonName: 'GridSetRCColumnsGapSample', buttonUrl: 'pages/container/grid/GridSetRCColumnsGapSample' });
+ CommonButton({ buttonName: 'GridSetCColumnsGapSample', buttonUrl: 'pages/container/grid/GridSetCColumnsGapSample' });
+ CommonButton({ buttonName: 'GridSetCRowsGapSample', buttonUrl: 'pages/container/grid/GridSetCRowsGapSample' });
+ CommonButton({ buttonName: 'GridSetRColumnsGapSample', buttonUrl: 'pages/container/grid/GridSetRColumnsGapSample' });
+ CommonButton({ buttonName: 'GridSetRRowsGapSample', buttonUrl: 'pages/container/grid/GridSetRRowsGapSample' });
+ CommonButton({ buttonName: 'GridMinCountSample', buttonUrl: 'pages/container/grid/GridMinCountSample' });
+ CommonButton({ buttonName: 'GridMaxCountSample', buttonUrl: 'pages/container/grid/GridMaxCountSample' });
+ CommonButton({ buttonName: 'GridNotSetRCColumnsGapSample', buttonUrl: 'pages/container/grid/GridNotSetRCColumnsGapSample' });
+ CommonButton({ buttonName: 'GridNotSetRCLayoutDirectionSample', buttonUrl: 'pages/container/grid/GridNotSetRCLayoutDirectionSample' });
+ CommonButton({ buttonName: 'GridNotSetRCCellLengthSample', buttonUrl: 'pages/container/grid/GridNotSetRCCellLengthSample' });
+ CommonButton({ buttonName: 'GridManualScrollingSample', buttonUrl: 'pages/container/grid/GridManualScrollingSample' });
+ CommonButton({ buttonName: 'GridScrollToSample', buttonUrl: 'pages/container/grid/GridScrollToSample' });
+ CommonButton({ buttonName: 'GridScrollEdgeSample', buttonUrl: 'pages/container/grid/GridScrollEdgeSample' });
+ CommonButton({ buttonName: 'GridScrollBySample', buttonUrl: 'pages/container/grid/GridScrollBySample' });
+ CommonButton({ buttonName: 'GridEdgeEffectSample', buttonUrl: 'pages/container/grid/GridEdgeEffectSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridManualScrollingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridManualScrollingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4f6777d84b7781c7dc24041846ccbb6ba15173db
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridManualScrollingSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 抛滑场景下Grid组件更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridManualScrollingSample {
+ // timeHelper: TimeHelper = new TimeHelper('GridManualScrollingSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ Grid() {
+ // if (this.timeHelper.printTime(true)) {
+ // }
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+
+ })
+ // if (this.timeHelper.printTime(false)) {
+ // }
+ }
+ .height('100%')
+ .columnsTemplate('1fr')
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fe17a7a129f50d054a4925a48af459be9834c32a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMarginSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct FlexMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('FlexMarginSample');
+ @State GridMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.GridMargin = 30;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.GridMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+ GridItem().margin(this.GridMargin)
+
+ if (this.GridMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMaxCountSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMaxCountSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ef8f53e67a42312bde383668c90f2dc4fb6073cb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMaxCountSample.ets
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * maxCount属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridMaxCountSample {
+ timeHelper: TimeHelper = new TimeHelper('GridMaxCountSample');
+ @State maxCount: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change maxCount 10 to 5')
+ .id('change maxCount 10 to 5')
+ .margin('5vp')
+ .onClick(() => {
+ this.maxCount = 5;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.maxCount >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.maxCount >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .minCount(1)
+ .maxCount(this.maxCount)
+ .columnsGap(0)
+ .rowsGap(0)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMinCountSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMinCountSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5cdc45224df0fa3e9d974034778f608c0e789d9e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridMinCountSample.ets
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * minCount属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridMinCountSample {
+ timeHelper: TimeHelper = new TimeHelper('GridMinCountSample');
+ @State minCount: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change minCount 0 to 5')
+ .id('change minCount 0 to 5')
+ .margin('5vp')
+ .onClick(() => {
+ this.minCount = 5;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.minCount >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.minCount >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .minCount(this.minCount)
+ .maxCount(Number.MAX_VALUE)
+ .columnsGap(0)
+ .rowsGap(0)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCCellLengthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCCellLengthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..083bf5463a04f226c32193ca537dfbfb27b649b9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCCellLengthSample.ets
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * rowsTemplate、columnsTemplate都不设置时,cellLength属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridNotSetRCCellLengthSample {
+ timeHelper: TimeHelper = new TimeHelper('GridNotSetRCCellLengthSample');
+ @State cellLength: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change cellLength 100 to 200')
+ .id('change cellLength 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.cellLength = 200;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.cellLength >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.cellLength >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .minCount(1)
+ .maxCount(Number.MAX_VALUE)
+ .columnsGap(0)
+ .rowsGap(0)
+ .cellLength(this.cellLength)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCColumnsGapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCColumnsGapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fd97b9d980547ec803540a7d861b707aab50445d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCColumnsGapSample.ets
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * rowsTemplate、columnsTemplate都不设置时,columnsGap属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridNotSetRCColumnsGapSample {
+ timeHelper: TimeHelper = new TimeHelper('GridNotSetRCColumnsGapSample');
+ @State columnsGapValue: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change columnGap 0 to 10')
+ .id('change columnGap 0 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnsGapValue = 10;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .minCount(1)
+ .maxCount(Number.MAX_VALUE)
+ .columnsGap(this.columnsGapValue)
+ .rowsGap(0)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCLayoutDirectionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCLayoutDirectionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4e3ac47e5441f5f84320ddadaf41a79f1c3eb71a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridNotSetRCLayoutDirectionSample.ets
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * rowsTemplate、columnsTemplate都不设置时,layoutDirection属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridNotSetRCLayoutDirectionSample {
+ timeHelper: TimeHelper = new TimeHelper('GridNotSetRCLayoutDirectionSample');
+ @State layoutDirection: GridDirection = GridDirection.RowReverse;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change layoutDirection to GridDirection.Row')
+ .id('change layoutDirection to GridDirection.Row')
+ .margin('5vp')
+ .onClick(() => {
+ this.layoutDirection = GridDirection.Row;
+ })
+ Button('change layoutDirection to GridDirection.Column')
+ .id('change layoutDirection to GridDirection.Column')
+ .margin('5vp')
+ .onClick(() => {
+ this.layoutDirection = GridDirection.Column;
+ })
+ Button('change layoutDirection to GridDirection.RowReverse')
+ .id('change layoutDirection to GridDirection.RowReverse')
+ .margin('5vp')
+ .onClick(() => {
+ this.layoutDirection = GridDirection.RowReverse;
+ })
+ Button('change layoutDirection to GridDirection.ColumnReverse')
+ .id('change layoutDirection to GridDirection.ColumnReverse')
+ .margin('5vp')
+ .onClick(() => {
+ this.layoutDirection = GridDirection.ColumnReverse;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.layoutDirection >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.layoutDirection >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .minCount(1)
+ .maxCount(Number.MAX_VALUE)
+ .columnsGap(0)
+ .rowsGap(0)
+ .layoutDirection(this.layoutDirection)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6a566909b8d42aa6944a4b313774fd2c3ed739c9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridPaddingSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('GridPaddingSample');
+ @State gridPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridPadding = 30;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+ GridItem().padding(this.gridPadding)
+
+ if (this.gridPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollBySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollBySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0f39c70221ddbaa8330476076ea007f503bf1bc9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollBySample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件调用scrollBy触发页面跳转布局
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridScrollBySample {
+ // timeHelper: TimeHelper = new TimeHelper('GridScrollBySample');
+ // @State scrollByY: number = 0;
+ scroller: Scroller = new Scroller();
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change scrollBy to 100')
+ .id('change scrollBy to 100')
+ .margin('5vp')
+ .onClick(() => {
+ this.scroller.scrollBy(0, 100);
+ })
+ }.width('100%')
+
+ Grid(this.scroller) {
+ // if (this.scrollByY >= 0 && this.timeHelper.printTime(true)) {
+ // }
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+
+ })
+ // if (this.scrollByY >= 0 && this.timeHelper.printTime(false)) {
+ // }
+ }
+ .height('100%')
+ .columnsTemplate('1fr')
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollEdgeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollEdgeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6fd49bfadba4764f8acb73ad648aba7cfbcd72da
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollEdgeSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件调用scrollEdge触发页面跳转布局
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridScrollEdgeSample {
+ // timeHelper: TimeHelper = new TimeHelper('GridScrollEdgeSample');
+ // @State edgeValue: Edge = Edge.Top;
+ scroller: Scroller = new Scroller();
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change scrollEdge to Edge.Bottom')
+ .id('change scrollEdge to Edge.Bottom')
+ .margin('5vp')
+ .onClick(() => {
+ this.scroller.scrollEdge(Edge.Bottom);
+ })
+ }.width('100%')
+
+ Grid(this.scroller) {
+ // if (this.edgeValue >= 0 && this.timeHelper.printTime(true)) {
+ // }
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+
+ })
+ // if (this.edgeValue >= 0 && this.timeHelper.printTime(false)) {
+ // }
+ }
+ .height('100%')
+ .columnsTemplate('1fr')
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollToSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollToSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0c738f3a6871385e48aefec7b27ad322c53c3615
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridScrollToSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件调用scrollTo触发页面跳转布局
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridScrollToSample {
+ // timeHelper: TimeHelper = new TimeHelper('GridScrollToSample');
+ // @State scrollToY: number = 0;
+ scroller: Scroller = new Scroller();
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change scrollTo to 100')
+ .id('change scrollTo to 100')
+ .margin('5vp')
+ .onClick(() => {
+ this.scroller.scrollTo({ xOffset: 0, yOffset: this.scroller.currentOffset().yOffset + 100 });
+ })
+ }.width('100%')
+
+ Grid(this.scroller) {
+ // if (this.scrollToY >= 0 && this.timeHelper.printTime(true)) {
+ // }
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+ GridItem() { Text(index.toString()) }
+
+ })
+ // if (this.scrollToY >= 0 && this.timeHelper.printTime(false)) {
+ // }
+ }
+ .height('100%')
+ .columnsTemplate('1fr')
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetCColumnsGapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetCColumnsGapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7db914a4f3f8df4c9327972e984bf33c13793917
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetCColumnsGapSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 设置Grid组件columnsTemplate属性,不设置rowsTemplate属性,columnsGap更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetCColumnsGapSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetCColumnsGapSample');
+ @State columnsGapValue: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change columnGap 5 to 10')
+ .id('change columnGap 5 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnsGapValue = 10;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .columnsTemplate('1fr 1fr 2fr')
+ .columnsGap(this.columnsGapValue)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetCRowsGapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetCRowsGapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..547704150c218154bd313ac8c7b7f4aaea2333ad
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetCRowsGapSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 设置Grid组件columnsTemplate属性,不设置rowsTemplate属性,rowsGap更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetCRowsGapSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetCRowsGapSample');
+ @State rowsGapValue: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change rowsGap 5 to 10')
+ .id('change rowsGap 5 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowsGapValue = 10;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowsGapValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.rowsGapValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .columnsTemplate('1fr 1fr 2fr')
+ .rowsGap(this.rowsGapValue)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCColumnsGapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCColumnsGapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ff2f7901d6c88b45c5226bce886f0a90b471d7e9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCColumnsGapSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * columnsGap更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetRCColumnsGapSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetRCColumnsGapSample');
+ @State columnsGapValue: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change columnGap 5 to 10')
+ .id('change columnGap 5 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnsGapValue = 10;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .rowsTemplate('1fr 1fr')
+ .columnsTemplate('1fr 1fr')
+ .columnsGap(this.columnsGapValue)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCColumnsTemplateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCColumnsTemplateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fb34e9548b0034510e3e0ea1a32997cd474e50a7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCColumnsTemplateSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * columnsTemplate更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetRCColumnsTemplateSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetRCColumnsTemplateSample');
+ @State columnsTemplateValue: string = '1fr 1fr';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change columnsTemplate 1fr 1fr to 1fr 1fr 2fr')
+ .id('change columnsTemplate 1fr 1fr to 1fr 1fr 2fr')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnsTemplateValue = '1fr 1fr 2fr';
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnsTemplateValue != null && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.columnsTemplateValue != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .columnsTemplate(this.columnsTemplateValue)
+ .rowsTemplate('1fr 1fr')
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCRowsGapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCRowsGapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d83afa3152389f5afe356ad6d41453075bd5e881
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCRowsGapSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * rowsGap更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetRCRowsGapSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetRCRowsGapSample');
+ @State rowsGapValue: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change rowsGap 5 to 10')
+ .id('change rowsGap 5 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowsGapValue = 10;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowsGapValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.rowsGapValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .rowsTemplate('1fr 1fr')
+ .columnsTemplate('1fr 1fr')
+ .rowsGap(this.rowsGapValue)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCRowsTemplateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCRowsTemplateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..53e26f7d70a1d4b1d34f2586de7b4ccf2e12fa13
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRCRowsTemplateSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * rowsTemplate更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetRCRowsTemplateSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetRCRowsTemplateSample');
+ @State rowsTemplateValue: string = '1fr 1fr';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change rowsTemplate 1fr 1fr to 1fr 1fr 2fr')
+ .id('change rowsTemplate 1fr 1fr to 1fr 1fr 2fr')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowsTemplateValue = '1fr 1fr 2fr';
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowsTemplateValue != null && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.rowsTemplateValue != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .rowsTemplate(this.rowsTemplateValue)
+ .columnsTemplate('1fr 1fr')
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRColumnsGapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRColumnsGapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..39866924200d6837a49afc01c99deceb930dbb30
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRColumnsGapSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 设置Grid组件rowsTemplate属性,不设置columnsTemplate属性,columnsGap更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetRColumnsGapSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetRColumnsGapSample');
+ @State columnsGapValue: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change columnGap 5 to 10')
+ .id('change columnGap 5 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.columnsGapValue = 10;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.columnsGapValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .rowsTemplate('1fr 1fr 2fr')
+ .columnsGap(this.columnsGapValue)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRRowsGapSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRRowsGapSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..51b7565d4198fe15febd5feea5e6cc2343a636b2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridSetRRowsGapSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 设置Grid组件rowsTemplate属性,不设置columnsTemplate属性,rowsGap更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridSetRRowsGapSample {
+ timeHelper: TimeHelper = new TimeHelper('GridSetRRowsGapSample');
+ @State rowsGapValue: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change rowsGap 5 to 10')
+ .id('change rowsGap 5 to 10')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowsGapValue = 10;
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowsGapValue >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+ GridItem()
+
+ if (this.rowsGapValue >= 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .rowsTemplate('1fr 1fr 2fr')
+ .rowsGap(this.rowsGapValue)
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a6ba9bec49c74d5e7d177716e476b4dda598859f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/grid/GridWidthSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Grid组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct GridWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('GridWidthSample');
+ @State gridWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 80% to 100%')
+ .id('change width 80% to 100%')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridWidth = '100%';
+ })
+ }.width('100%')
+
+ Grid() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+ GridItem().width(this.gridWidth)
+
+ if (this.gridWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..12558616b8768a64e7c110323905ee2cf168ea74
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColCreateSample.ets
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ GridCol()
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..91e203cf06c5d2a6a302da326eac6735f617b373
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColHeightSample.ets
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColHeightSample');
+ @State gridHeight: number = 50;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change height 50 to 100')
+ .id('GridColHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridHeight = 100;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ GridCol() {
+ Row()
+ }
+ .height(this.gridHeight)
+
+ if (this.gridHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9f364cae2e741071df11d6bcdaabf59c7787b159
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColHome.ets
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct GridColHome {
+ @State messageTenLength: string = 'Hello-Text';
+ @State message: string = 'Hello-Text';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('GridColBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({
+ buttonName: 'GridColCreate',
+ buttonUrl: 'pages/container/gridCol/GridColCreateSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColOptionSpan',
+ buttonUrl: 'pages/container/gridCol/GridColOptionSpanSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColOptionOffset',
+ buttonUrl: 'pages/container/gridCol/GridColOptionOffsetSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColOptionOrder',
+ buttonUrl: 'pages/container/gridCol/GridColOptionOrderSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColSpan',
+ buttonUrl: 'pages/container/gridCol/GridColSpanSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColOffset',
+ buttonUrl: 'pages/container/gridCol/GridColOffsetSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColOrder',
+ buttonUrl: 'pages/container/gridCol/GridColOrderSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColWidth',
+ buttonUrl: 'pages/container/gridCol/GridColWidthSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColHeight',
+ buttonUrl: 'pages/container/gridCol/GridColHeightSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColPadding',
+ buttonUrl: 'pages/container/gridCol/GridColPaddingSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridColMargin',
+ buttonUrl: 'pages/container/gridCol/GridColMarginSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..54a15bb684c7791cc41cc2c2938940e063c6c8e1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColMarginSample.ets
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColMarginSample');
+ @State gridMargin: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin 10 to 20')
+ .id('GridColMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridMargin = 20;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ GridCol() {
+ Row()
+ }
+ .margin(this.gridMargin)
+
+ if (this.gridMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9a92e769ef1b2550165044d7549fdcc935e37801
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOffsetSample.ets
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColOffsetSample');
+ @State gridColOffset: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change offset 0 to 2')
+ .id('GridColOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridColOffset = 2;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridColOffset >= 0 && this.timeHelper.printTime(true)) {
+ }
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .gridColOffset(this.gridColOffset)
+
+ if (this.gridColOffset >= 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width(500)
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c408bc77692e36cff7ce5be55ae4c842fde2d687
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionOffsetSample.ets
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColOptionOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColOptionOffsetSample');
+ @State gridColOffset: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change offset 0 to 3')
+ .id('GridColOptionOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridColOffset = 3;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridColOffset >= 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ offset: this.gridColOffset }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ if (this.gridColOffset >= 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width(500)
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionOrderSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionOrderSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..78646d48ab1ad69b4b36ae9a763879237832818f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionOrderSample.ets
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColOptionOrderSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColOptionOrderSample');
+ @State gridColOrder: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change order 0 to 99')
+ .id('GridColOptionOrder')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridColOrder = 99;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridColOrder >= 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ GridRow() {
+ GridCol({ offset: this.gridColOrder }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ }
+
+ if (this.gridColOrder >= 0 && this.timeHelper.printTime(false)) {
+ }
+
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionSpanSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionSpanSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a077975323f1463d575eb51c26ad04ad18835705
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOptionSpanSample.ets
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColOptionSpanSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColOptionSpanSample');
+ @State gridColSpan: number = 2;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change span 2 to 4')
+ .id('GridColOptionSpan')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridColSpan = 4;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridColSpan > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ GridRow({
+ columns: 8
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: this.gridColSpan }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+
+ if (this.gridColSpan > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width(500)
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOrderSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOrderSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f9e1245b6f8c39789187c906f66dcc6960219007
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColOrderSample.ets
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColOrderSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColOrderSample');
+ @State gridColOrder: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change order 0 to 99')
+ .id('GridColOrder')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridColOrder = 99;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridColOrder >= 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ GridRow() {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .order(this.gridColOrder)
+ }
+
+ if (this.gridColOrder >= 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4f058160ac4e4290b1783519fd98d2f307284b7d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColPaddingSample.ets
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColPaddingSample');
+ @State gridPadding: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change padding 10 to 20')
+ .id('GridColPadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ GridCol() {
+ Row()
+ }
+ .padding(this.gridPadding)
+
+ if (this.gridPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColSpanSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColSpanSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..620f1b366d3bf82bc97f4282cc86d51bef105bb2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColSpanSample.ets
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColSpanSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColSpanSample');
+ @State gridColSpan: number = 2;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change span 2 to 4')
+ .id('GridColSpan')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridColSpan = 4;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridColSpan > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }
+ .borderWidth(2)
+ .span(this.gridColSpan)
+
+ if (this.gridColSpan > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width(500)
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..64507009ab289c63c6bda14fcc25156572875f6c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridCol/GridColWidthSample.ets
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridColWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('GridColWidthSample');
+ @State gridWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 80% to 100%')
+ .id('GridColWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridWidth = '100%';
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridWidth.length > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ GridCol() {
+ Row()
+ }
+ .width(this.gridWidth)
+
+ if (this.gridWidth.length > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowBreakpointsSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowBreakpointsSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..af9e5e21b832554b810d7e6f43dc2e65deb31797
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowBreakpointsSample.ets
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowBreakpointsSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowBreakpointsSample');
+ @State gridBreakpoints: BreakPoints = {
+ value: ["400vp", "600vp", "800vp"],
+ reference: BreakpointsReference.ComponentSize
+ };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change breakpoints')
+ .id('GridRowBreakpoints')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridBreakpoints = {
+ value: ["200vp", "400vp", "600vp"],
+ reference: BreakpointsReference.ComponentSize
+ };
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridBreakpoints != null && this.timeHelper.printTime(true)) {
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: 8,
+ breakpoints: this.gridBreakpoints
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 }, offset: 0, order: 0 }) {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ if (this.gridBreakpoints != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width(500)
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowColumnsSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowColumnsSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..07f7b41d0319af1729707a3f5c1bf5e76410a014
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowColumnsSample.ets
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowColumnsSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowColumnsSample');
+ @State gridColumns: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change columns 5 to 3')
+ .id('GridRowColumns')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridColumns = 3;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridColumns > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ columns: this.gridColumns
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ if (this.gridColumns > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f4a589f5fda7c6021015527ef93e2d747b165379
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowCreateSample.ets
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ GridRow()
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowDirectionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowDirectionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..066ec78c3d877a2e194edbb759e663bd2e3287f8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowDirectionSample.ets
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowDirectionSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowDirectionSample');
+ @State gridDirection: GridRowDirection = GridRowDirection.Row;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change direction')
+ .id('GridRowDirection')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridDirection = GridRowDirection.RowReverse;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridDirection != null && this.timeHelper.printTime(true)) {
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ direction: this.gridDirection
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ if (this.gridDirection != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowGutterSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowGutterSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ee1f4a0a14f7096f05368daf451f3fc1aa34887b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowGutterSample.ets
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowGutterSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowGutterSample');
+ @State gridGutter: GutterOption = { x: 5, y: 10 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change gutter')
+ .id('GridRowGutter')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridGutter = { x: 10, y: 5 };
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridGutter != null && this.timeHelper.printTime(true)) {
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ GridRow({
+ gutter: this.gridGutter
+ }) {
+ ForEach(ArrEntity.bgColors, (color: Color) => {
+ GridCol() {
+ Row().width("100%").height("20vp")
+ }.borderWidth(2)
+ })
+ }
+ if (this.gridGutter != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..edc66bb0cf6b22e95928d05c3be1b9c2bb00954a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowHeightSample');
+ @State gridHeight: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change height 80% to 100%')
+ .id('GridRowHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridHeight = '100%';
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridHeight.length > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ GridRow().height(this.gridHeight)
+ if (this.gridHeight.length > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..874b5aec1f87b9c02e51e49fb0531e2e2fca892d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowHome.ets
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct GridRowHome {
+ @State messageTenLength: string = 'Hello-Text';
+ @State message: string = 'Hello-Text';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('GridRowBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({
+ buttonName: 'GridRowCreate',
+ buttonUrl: 'pages/container/gridRow/GridRowCreateSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowWidth',
+ buttonUrl: 'pages/container/gridRow/GridRowWidthSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowHeight',
+ buttonUrl: 'pages/container/gridRow/GridRowHeightSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowPadding',
+ buttonUrl: 'pages/container/gridRow/GridRowPaddingSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowMargin',
+ buttonUrl: 'pages/container/gridRow/GridRowMarginSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowColumns',
+ buttonUrl: 'pages/container/gridRow/GridRowColumnsSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowGutter',
+ buttonUrl: 'pages/container/gridRow/GridRowGutterSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowDirection',
+ buttonUrl: 'pages/container/gridRow/GridRowDirectionSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'GridRowBreakpoints',
+ buttonUrl: 'pages/container/gridRow/GridRowBreakpointsSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9c97c503f9a5fe302abf2f8e0cb12f8476f07959
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowMarginSample');
+ @State gridMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin 20 to 30')
+ .id('GridRowMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ GridRow().margin(this.gridMargin)
+ if (this.gridMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7ca699f99561ca9cc8d6bb7941f69ea5a6a8a987
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowPaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowPaddingSample');
+ @State gridPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change padding 20 to 30')
+ .id('GridRowPadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ GridRow().padding(this.gridPadding)
+ if (this.gridPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0cb6455c07151f97818ad707c68760ee16a3d278
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/gridRow/GridRowWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct GridRowWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('GridRowWidthSample');
+ @State gridWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 80% to 100%')
+ .id('GridRowWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.gridWidth = '100%';
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.gridWidth.length > 0 && this.timeHelper.printTime(true)) {
+ }
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ GridRow().width(this.gridWidth)
+ if (this.gridWidth.length > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9576e53c142929942831b8915c92b8ad4fedb0d2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkCreateSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Hyperlink组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct HyperlinkCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('HyperlinkCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+ Hyperlink("https://example.com/")
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7edb4a3966fb17d147019ec9ad6e992f7f2b25e4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Hyperlink组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct HyperlinkHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('HyperlinkHeightSample');
+ @State hyperlinkHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.hyperlinkHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.hyperlinkHeight != null && this.timeHelper.printTime(true)) {
+ }
+
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+ Hyperlink("https://example.com/").height(this.hyperlinkHeight)
+
+ if (this.hyperlinkHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bf263a48263ab26364217bad2e843b2c8eb90578
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkHome.ets
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct HyperlinkHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('HyperlinkHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'HyperlinkCreateSample', buttonUrl: 'pages/container/hyperlink/HyperlinkCreateSample' });
+ CommonButton({ buttonName: 'HyperlinkWidthSample', buttonUrl: 'pages/container/hyperlink/HyperlinkWidthSample' });
+ CommonButton({ buttonName: 'HyperlinkHeightSample', buttonUrl: 'pages/container/hyperlink/HyperlinkHeightSample' });
+ CommonButton({ buttonName: 'HyperlinkPaddingSample', buttonUrl: 'pages/container/hyperlink/HyperlinkPaddingSample' });
+ CommonButton({ buttonName: 'HyperlinkMarginSample', buttonUrl: 'pages/container/hyperlink/HyperlinkMarginSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fe11e39e98b546bb39c71136f85f4ca96cf5499c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Hyperlink组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct HyperlinkMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('HyperlinkMarginSample');
+ @State hyperlinkMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.hyperlinkMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.hyperlinkMargin != null && this.timeHelper.printTime(true)) {
+ }
+
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+ Hyperlink("https://example.com/").margin(this.hyperlinkMargin)
+
+ if (this.hyperlinkMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5919efa8b59dfde3ee8d61047f34c946a386f8d3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Hyperlink组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct HyperlinkPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('HyperlinkPaddingSample');
+ @State hyperlinkPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.hyperlinkPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.hyperlinkPadding != null && this.timeHelper.printTime(true)) {
+ }
+
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+ Hyperlink("https://example.com/").padding(this.hyperlinkPadding)
+
+ if (this.hyperlinkPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5ed94f0057847552bf8ee7e7b94a97db5a17a99c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/hyperlink/HyperlinkWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * QRCode组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct HyperlinkWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('HyperlinkWidthSample');
+ @State hyperlinkWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.hyperlinkWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.hyperlinkWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+ Hyperlink("https://example.com/").width(this.hyperlinkWidth)
+
+ if (this.hyperlinkWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListAddItemSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListAddItemSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8fa6e80b93124c0af0f00f2a4c370be9954c7962
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListAddItemSample.ets
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListAddItemSample {
+ timeHelper: TimeHelper = new TimeHelper('ListAddItemSample');
+ @State arr: number[] = [];
+
+ aboutToAppear() {
+ for (let i = 0;i < 100; i++) {
+ this.arr.push(i);
+ }
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change list add item')
+ .id('ListAddItem')
+ .margin('5vp')
+ .onClick(() => {
+ this.arr.push(100);
+ this.arr.push(101);
+ this.arr.push(102);
+ this.arr.push(103);
+ this.arr.push(104);
+ this.arr.push(105);
+ this.arr.push(106);
+ this.arr.push(107);
+ this.arr.push(108);
+ this.arr.push(109);
+ })
+ }.width('100%')
+
+ List() {
+ // ForEach(this.arr, (index: number) => {
+ if (this.arr.length > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+
+ if (this.arr.length > 0 && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListAlignListItemSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListAlignListItemSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..110d4ef380fd51cafc43f10da92d06144bc9d189
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListAlignListItemSample.ets
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListAlignListItemSample {
+ timeHelper: TimeHelper = new TimeHelper('ListAlignListItemSample');
+ @State alignListItem: ListItemAlign = ListItemAlign.End;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change alignListItem Start')
+ .id('ListAlignListItem_Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.alignListItem = ListItemAlign.Start;
+ })
+ Button('change alignListItem Center')
+ .id('ListAlignListItem_Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.alignListItem = ListItemAlign.Center;
+ })
+ Button('change alignListItem End')
+ .id('ListAlignListItem_End')
+ .margin('5vp')
+ .onClick(() => {
+ this.alignListItem = ListItemAlign.End;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.alignListItem != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+
+ if (this.alignListItem != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .alignListItem(this.alignListItem)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListCachedCountSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListCachedCountSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..52bc532b1e8bfd31704457741debf7f6d673512f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListCachedCountSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListCachedCountSample {
+ timeHelper: TimeHelper = new TimeHelper('ListCachedCountSample');
+ @State cachedCount: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change cachedCount')
+ .id('ListCachedCount')
+ .margin('5vp')
+ .onClick(() => {
+ this.cachedCount = 30;
+ })
+ }.width('100%')
+
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.cachedCount >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+
+ if (this.cachedCount >= 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .cachedCount(this.cachedCount)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListChainAnimationOptionsSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListChainAnimationOptionsSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6b0bbe8a453978c107524b4686463756d44109b7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListChainAnimationOptionsSample.ets
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListChainAnimationOptionsSample {
+ timeHelper: TimeHelper = new TimeHelper('ListChainAnimationOptionsSample');
+ @State chainAnimationOptions: ChainAnimationOptions = {
+ minSpace: 10,
+ maxSpace: 30,
+ conductivity: 0.2,
+ intensity: 0.4,
+ edgeEffect: ChainEdgeEffect.DEFAULT
+ };
+ index:number=0;
+ nextIndex():number{
+ return this.index++;
+ }
+
+ build() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change chainAnimationOptions')
+ .id('ListChainAnimationOptions')
+ .margin('5vp')
+ .onClick(() => {
+ this.chainAnimationOptions = {
+ minSpace: 20,
+ maxSpace: 50,
+ conductivity: 0.8,
+ intensity: 0.8,
+ edgeEffect: ChainEdgeEffect.STRETCH
+ };
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.chainAnimationOptions != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+
+
+
+ if (this.chainAnimationOptions != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .chainAnimation(true)
+ .chainAnimationOptions(this.chainAnimationOptions)
+
+ }
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListChainAnimationSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListChainAnimationSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c43d90c48b8d0635dfe02caa7bff3bf1fd9091a0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListChainAnimationSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListChainAnimationSample {
+ timeHelper: TimeHelper = new TimeHelper('ListChainAnimationSample');
+ @State chainAnimation: boolean = false;
+ index:number=0;
+ nextIndex():number{
+ return this.index++;
+ }
+
+ build() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change chainAnimation')
+ .id('ListChainAnimation')
+ .margin('5vp')
+ .onClick(() => {
+ this.chainAnimation = true;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.chainAnimation != null && this.timeHelper.printTime(true)) {
+ }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+
+
+ if (this.chainAnimation != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .edgeEffect(EdgeEffect.Spring)
+ .chainAnimation(this.chainAnimation)
+
+ }
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cc56fe7b767fe9a19b83078b8c147a5a72252631
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListCreateSample.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ListCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+ List()
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListDividerSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListDividerSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..aa99b13cd9fddbf067fcf4da238c25a7841945a7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListDividerSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListDividerSample {
+ timeHelper: TimeHelper = new TimeHelper('ListDividerSample');
+ @State divider: ESObject = { strokeWidth: 10 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change divider')
+ .id('ListDivider')
+ .margin('5vp')
+ .onClick(() => {
+ this.divider = { strokeWidth: 30 };
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.divider != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+
+ if (this.divider != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .divider(this.divider)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListEdgeEffectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListEdgeEffectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..702d5a63bfaf303e5cd970ca94030d238cbc543a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListEdgeEffectSample.ets
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListEdgeEffectSample {
+ timeHelper: TimeHelper = new TimeHelper('ListEdgeEffectSample');
+ @State edgeEffect: EdgeEffect = EdgeEffect.None;
+ index:number=0;
+ nextIndex():number{
+ return this.index++;
+ }
+
+ build() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change edgeEffect Spring')
+ .id('ListEdgeEffect_Spring')
+ .margin('5vp')
+ .onClick(() => {
+ this.edgeEffect = EdgeEffect.Spring;
+ })
+ Button('change edgeEffect Fade')
+ .id('ListEdgeEffect_Fade')
+ .margin('5vp')
+ .onClick(() => {
+ this.edgeEffect = EdgeEffect.Fade;
+ })
+ Button('change edgeEffect None')
+ .id('ListEdgeEffect_None')
+ .margin('5vp')
+ .onClick(() => {
+ this.edgeEffect = EdgeEffect.None;
+ })
+ }.width('100%')
+
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.edgeEffect != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+
+
+
+ if (this.edgeEffect != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .edgeEffect(this.edgeEffect)
+
+
+
+ }
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListEnableScrollInteractionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListEnableScrollInteractionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..63e8860d594096826171fa2050ac14982c455d38
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListEnableScrollInteractionSample.ets
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListEnableScrollInteractionSample {
+ timeHelper: TimeHelper = new TimeHelper('ListEnableScrollInteractionSample');
+ @State enableScrollInteraction: boolean = false;
+ private scrollerForList: Scroller = new Scroller();
+ @State xOffset: number = -1;
+ @State yOffset: number = -1;
+ index:number=0;
+ nextIndex():number{
+ return this.index++;
+ }
+
+ build() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change enableScrollInteraction true')
+ .id('ListEnableScrollInteraction_true')
+ .margin('5vp')
+ .onClick(() => {
+ this.enableScrollInteraction = true;
+ this.xOffset = 0;
+ this.yOffset = 1200;
+ })
+ Button('change enableScrollInteraction false')
+ .id('ListEnableScrollInteraction_false')
+ .margin('5vp')
+ .onClick(() => {
+ this.enableScrollInteraction = false;
+ this.xOffset = 0;
+ this.yOffset = 0;
+ })
+ Button('change Scroller controller')
+ .id('ListEnableScrollInteraction_Scroller')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollerForList.scrollTo({ xOffset: this.xOffset, yOffset: this.yOffset });
+ })
+ }.width('100%')
+
+ List({ scroller: this.scrollerForList }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.enableScrollInteraction != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+
+ if (this.enableScrollInteraction != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .enableScrollInteraction(this.enableScrollInteraction)
+
+ }
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListFrictionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListFrictionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d504dac064bfcaea1ec90fc5cc567cd5f026d5c8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListFrictionSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListFrictionSample {
+ timeHelper: TimeHelper = new TimeHelper('ListFrictionSample');
+ @State friction: number = 0.8;
+ index:number=0;
+ nextIndex():number{
+ return this.index++;
+ }
+
+ build() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change friction')
+ .id('ListFriction')
+ .margin('5vp')
+ .onClick(() => {
+ this.friction = 1.5;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.friction > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+
+ if (this.friction > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .friction(this.friction)
+
+ }
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b1d2d5449784ced9d46885db4a53f2867b934c28
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ListHeightSample');
+ @State listHeight: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change height 200 to 300')
+ .id('ListHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.listHeight = 300;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+ List().height(this.listHeight)
+
+ if (this.listHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..50483dfc413e3069188a792635816f74c3b57e37
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListHome.ets
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct ListHome {
+ @State messageTenLength: string = 'Hello-Text';
+ @State message: string = 'Hello-Text';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ListBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({
+ buttonName: 'ListCreate',
+ buttonUrl: 'pages/container/list/ListCreateSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListWidth',
+ buttonUrl: 'pages/container/list/ListWidthSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListHeight',
+ buttonUrl: 'pages/container/list/ListHeightSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListPadding',
+ buttonUrl: 'pages/container/list/ListPaddingSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListMargin',
+ buttonUrl: 'pages/container/list/ListMarginSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListItemWidth',
+ buttonUrl: 'pages/container/list/ListItemWidthSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListItemHeight',
+ buttonUrl: 'pages/container/list/ListItemHeightSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListItemPadding',
+ buttonUrl: 'pages/container/list/ListItemPaddingSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListItemMargin',
+ buttonUrl: 'pages/container/list/ListItemMarginSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListItemGroupDivider',
+ buttonUrl: 'pages/container/list/ListItemGroupDividerSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListItemGroupSpace',
+ buttonUrl: 'pages/container/list/ListItemGroupSpaceSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListSpace',
+ buttonUrl: 'pages/container/list/ListSpaceSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListListDirection',
+ buttonUrl: 'pages/container/list/ListListDirectionSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListAlignListItem',
+ buttonUrl: 'pages/container/list/ListAlignListItemSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListLanes',
+ buttonUrl: 'pages/container/list/ListLanesSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListCachedCount',
+ buttonUrl: 'pages/container/list/ListCachedCountSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListDivider',
+ buttonUrl: 'pages/container/list/ListDividerSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListScrollBar',
+ buttonUrl: 'pages/container/list/ListScrollBarSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListRemoveItem',
+ buttonUrl: 'pages/container/list/ListRemoveItemSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListAddItem',
+ buttonUrl: 'pages/container/list/ListAddItemSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListEdgeEffect',
+ buttonUrl: 'pages/container/list/ListEdgeEffectSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListChainAnimation',
+ buttonUrl: 'pages/container/list/ListChainAnimationSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListFriction',
+ buttonUrl: 'pages/container/list/ListFrictionSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListEnableScrollInteraction',
+ buttonUrl: 'pages/container/list/ListEnableScrollInteractionSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListScrollSnapAlign',
+ buttonUrl: 'pages/container/list/ListScrollSnapAlignSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListChainAnimationOptions',
+ buttonUrl: 'pages/container/list/ListChainAnimationOptionsSample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+ CommonButton({
+ buttonName: 'ListSticky',
+ buttonUrl: 'pages/container/list/ListStickySample',
+ data: ArrEntity.textOneHundredHuLength
+ });
+
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemGroupDividerSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemGroupDividerSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..974dbddf33bc8691391c0f250b38865624aba690
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemGroupDividerSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListItemGroupDividerSample {
+ timeHelper: TimeHelper = new TimeHelper('ListItemGroupDividerSample');
+ @State listDivider: ESObject = { strokeWidth: 5, color: Color.Blue, startMargin: 5, endMargin: 5 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change divider')
+ .id('ListItemGroupDivider')
+ .margin('5vp')
+ .onClick(() => {
+ this.listDivider = { strokeWidth: 10, color: Color.Yellow, startMargin: 10, endMargin: 10 };
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listDivider != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+ ListItemGroup().divider(this.listDivider)
+
+ if (this.listDivider != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemGroupSpaceSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemGroupSpaceSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9443708131b512aeaf44d8df820c156964379618
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemGroupSpaceSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListItemGroupDividerSample {
+ timeHelper: TimeHelper = new TimeHelper('ListItemGroupSpaceSample');
+ @State listSpace: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change space')
+ .id('ListItemGroupSpace')
+ .margin('5vp')
+ .onClick(() => {
+ this.listSpace = 20;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listSpace >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+ ListItemGroup({ space: this.listSpace })
+
+ if (this.listSpace >= 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7851926883d2ad4efc19d18171927b016d4e5c7f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemHeightSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListItemHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ListItemHeightSample');
+ @State listHeight: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change height 200 to 300')
+ .id('ListItemHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.listHeight = 300;
+ })
+ }.width('100%')
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+ ListItem().height(this.listHeight)
+
+ if (this.listHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..225f42f203d4d595cde6a4857f9bf4325c14cab1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemMarginSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListItemMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ListItemMarginSample');
+ @State listMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin 20 to 30')
+ .id('ListItemMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.listMargin = 30;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+ ListItem().margin(this.listMargin)
+
+ if (this.listMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cf0d2b5c458775aab8061befad5a0da5a4f24a4c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemPaddingSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListItemPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ListItemPaddingSample');
+ @State listPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change padding 20 to 30')
+ .id('ListItemPadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.listPadding = 30;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+ ListItem().padding(this.listPadding)
+
+ if (this.listPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c311285d5499c2efc19b0ec2eae188b35040b989
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListItemWidthSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListItemWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ListItemWidthSample');
+ @State listWidth: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 200 to 300')
+ .id('ListItemWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.listWidth = 300;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+ ListItem().width(this.listWidth)
+
+ if (this.listWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListLanesSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListLanesSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f6808a06922a0ed8ae8604aab72f45d9bcf8107a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListLanesSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListLanesSample {
+ timeHelper: TimeHelper = new TimeHelper('ListLanesSample');
+ @State listLanes: number = 2;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change lanes')
+ .id('ListLanes')
+ .margin('5vp')
+ .onClick(() => {
+ this.listLanes = 3;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listLanes >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+
+ if (this.listLanes >= 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .lanes(this.listLanes)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListListDirectionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListListDirectionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..141192b1d75c6cb066819c6b223e46e6a701d027
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListListDirectionSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListListDirectionSample {
+ timeHelper: TimeHelper = new TimeHelper('ListListDirectionSample');
+ @State listListDirection: Axis = Axis.Vertical;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change listDirection')
+ .id('ListListDirection')
+ .margin('5vp')
+ .onClick(() => {
+ this.listListDirection = Axis.Horizontal;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listListDirection != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+
+ if (this.listListDirection != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .listDirection(this.listListDirection)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b97b09c1425145e015c3bc970e0d575eb5f29e39
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ListMarginSample');
+ @State listMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin 20 to 30')
+ .id('ListMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.listMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+ List() .margin(this.listMargin)
+
+ if (this.listMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e29a8e55cb539d52b021f744baa5d14135ed2c47
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListPaddingSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ListPaddingSample');
+ @State listPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change padding 20 to 30')
+ .id('ListPadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.listPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+ List().padding(this.listPadding)
+
+ if (this.listPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListRemoveItemSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListRemoveItemSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ecfc148f24f7f9e31713ad8135e707e56d80a479
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListRemoveItemSample.ets
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListRemoveItemSample {
+ timeHelper: TimeHelper = new TimeHelper('ListRemoveItemSample');
+ @State arr: number[] = [];
+
+ aboutToAppear() {
+ for (let i = 0;i < 100; i++) {
+ this.arr.push(i);
+ }
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change list remove item')
+ .id('ListChangeRemoveItem')
+ .margin('5vp')
+ .onClick(() => {
+ this.arr.splice(0, 10);
+ })
+ }.width('100%')
+
+ List() {
+ // ForEach(this.arr, (index: number) => {
+ if (this.arr.length > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+ ListItem()
+
+ if (this.arr.length > 0 && this.timeHelper.printTime(false)) {
+ }
+ // }, (item: number) => JSON.stringify(item))
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListScrollBarSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListScrollBarSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..12bc903705b1830479e9248a0d6f0f77bbc615c2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListScrollBarSample.ets
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListScrollBarSample {
+ timeHelper: TimeHelper = new TimeHelper('ListScrollBarSample');
+ @State scrollBar: BarState = BarState.On;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change scrollBar Off')
+ .id('ListScrollBar_Off')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBar = BarState.Off;
+ })
+ Button('change scrollBar On')
+ .id('ListScrollBar_On')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBar = BarState.On;
+ })
+ Button('change scrollBar Auto')
+ .id('ListScrollBar_Auto')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollBar = BarState.Auto;
+ })
+ }.width('100%')
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollBar != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+
+ if (this.scrollBar != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .scrollBar(this.scrollBar)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListScrollSnapAlignSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListScrollSnapAlignSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..79c2e0dd879c93b211168761066f7418f7ab0388
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListScrollSnapAlignSample.ets
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListScrollSnapAlignSample {
+ timeHelper: TimeHelper = new TimeHelper('ListScrollSnapAlignSample');
+ @State scrollSnapAlign: ScrollSnapAlign = ScrollSnapAlign.START;
+ index:number=0;
+ nextIndex():number{
+ return this.index++;
+ }
+
+ build() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change scrollSnapAlign NONE')
+ .id('ListScrollSnapAlign_NONE')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollSnapAlign = ScrollSnapAlign.NONE;
+ })
+ Button('change scrollSnapAlign START')
+ .id('ListScrollSnapAlign_START')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollSnapAlign = ScrollSnapAlign.START;
+ })
+ Button('change scrollSnapAlign CENTER')
+ .id('ListScrollSnapAlign_CENTER')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollSnapAlign = ScrollSnapAlign.CENTER;
+ })
+ Button('change scrollSnapAlign END')
+ .id('ListScrollSnapAlign_END')
+ .margin('5vp')
+ .onClick(() => {
+ this.scrollSnapAlign = ScrollSnapAlign.END;
+ })
+ }.width('100%')
+
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.scrollSnapAlign != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+ ListItem() { Text(`this is text ${this.nextIndex()}`) }
+
+ if (this.scrollSnapAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .scrollSnapAlign(this.scrollSnapAlign)
+
+
+
+ }
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListSpaceSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListSpaceSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6eec71bca76fba0960869a14cf55c73adeeef777
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListSpaceSample.ets
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListSpaceSample {
+ timeHelper: TimeHelper = new TimeHelper('ListSpaceSample');
+ @State listSpace: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change space')
+ .id('ListSpace')
+ .margin('5vp')
+ .onClick(() => {
+ this.listSpace = 30;
+ })
+ }.width('100%')
+
+ List({ space: this.listSpace}) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listSpace >= 0 && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+ ListItemGroup()
+
+ if (this.listSpace >= 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListStickySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListStickySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..77a76a73ff9bb02641e2b16e558fe8836a1b72e8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListStickySample.ets
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListStickySample {
+ timeHelper: TimeHelper = new TimeHelper('ListStickySample');
+ @State sticky: StickyStyle = StickyStyle.Header;
+ index:number=0;
+ nextIndex():number{
+ return this.index++;
+ }
+
+ build() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change listSticky None')
+ .id('ListSticky_None')
+ .margin('5vp')
+ .onClick(() => {
+ this.sticky = StickyStyle.None;
+ })
+ Button('change listSticky Header')
+ .id('ListSticky_Header')
+ .margin('5vp')
+ .onClick(() => {
+ this.sticky = StickyStyle.Header;
+ })
+ Button('change listSticky Footer')
+ .id('ListSticky_Footer')
+ .margin('5vp')
+ .onClick(() => {
+ this.sticky = StickyStyle.Footer;
+ })
+ }.width('100%')
+
+
+ List() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sticky != null && this.timeHelper.printTime(true)) {
+ }
+
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+ ListItemGroup() { ListItem() { Text(`this is text ${this.nextIndex()}`) } }
+
+ if (this.sticky != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .chainAnimation(true)
+ .sticky(this.sticky)
+
+
+
+ }
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2511f99d5e00160207ad1c6f694963df8211cf69
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/list/ListWidthSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct ListWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ListWidthSample');
+ @State listWidth: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 200 to 300')
+ .id('ListWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.listWidth = 300;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.listWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+ List().width(this.listWidth)
+
+ if (this.listWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..93274bfebde172ea657fbcc0b6f9de8e92f0e63b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshCreateSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ Refresh({ refreshing: true })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshFrictionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshFrictionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5d061d099e9af4c1cc713ac4da2869b517072492
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshFrictionSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件friction属性更新后下拉刷新
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshFrictionSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshFrictionSample');
+ @State refreshFriction: number = 60;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change friction 60 to 80')
+ .id('change friction 60 to 80')
+ .margin('5vp')
+ .onClick(() => {
+ this.refreshFriction = 80;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.refreshFriction != null && this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ Refresh({ refreshing: false, friction: this.refreshFriction })
+ if (this.refreshFriction != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..614b252dd1ee4f5defb643e6dbe031dde6a0b639
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshHeightSample');
+ @State refreshHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.refreshHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.refreshHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ Refresh({ refreshing: true }).height(this.refreshHeight)
+ if (this.refreshHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b7004b7aaed3c4e5606c79969c30784e4e7ad773
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshHome.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct RefreshHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('RefreshBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'RefreshCreateSample', buttonUrl: 'pages/container/refresh/RefreshCreateSample' });
+ CommonButton({ buttonName: 'RefreshWidthSample', buttonUrl: 'pages/container/refresh/RefreshWidthSample' });
+ CommonButton({ buttonName: 'RefreshHeightSample', buttonUrl: 'pages/container/refresh/RefreshHeightSample' });
+ CommonButton({ buttonName: 'RefreshSizeSample', buttonUrl: 'pages/container/refresh/RefreshSizeSample' });
+ CommonButton({ buttonName: 'RefreshPaddingSample', buttonUrl: 'pages/container/refresh/RefreshPaddingSample' });
+ CommonButton({ buttonName: 'RefreshMarginSample', buttonUrl: 'pages/container/refresh/RefreshMarginSample' });
+ CommonButton({ buttonName: 'RefreshPullSample', buttonUrl: 'pages/container/refresh/RefreshPullSample' });
+ CommonButton({ buttonName: 'RefreshOffsetSample', buttonUrl: 'pages/container/refresh/RefreshOffsetSample' });
+ CommonButton({ buttonName: 'RefreshFrictionSample', buttonUrl: 'pages/container/refresh/RefreshFrictionSample' });
+ CommonButton({ buttonName: 'RefreshOnStateChangeSample', buttonUrl: 'pages/container/refresh/RefreshOnStateChangeSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..73a34a92ffccb823f2e78e3030c9fb1e5ee4e52f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshMarginSample');
+ @State refreshMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.refreshMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.refreshMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ Refresh({ refreshing: true }).margin(this.refreshMargin)
+ if (this.refreshMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7f9ae01fa5b3a297814b7be487714fbdd682638d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshOffsetSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件offset属性更新后下拉刷新
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshOffsetSample');
+ @State refreshOffset: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change offset 20 to 30')
+ .id('change offset 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.refreshOffset = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.refreshOffset != null && this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ Refresh({ refreshing: false, offset: this.refreshOffset })
+ if (this.refreshOffset != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshOnStateChangeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshOnStateChangeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..821ffadc344c67360ec6fd1d524c6c8bb776618b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshOnStateChangeSample.ets
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件onStateChange事件更新RefreshStatus后下拉刷新
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshOnStateChangeSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshOnStateChangeSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ Refresh({ refreshing: false }).onStateChange((state: RefreshStatus) => {
+ })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c1b92050d5f12de190e4ca1b0e2685744b63ebf1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshPaddingSample');
+ @State refreshPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.refreshPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.refreshPadding != null && this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ Refresh({ refreshing: true }).padding(this.refreshPadding)
+ if (this.refreshPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshPullSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshPullSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..052c60d86a86485533e8800c55cb2701a01f3d4b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshPullSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件下拉刷新
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshPullSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshPullSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ Refresh({ refreshing: false })
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshSizeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshSizeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..96d80394247f416569d681ffaa8ca0d98a74aeed
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshSizeSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件size属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshSizeSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshSizeSample');
+ @State refreshSize: SizeOptions = { width: 10, height: 50 };
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change size')
+ .id('change size')
+ .margin('5vp')
+ .onClick(() => {
+ this.refreshSize = { width: 20, height: 100 };
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.refreshSize != null && this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ Refresh({ refreshing: true }).size(this.refreshSize)
+ if (this.refreshSize != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c23e1291be578dc6e3d5766964080cabc0cd6b52
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/refresh/RefreshWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Refresh组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RefreshWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('RefreshWidthSample');
+ @State refreshWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.refreshWidth = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.refreshWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ Refresh({ refreshing: true }).width(this.refreshWidth)
+ if (this.refreshWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowAlignSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowAlignSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..761ea58a5094676decfa509b1f07aa84519b1599
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowAlignSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowAlignSample {
+ timeHelper: TimeHelper = new TimeHelper('RowAlignSample');
+ @State rowAlign: VerticalAlign = VerticalAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('VerticalAlign.Top')
+ .id('VerticalAlign.Top')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowAlign = VerticalAlign.Top;
+ })
+ Button('VerticalAlign.Center')
+ .id('VerticalAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowAlign = VerticalAlign.Center;
+ })
+ Button('VerticalAlign.Bottom')
+ .id('VerticalAlign.Bottom')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowAlign = VerticalAlign.Bottom;
+ })
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowAlign != null && this.timeHelper.printTime(true)) {
+ }
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ Row().alignItems(this.rowAlign)
+ if (this.rowAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..723682bd094c8d51bfc8c74f72913e066b09b4d0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowCreateSample.ets
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('RowCreateSample');
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ Row();
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0b39ac5dbd4f7ef8ee2ee3b32e627c3a1efcb939
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowHeightSample.ets
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('RowHeightSample');
+ @State rowHeight: number = 200;
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change Height 200 to 300')
+ .id('RowChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowHeight = 300;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ Row().height(this.rowHeight)
+ if (this.rowHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c63001abc88f8a0f5ffa8faeaf9ddbd64b63f537
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowHome.ets
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct RowHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('RowBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'RowCreate',buttonUrl:'pages/container/row/RowCreateSample'});
+ CommonButton({buttonName:'RowWidth',buttonUrl:'pages/container/row/RowWidthSample'});
+ CommonButton({buttonName:'RowHeight',buttonUrl:'pages/container/row/RowHeightSample'});
+ CommonButton({buttonName:'RowPadding',buttonUrl:'pages/container/row/RowPaddingSample'});
+ CommonButton({buttonName:'RowMargin',buttonUrl:'pages/container/row/RowMarginSample'});
+ CommonButton({buttonName:'RowSpace',buttonUrl:'pages/container/row/RowSpaceSample'});
+ CommonButton({buttonName:'RowMarginSpace',buttonUrl:'pages/container/row/RowSpaceMarginSample'});
+ CommonButton({buttonName:'RowAlign',buttonUrl:'pages/container/row/RowAlignSample'});
+ CommonButton({buttonName:'RowJustify',buttonUrl:'pages/container/row/RowJustifySample'});
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowJustifySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowJustifySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..aa4e2ac82f01dd22d688713370a07055252fea30
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowJustifySample.ets
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowJustifySample {
+ timeHelper: TimeHelper = new TimeHelper('RowJustifySample');
+ @State rowFlexAlign: FlexAlign = FlexAlign.Center;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('FlexAlign.Start')
+ .id('FlexAlign.Start')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowFlexAlign = FlexAlign.Start;
+ })
+ Button('FlexAlign.Center')
+ .id('FlexAlign.Center')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowFlexAlign = FlexAlign.Center;
+ })
+ Button('FlexAlign.End')
+ .id('FlexAlign.End')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowFlexAlign = FlexAlign.End;
+ })
+ Button('FlexAlign.SpaceBetween')
+ .id('FlexAlign.SpaceBetween')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowFlexAlign = FlexAlign.SpaceBetween;
+ })
+ Button('FlexAlign.SpaceAround')
+ .id('FlexAlign.SpaceAround')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowFlexAlign = FlexAlign.SpaceAround;
+ })
+ Button('FlexAlign.SpaceEvenly')
+ .id('FlexAlign.SpaceEvenly')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowFlexAlign = FlexAlign.SpaceEvenly;
+ })
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowFlexAlign != null && this.timeHelper.printTime(true)) {
+ }
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ Row().justifyContent(this.rowFlexAlign)
+ if (this.rowFlexAlign != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..519b21e6547a86f7f852cdfd9b7c6712063822eb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowMarginSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('RowMarginSample');
+ @State rowMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('RowChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ Row().margin(this.rowMargin)
+ if (this.rowMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..14dadfea4395ebad7ef2122144f1e108f98813a7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowPaddingSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('RowPaddingSample');
+ @State rowPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('RowChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ Row().padding(this.rowPadding)
+ if (this.rowPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowSpaceMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowSpaceMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f2a923d5a948c19ac776ccc5c8172252ca977e3a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowSpaceMarginSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowSpaceMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('RowSpaceMarginSample');
+ @State rowSpace: number = 20;
+ @State rowMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin space')
+ .id('RowChangeMarginSpace')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowSpace = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowSpace != null && this.timeHelper.printTime(true)) {
+ }
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ Row({space:this.rowSpace}).margin(this.rowMargin)
+ if (this.rowSpace != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowSpaceSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowSpaceSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d6f7681ac7f20fafb62a48e331bd42d09b3b9d50
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowSpaceSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowSpaceSample {
+ timeHelper: TimeHelper = new TimeHelper('RowSpaceSample');
+ @State rowSpace: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change space')
+ .id('RowChangeSpace')
+ .margin('5vp')
+ .onClick(() => {
+ this.rowSpace = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.rowSpace != null && this.timeHelper.printTime(true)) {
+ }
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ Row({space:this.rowSpace})
+ if (this.rowSpace != null && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..54af32a4a59896d9efa4a04c5a39a85d6a1f4002
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/row/RowWidthSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct RowWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('RowWidthSample');
+ @State RowWidth: number = 200;
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change width 200 to 300')
+ .id('RowChangeWidth')
+ .margin('15vp')
+ .onClick(() => {
+ this.RowWidth = 300;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.RowWidth > 0 && this.timeHelper.printTime(true)) {
+ }
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ Row().width(this.RowWidth).height(200)
+ if (this.RowWidth > 0 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9c053b0cd690f698cf461ed7185eba57608b0d0c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollCreateSample.ets
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ScrollCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ScrollCreateSample');
+
+ aboutToAppear() {
+ let buttonName: string = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ Scroll()
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ .height('100%')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollDragSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollDragSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..01bf70bf1e556d5aa3cfdceb1059c66c9c878383
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollDragSample.ets
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ scroller: Scroller = new Scroller();
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('Scroll Drag')
+ .id(this.buttonName)
+ .margin('5vp')
+ }.width('100%')
+
+ Scroll(this.scroller) {
+ Column() {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .scrollable(ScrollDirection.Vertical)
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1)
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1)
+ }
+ })
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollEdgeEffectSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollEdgeEffectSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b09eb18210712596a57d059901c1ea5abb794ea8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollEdgeEffectSample.ets
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ scroller: Scroller = new Scroller();
+ edgeEffect: EdgeEffect = EdgeEffect.Spring;
+ @State initEdgeEffect: EdgeEffect = EdgeEffect.Spring;
+ isToEnd: boolean = false;
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ this.edgeEffect = Number((router.getParams() as Record)['text']);
+ this.initEdgeEffect = Number((router.getParams() as Record)['text']) + 1;
+ if (this.initEdgeEffect == 3) {
+ this.initEdgeEffect = 0;
+ }
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('Scroll EdgeEffect')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.initEdgeEffect = this.edgeEffect
+ this.scroller.scrollEdge(Edge.End)
+ })
+ }.width('100%')
+
+
+ Scroll(this.scroller) {
+ Column() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.edgeEffect === this.initEdgeEffect && this.timeHelper.printTime(true, 1)) {
+ }
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ if (this.edgeEffect === this.initEdgeEffect && this.timeHelper.printTime(false, 1)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ }
+ .scrollable(ScrollDirection.Vertical)
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+ .edgeEffect(this.initEdgeEffect)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollEnableScrollInteractionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollEnableScrollInteractionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5cbddebfe696db45e6d71729af476f26aa18fd4c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollEnableScrollInteractionSample.ets
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity';
+import { TimeHelper } from '../../../util/TimeHelper';
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ scroller: Scroller = new Scroller();
+ @State changeValue: boolean = false;
+ initBoolean: boolean = false;
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.changeValue = (router.getParams() as Record)['text'] == 'true';
+ this.initBoolean = this.changeValue;
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change enableScrollInteraction:' + this.changeValue)
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.changeValue = !this.changeValue;
+ this.scroller.scrollBy(200, 200);
+ })
+ }.width('100%')
+
+
+ Scroll(this.scroller) {
+ Column() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.initBoolean !== this.changeValue && this.timeHelper.printTime(true, 1)) {
+ }
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ if (this.initBoolean !== this.changeValue && this.timeHelper.printTime(false, 1)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .scrollable(ScrollDirection.Vertical)
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+ .enableScrollInteraction(this.changeValue)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ed4936123a5363f9cc53ec96a40e1defab932b64
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollHeightSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ @State changeValue: number = 300;
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change height 300 to 400')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.changeValue = 400;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.changeValue !== 300 && this.timeHelper.printTime(true)) {
+ }
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ Scroll().height(this.changeValue)
+ if (this.changeValue !== 300 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..802c206bf2c2dc1a034f1e5525db95743dea5b8b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollHome.ets
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+import { ScrollUrlClass, UrlClass } from '../../../util/UrlConstant';
+
+
+@Entry
+@Component
+struct ScrollHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ScrollBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ ForEach(ScrollUrlClass, (item: UrlClass) => {
+ CommonButton({ buttonName: item.buttonName, buttonUrl: item.buttonUrl, data: item.data })
+ })
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1129d1bdbf984ed77cc866997bee0a39368b2bad
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollMarginSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ @State changeValue: number = 20;
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change margin 20 to 30')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.changeValue = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.changeValue !== 20 && this.timeHelper.printTime(true)) {
+ }
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ Scroll().margin(this.changeValue)
+ if (this.changeValue !== 20 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..707d09f82d473716029a569ea5964b5d0cde7504
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollPaddingSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ @State changeValue: number = 20;
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change padding 20 to 30')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.changeValue = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.changeValue !== 20 && this.timeHelper.printTime(true)) {
+ }
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ Scroll().padding(this.changeValue)
+ if (this.changeValue !== 20 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollBySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollBySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5c68d8b5b5ff7313ff7b6d846151ddb854682d8b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollBySample.ets
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ scroller: Scroller = new Scroller();
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('ScrollBy')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.timeHelper.printTime(true, 1)
+ this.scroller.scrollBy(200, 200);
+ this.timeHelper.printTime(false, 1)
+ })
+ }.width('100%')
+
+
+ Scroll(this.scroller) {
+ Column() {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .scrollable(ScrollDirection.Vertical)
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollEdgeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollEdgeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..faad55c7fbdd812a22d6769a7f220a2aeb8426ea
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollEdgeSample.ets
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ scroller: Scroller = new Scroller();
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('Scroll Edge')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.scroller.scrollEdge(Edge.End);
+ })
+ }.width('100%')
+
+
+ Scroll(this.scroller) {
+ Column() {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .scrollable(ScrollDirection.Vertical)
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+ .onScrollEdge((side: Edge) => {
+ this.timeHelper.printTime(true, 1);
+ })
+ .onScrollStop(() => {
+ this.timeHelper.printTime(false, 1);
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollToSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollToSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3a42a644d8dda37a5337fccbbadcb629fbb82d3b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollScrollToSample.ets
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ scroller: Scroller = new Scroller();
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('Scroll to')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ const yOffset: number = this.scroller.currentOffset().yOffset;
+ this.timeHelper.printTime(true, 1);
+ this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 1000 });
+ this.timeHelper.printTime(false, 1);
+ })
+ }.width('100%')
+
+
+ Scroll(this.scroller) {
+ Column() {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .scrollable(ScrollDirection.Vertical)
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollSlippageSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollSlippageSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..557041cf5d916951386cd6c27c258bd3423b9d4f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollSlippageSample.ets
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ scroller: Scroller = new Scroller();
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('Scroll Slippage')
+ .id(this.buttonName)
+ .margin('5vp')
+ }.width('100%')
+
+
+ Scroll(this.scroller) {
+ Column() {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ Column()
+ .width('100%')
+ .height(20)
+ .margin(5)
+ .backgroundColor(Color.Blue)
+ }, (item: number) => JSON.stringify(item))
+ }
+ }
+ .scrollable(ScrollDirection.Vertical)
+ .width('100%')
+ .height('100%')
+ .backgroundColor(Color.Red)
+ .onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3ea3e168a3e9c92a8035d7ac50e419363104799d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/scroll/ScrollWidthSample.ets
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct Sample {
+ timeHelper: TimeHelper = new TimeHelper('Sample');
+ buttonName: string = '';
+ @State changeValue: string = '80%';
+
+ aboutToAppear() {
+ this.buttonName = (router.getParams() as Record)['buttonName'];
+ this.timeHelper = new TimeHelper(this.buttonName + 'Sample');
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change width 80% to 100%')
+ .id(this.buttonName)
+ .margin('5vp')
+ .onClick(() => {
+ this.changeValue = '100%';
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.changeValue !== '80%' && this.timeHelper.printTime(true)) {
+ }
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ Scroll()
+ .width(this.changeValue)
+ .height('100%')
+ .backgroundColor(Color.Blue)
+ if (this.changeValue !== '80%' && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerAutoHideSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerAutoHideSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f7a771c328252e91f52430f303038abf99fcae8a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerAutoHideSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件autoHide属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerAutoHideSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerAutoHideSample');
+ @State sideBarContainerAutoHide: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change autoHide')
+ .id('change autoHide')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerAutoHide = false;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerAutoHide != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ SideBarContainer().autoHide(this.sideBarContainerAutoHide)
+ if (this.sideBarContainerAutoHide != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerControlButtonSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerControlButtonSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a9b353fa86f240a703c458e45531e1c2888f3f6a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerControlButtonSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件controlButton属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerControlButtonSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerControlButtonSample');
+ @State sideBarContainerControlButton: ButtonStyle = {};
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change controlButton')
+ .id('change controlButton')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerControlButton = { left: 20, top: 20, width: 30, height: 20 };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerControlButton != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ SideBarContainer().controlButton(this.sideBarContainerControlButton)
+ if (this.sideBarContainerControlButton != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b5106a58c84877cb64345c2f797772024a4ca0e8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ SideBarContainer()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDividerSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDividerSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7746a2e84a31f19d287d9637476e96fed3422155
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDividerSample.ets
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件divider属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerDividerSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerDividerSample');
+ @State sideBarContainerDivider: DividerStyle | null = null;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change divider')
+ .id('change divider')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerDivider = {
+ strokeWidth: '1vp',
+ color: Color.Gray,
+ startMargin: '4vp',
+ endMargin: '4vp'
+ };
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerDivider != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ SideBarContainer().divider(this.sideBarContainerDivider)
+ if (this.sideBarContainerDivider != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDragContentSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDragContentSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..910d1b04a8e493cae0cfe6daaf7b446bef6764b3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDragContentSample.ets
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 拖拽内容区更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerDragContentSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerDragContentSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDragSideBarSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDragSideBarSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..32a180b66f3d9758c4ad2e6dabc8adc469a1e7c5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerDragSideBarSample.ets
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 拖拽侧边栏更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerDragSideBarSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerDragSideBarSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ SideBarContainer() {
+ Text('sidebar').backgroundColor(Color.Gray)
+ Text('content').backgroundColor(Color.White)
+ }
+ .sideBarWidth(200)
+ .minSideBarWidth(0)
+ .maxSideBarWidth(400)
+ .minContentWidth(0)
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2234b5b40d9f75ee9e0838d389a62e257f2473ec
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerHeightSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerHeightSample');
+ @State sideBarContainerHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerHeight != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ SideBarContainer().height(this.sideBarContainerHeight)
+ if (this.sideBarContainerHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..58da83eb64c4f3ab31c5fc06807cf3cf774cd1bc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerHome.ets
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct SideBarContainerHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('SideBarContainerHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'SideBarContainerCreateSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerCreateSample' });
+ CommonButton({ buttonName: 'SideBarContainerWidthSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerWidthSample' });
+ CommonButton({ buttonName: 'SideBarContainerHeightSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerHeightSample' });
+ CommonButton({ buttonName: 'SideBarContainerPaddingSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerPaddingSample' });
+ CommonButton({ buttonName: 'SideBarContainerMarginSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerMarginSample' });
+ CommonButton({ buttonName: 'SideBarContainerShowSideBarSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerShowSideBarSample' });
+ CommonButton({ buttonName: 'SideBarContainerControlButtonSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerControlButtonSample' });
+ CommonButton({ buttonName: 'SideBarContainerShowControlButtonSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerShowControlButtonSample' });
+ CommonButton({ buttonName: 'SideBarContainerSideBarWidthSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerSideBarWidthSample' });
+ CommonButton({ buttonName: 'SideBarContainerAutoHideSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerAutoHideSample' });
+ CommonButton({ buttonName: 'SideBarContainerSideBarPositionSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerSideBarPositionSample' });
+ CommonButton({ buttonName: 'SideBarContainerDividerSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerDividerSample' });
+ CommonButton({ buttonName: 'SideBarContainerMinContentWidthSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerMinContentWidthSample' });
+ CommonButton({ buttonName: 'SideBarContainerMinSideBarWidthSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerMinSideBarWidthSample' });
+ CommonButton({ buttonName: 'SideBarContainerMaxSideBarWidthSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerMaxSideBarWidthSample' });
+ CommonButton({ buttonName: 'SideBarContainerDragSideBarSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerDragSideBarSample' });
+ CommonButton({ buttonName: 'SideBarContainerDragContentSample', buttonUrl: 'pages/container/sideBarContainer/SideBarContainerDragContentSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f29c16790df7fec8a25cd84f48857c21fefba6b0
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMarginSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerMarginSample');
+ @State sideBarContainerMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerMargin != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ SideBarContainer().margin(this.sideBarContainerMargin)
+ if (this.sideBarContainerMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMaxSideBarWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMaxSideBarWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..21b8f6ea09cc4464020039236a6e7e9865a08128
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMaxSideBarWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件maxSideBarWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerMaxSideBarWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerMaxSideBarWidthSample');
+ @State sideBarContainerMaxSideBarWidth: number = 280;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change maxSideBarWidth')
+ .id('change maxSideBarWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerMaxSideBarWidth = 300;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerMaxSideBarWidth != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMaxSideBarWidth)
+ if (this.sideBarContainerMaxSideBarWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMinContentWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMinContentWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5c263fa6101153dffbf556c771d45239cb6bed5d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMinContentWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件minContentWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerMinContentWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerMinContentWidthSample');
+ @State sideBarContainerMinContentWidth: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change minContentWidth')
+ .id('change minContentWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerMinContentWidth = 100;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerMinContentWidth != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ SideBarContainer().minContentWidth(this.sideBarContainerMinContentWidth)
+ if (this.sideBarContainerMinContentWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMinSideBarWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMinSideBarWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9d0c48c7c6a12b5d76d1b7234758d8b664984eb4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerMinSideBarWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件minSideBarWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerMinSideBarWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerMinSideBarWidthSample');
+ @State sideBarContainerMinSideBarWidth: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change minSideBarWidth')
+ .id('change minSideBarWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerMinSideBarWidth = 100;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerMinSideBarWidth != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ SideBarContainer().minSideBarWidth(this.sideBarContainerMinSideBarWidth)
+ if (this.sideBarContainerMinSideBarWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4975710ee53b57fab486e05cc72319b16cc8b0e5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerPaddingSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerPaddingSample');
+ @State sideBarContainerPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerPadding != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ SideBarContainer().padding(this.sideBarContainerPadding)
+ if (this.sideBarContainerPadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerShowControlButtonSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerShowControlButtonSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5a779b6db93a3c2fa012507ed6e26819fd2d1a29
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerShowControlButtonSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件showControlButton属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerShowControlButtonSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerShowControlButtonSample');
+ @State sideBarContainerShowControlButton: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change showControlButton')
+ .id('change showControlButton')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerShowControlButton = false;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerShowControlButton != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ SideBarContainer().showControlButton(this.sideBarContainerShowControlButton)
+ if (this.sideBarContainerShowControlButton != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerShowSideBarSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerShowSideBarSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..783881757d5979b833bcf538e9e21e60c8a6c499
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerShowSideBarSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件showSideBar属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerShowSideBarSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerShowSideBarSample');
+ @State sideBarContainerShowSideBar: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change showSideBar')
+ .id('change showSideBar')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerShowSideBar = false;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerShowSideBar != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ SideBarContainer().showSideBar(this.sideBarContainerShowSideBar)
+ if (this.sideBarContainerShowSideBar != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerSideBarPositionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerSideBarPositionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..be8f16b081f6fec8e7c12bf7f4a08ebc89f8dd7d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerSideBarPositionSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件sideBarPosition属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerSideBarPositionSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerSideBarPositionSample');
+ @State sideBarContainerSideBarPosition: SideBarPosition = SideBarPosition.Start;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change sideBarPosition')
+ .id('change sideBarPosition')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerSideBarPosition = SideBarPosition.End;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerSideBarPosition != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ SideBarContainer().sideBarPosition(this.sideBarContainerSideBarPosition)
+ if (this.sideBarContainerSideBarPosition != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerSideBarWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerSideBarWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..00a20c0c2cfccf6eb23d238216ee6ad7093650d5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerSideBarWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件sideBarWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerSideBarWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerSideBarWidthSample');
+ @State sideBarContainerSideBarWidth: number = 300;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change sideBarWidth')
+ .id('change sideBarWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerSideBarWidth = 400;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerSideBarWidth != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ SideBarContainer().sideBarWidth(this.sideBarContainerSideBarWidth)
+ if (this.sideBarContainerSideBarWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..480e79d9cab7f757700404809bfd33c68bc3ec4e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/sideBarContainer/SideBarContainerWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SideBarContainer组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SideBarContainerWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SideBarContainerWidthSample');
+ @State sideBarContainerWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.sideBarContainerWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.sideBarContainerWidth != null && this.timeHelper.printTime(true)) {
+ }
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ SideBarContainer().width(this.sideBarContainerWidth)
+ if (this.sideBarContainerWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperControllerShowNextSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperControllerShowNextSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fa010dd97a83f13a6ec5698f23bac3b0fe973217
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperControllerShowNextSample.ets
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SwiperController控制页面滑动布局
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperControllerShowNextSample {
+ // timeHelper: TimeHelper = new TimeHelper('SwiperControllerShowNextSample');
+ private swiperController: SwiperController = new SwiperController();
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('swiperController showNext')
+ .id('swiperController showNext')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperController.showNext();
+ })
+ }.width('100%')
+
+ // if (this.timeHelper.printTime(true)) {
+ // }
+
+ Swiper(this.swiperController) {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ })
+ }
+
+ // if (this.timeHelper.printTime(false)) {
+ // }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..76cc1a52534cc6ef7ba2887f26f6147728a28663
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ Swiper()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperCurveSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperCurveSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5cac20b6b9e87372114ea7d49ac9885ee61f6cf5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperCurveSample.ets
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件curve属性更新,滑动布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperCurveSample {
+ // timeHelper: TimeHelper = new TimeHelper('SwiperCurveSample');
+ @State curve: Curve = Curve.Friction;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Button('change curve to Linear')
+ .id('change curve to Linear')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.Linear;
+ })
+ Button('change curve to Ease')
+ .id('change curve to Ease')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.Ease;
+ })
+ Button('change curve to EaseIn')
+ .id('change curve to EaseIn')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.EaseIn;
+ })
+ Button('change curve to EaseOut')
+ .id('change curve to EaseOut')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.EaseOut;
+ })
+ Button('change curve to EaseInOut')
+ .id('change curve to EaseInOut')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.EaseInOut;
+ })
+ Button('change curve to FastOutSlowIn')
+ .id('change curve to FastOutSlowIn')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.FastOutSlowIn;
+ })
+ Button('change curve to LinearOutSlowIn')
+ .id('change curve to LinearOutSlowIn')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.LinearOutSlowIn;
+ })
+ Button('change curve to FastOutLinearIn')
+ .id('change curve to FastOutLinearIn')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.FastOutLinearIn;
+ })
+ Button('change curve to ExtremeDeceleration')
+ .id('change curve to ExtremeDeceleration')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.ExtremeDeceleration;
+ })
+ Button('change curve to Sharp')
+ .id('change curve to Sharp')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.Sharp;
+ })
+ Button('change curve to Rhythm')
+ .id('change curve to Rhythm')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.Rhythm;
+ })
+ Button('change curve to Smooth')
+ .id('change curve to Smooth')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.Smooth;
+ })
+ Button('change curve to Friction')
+ .id('change curve to Friction')
+ .margin('5vp')
+ .onClick(() => {
+ this.curve = Curve.Friction;
+ })
+
+ // if (this.curve != null && this.timeHelper.printTime(true)) {
+ // }
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+ Text("" + index).width('100%').height('30%')
+
+ })
+ }.curve(this.curve)
+
+ // if (this.curve != null && this.timeHelper.printTime(false)) {
+ // }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDisplayCountSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDisplayCountSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2f33598682128da2dae036f213577945643e6c22
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDisplayCountSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件displayCount属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperDisplayCountSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperDisplayCountSample');
+ @State displayCount: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change displayCount 1 to 3')
+ .id('change displayCount 1 to 3')
+ .margin('5vp')
+ .onClick(() => {
+ this.displayCount = 3;
+ })
+ }.width('100%')
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.displayCount != null && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ if (this.displayCount != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.displayCount(this.displayCount)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDisplayModeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDisplayModeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7df4dd0ab3eed47048a6eec69e557c7698f2f86d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDisplayModeSample.ets
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件displayMode属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperDisplayModeSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperDisplayModeSample');
+ @State displayMode: number = SwiperDisplayMode.AUTO_LINEAR;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change displayMode to STRETCH')
+ .id('change displayMode to STRETCH')
+ .margin('5vp')
+ .onClick(() => {
+ this.displayMode = SwiperDisplayMode.STRETCH;
+ })
+ Button('change displayMode to AUTO_LINEAR')
+ .id('change displayMode to AUTO_LINEAR')
+ .margin('5vp')
+ .onClick(() => {
+ this.displayMode = SwiperDisplayMode.AUTO_LINEAR;
+ })
+ }.width('100%')
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.displayMode != null && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ if (this.displayMode != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.displayMode(this.displayMode)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDurationSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDurationSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..88107ad54003ae76b20d70caeee909f68b381396
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperDurationSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件duration属性更新滑动布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperDurationSample {
+ // timeHelper: TimeHelper = new TimeHelper('SwiperDurationSample');
+ @State duration: number = 200;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change duration 200 to 500')
+ .id('change duration 200 to 500')
+ .margin('5vp')
+ .onClick(() => {
+ this.duration = 500;
+ })
+ }.width('100%')
+
+ // if (this.duration != null && this.timeHelper.printTime(true)) {
+ // }
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ })
+ }.duration(this.duration)
+
+ // if (this.duration != null && this.timeHelper.printTime(false)) {
+ // }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperEffectModeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperEffectModeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..83c7083285ff6b5f9f8fbf04a3339fbf276fe8fc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperEffectModeSample.ets
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件边缘滑动页面布局
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperEffectModeSample {
+ // timeHelper: TimeHelper = new TimeHelper('SwiperEffectModeSample');
+ @State effectMode: EdgeEffect = EdgeEffect.None;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change effectMode to Spring')
+ .id('change effectMode to Spring')
+ .margin('5vp')
+ .onClick(() => {
+ this.effectMode = EdgeEffect.Spring;
+ })
+ Button('change effectMode to Fade')
+ .id('change effectMode to Fade')
+ .margin('5vp')
+ .onClick(() => {
+ this.effectMode = EdgeEffect.Fade;
+ })
+ Button('change effectMode to None')
+ .id('change effectMode to None')
+ .margin('5vp')
+ .onClick(() => {
+ this.effectMode = EdgeEffect.None;
+ })
+ }.width('100%')
+
+ // if (this.effectMode != null && this.timeHelper.printTime(true)) {
+ // }
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ })
+ }
+ .loop(false)
+ .effectMode(this.effectMode)
+
+
+ // if (this.effectMode != null && this.timeHelper.printTime(false)) {
+ // }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..40c052740a20c1e7f854c1aad7f97751e4f5a4b3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperHeightSample.ets
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperHeightSample');
+ @State swiperHeight: number = 300;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 300 to 400')
+ .id('change height 300 to 400')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperHeight = 400;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.swiperHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+ Swiper().height(this.swiperHeight)
+
+ if (this.swiperHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..16273b6d824985e92065959944523dfe4197d283
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperHome.ets
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct SwiperHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('SwipeBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'SwiperCreateSample', buttonUrl: 'pages/container/swiper/SwiperCreateSample' });
+ CommonButton({ buttonName: 'SwiperWidthSample', buttonUrl: 'pages/container/swiper/SwiperWidthSample' });
+ CommonButton({ buttonName: 'SwiperHeightSample', buttonUrl: 'pages/container/swiper/SwiperHeightSample' });
+ CommonButton({ buttonName: 'SwiperPaddingSample', buttonUrl: 'pages/container/swiper/SwiperPaddingSample' });
+ CommonButton({ buttonName: 'SwiperMarginSample', buttonUrl: 'pages/container/swiper/SwiperMarginSample' });
+ CommonButton({ buttonName: 'SwiperIndexSample', buttonUrl: 'pages/container/swiper/SwiperIndexSample' });
+ CommonButton({ buttonName: 'SwiperVerticalSample', buttonUrl: 'pages/container/swiper/SwiperVerticalSample' });
+ CommonButton({ buttonName: 'SwiperItemSpaceSample', buttonUrl: 'pages/container/swiper/SwiperItemSpaceSample' });
+ CommonButton({ buttonName: 'SwiperDisplayModeSample', buttonUrl: 'pages/container/swiper/SwiperDisplayModeSample' });
+ CommonButton({ buttonName: 'SwiperDisplayCountSample', buttonUrl: 'pages/container/swiper/SwiperDisplayCountSample' });
+ CommonButton({ buttonName: 'SwiperNextMarginSample', buttonUrl: 'pages/container/swiper/SwiperNextMarginSample' });
+ CommonButton({ buttonName: 'SwiperPrevMarginSample', buttonUrl: 'pages/container/swiper/SwiperPrevMarginSample' });
+ CommonButton({ buttonName: 'SwiperCurveSample', buttonUrl: 'pages/container/swiper/SwiperCurveSample' });
+ CommonButton({ buttonName: 'SwiperControllerShowNextSample', buttonUrl: 'pages/container/swiper/SwiperControllerShowNextSample' });
+ CommonButton({ buttonName: 'SwiperManualSlidingSample', buttonUrl: 'pages/container/swiper/SwiperManualSlidingSample' });
+ CommonButton({ buttonName: 'SwiperLoopSample', buttonUrl: 'pages/container/swiper/SwiperLoopSample' });
+ CommonButton({ buttonName: 'SwiperEffectModeSample', buttonUrl: 'pages/container/swiper/SwiperEffectModeSample' });
+ CommonButton({ buttonName: 'SwiperDurationSample', buttonUrl: 'pages/container/swiper/SwiperDurationSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperIndexSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperIndexSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1eb47c207bf0c65751f8f3f346f3fb1b18484190
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperIndexSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件index属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperIndexSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperIndexSample');
+ @State swiperIndex: number = 5;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change index 5 to 20')
+ .id('change index 5 to 20')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperIndex = 20;
+ })
+ }.width('100%')
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.swiperIndex != null && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ if (this.swiperIndex != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.index(this.swiperIndex)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperItemSpaceSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperItemSpaceSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bf99bea324e76dfdf16dae1fd0672019f6222a15
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperItemSpaceSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件itemSpace属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperItemSpaceSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperItemSpaceSample');
+ @State swiperItemSpace: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change itemSpace 0 to 20')
+ .id('change itemSpace 0 to 20')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperItemSpace = 20;
+ })
+ }.width('100%')
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.swiperItemSpace != null && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ if (this.swiperItemSpace != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.itemSpace(this.swiperItemSpace)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperLoopSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperLoopSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..93f9ee26de7dddd398ab29b74e58cf521253bed4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperLoopSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件自动轮播页面滑动布局
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperLoopSample {
+ // timeHelper: TimeHelper = new TimeHelper('SwiperLoopSample');
+ @State loop: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change loop false to true')
+ .id('change loop false to true')
+ .margin('5vp')
+ .onClick(() => {
+ this.loop = true;
+ })
+ }.width('100%')
+
+ // if (this.loop != null && this.timeHelper.printTime(true)) {
+ // }
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ })
+ }.loop(this.loop)
+
+ // if (this.loop != null && this.timeHelper.printTime(false)) {
+ // }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperManualSlidingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperManualSlidingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7d3f7a161d487c206a876b8d4a36eb26ac7cb824
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperManualSlidingSample.ets
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 手指滑动页面布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperManualSlidingSample {
+ // timeHelper: TimeHelper = new TimeHelper('SwiperManualSlidingSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ // if (this.timeHelper.printTime(true)) {
+ // }
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ })
+ }
+
+ // if (this.timeHelper.printTime(false)) {
+ // }
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3371ffea360a48aa67a1dce7105bb224bfff5355
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperMarginSample');
+ @State swiperMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.swiperMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+ Swiper().margin(this.swiperMargin)
+
+ if (this.swiperMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperNextMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperNextMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..81b6b8a7dd89590e78fbe59fdfb61af72f6e6e26
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperNextMarginSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件nextMargin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperNextMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperNextMarginSample');
+ @State nextMargin: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change nextMargin 0 to 20')
+ .id('change nextMargin 0 to 20')
+ .margin('5vp')
+ .onClick(() => {
+ this.nextMargin = 20;
+ })
+ }.width('100%')
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.nextMargin != null && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ if (this.nextMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.nextMargin(this.nextMargin)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a6540f576f071ae88be7fb07064435deef76e0c1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperPaddingSample');
+ @State swiperPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.swiperPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+ Swiper().padding(this.swiperPadding)
+
+ if (this.swiperPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperPrevMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperPrevMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..dcc46370726f3e95c75c42e6413cf700da7a65c6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperPrevMarginSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件prevMargin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperPrevMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperPrevMarginSample');
+ @State prevMargin: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change prevMargin 0 to 20')
+ .id('change prevMargin 0 to 20')
+ .margin('5vp')
+ .onClick(() => {
+ this.prevMargin = 20;
+ })
+ }.width('100%')
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.prevMargin != null && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ if (this.prevMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.prevMargin(this.prevMargin)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperVerticalSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperVerticalSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f77a2c32ae5ef15e9460f26c396a8a7de772bf4f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperVerticalSample.ets
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件vertical属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperVerticalSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperVerticalSample');
+ @State swiperVertical: boolean = false;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Vertical false to true')
+ .id('change Vertical false to true')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperVertical = true;
+ })
+ }.width('100%')
+
+ Swiper() {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.swiperVertical && this.timeHelper.printTime(true)) {
+ }
+
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+ Text("" + index).width('100%').height('80%')
+
+ if (this.swiperVertical != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }.vertical(this.swiperVertical)
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..eb6966f1d8ea118051f79fd572a76cf01286049d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/swiper/SwiperWidthSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Swiper组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct SwiperWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('SwiperWidthSample');
+ @State swiperWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 80% to 100%')
+ .id('change width 80% to 100%')
+ .margin('5vp')
+ .onClick(() => {
+ this.swiperWidth = '100%';
+ })
+ }.width('100%').height(120)
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.swiperWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+ Swiper().width(this.swiperWidth)
+
+ if (this.swiperWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cd2df2cbc6e6a24396d19af08e36c16a39fa9dcf
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarHeightSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsBarHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsBarHeightSample');
+ @State barHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change barHeight 100 to 200')
+ .id('TabChangeBarHeight')
+ .margin('15vp')
+ .onClick(() => {
+ this.barHeight = 200;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.barHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ Tabs().barHeight(this.barHeight)
+ if (this.barHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarModeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarModeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..536d54dbd46ad7c4b292761a84cb98edd2124acb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarModeSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsBarModeSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsBarModeSample');
+ @State tabsBarMode: BarMode = BarMode.Scrollable;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change BarMode')
+ .id('TabsChangeTabsBarMode')
+ .margin('5vp')
+ .onClick(() => {
+ this.tabsBarMode = BarMode.Fixed;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.tabsBarMode == BarMode.Fixed && this.timeHelper.printTime(true)) {
+ }
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ Tabs().barMode(this.tabsBarMode)
+ if (this.tabsBarMode == BarMode.Fixed && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarPositionSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarPositionSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b207e900a9b6e42c67ca0a097a397e3285254845
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarPositionSample.ets
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsBarPositionSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsBarPositionSample');
+ @State barPosition: BarPosition = BarPosition.Start;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change BarPosition')
+ .id('TabsChangeBarPosition')
+ .margin('5vp')
+ .onClick(() => {
+ this.barPosition = BarPosition.End;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.barPosition == BarPosition.End && this.timeHelper.printTime(true)) {
+ }
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ Tabs()
+ .vertical(true)
+ .barPosition(this.barPosition)
+ if (this.barPosition == BarPosition.End && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d25b726bca0b99fc691b69dc0b6befabe46ce101
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsBarWidthSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsBarWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsBarWidthSample');
+ @State barWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change barwidth 100 to 200')
+ .id('TabChangeBarWidth')
+ .margin('15vp')
+ .onClick(() => {
+ this.barWidth = 200;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.barWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ Tabs().barWidth(this.barWidth)
+ if (this.barWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsClickTabSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsClickTabSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..535306bd5c9efc6a3e66779025b49a730fe4941e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsClickTabSample.ets
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsClickTabSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsClickTabSample');
+ @State index: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Table')
+ .id('TabsChangeIndex')
+ .margin('5vp')
+ .onClick(() => {
+ this.index = 2;
+ })
+ }.width('100%')
+
+
+ Tabs({ index: this.index }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.index == 2 && this.timeHelper.printTime(true)) {
+ }
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('Pink')
+ if (this.index == 2 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+ }
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1d727b6fcf1fc2c17cffc29b48bad9b71e4e39c9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsCreateSample.ets
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ Tabs();
+ if (this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsDividerSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsDividerSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0f4cff76dd1237fb460cd2600af65978a23b82ff
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsDividerSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsDividerSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsDividerSample');
+ @State tabsDivider: number = 10;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change divider')
+ .id('TabsChangeDivider')
+ .margin('5vp')
+ .onClick(() => {
+ this.tabsDivider = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.tabsDivider == 30 && this.timeHelper.printTime(true)) {
+ }
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ Tabs().divider({ strokeWidth:this.tabsDivider })
+ if (this.tabsDivider == 30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsDragSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsDragSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e129107911344ebe742fa49c633f51d81198b438
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsDragSample.ets
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsDragSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsDragSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Tabs() {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+
+ }, (item: number) => JSON.stringify(item))
+
+ }.onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ .onDragEnd(() => {
+ this.timeHelper.printTime(false, 1);
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsFlingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsFlingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..609ab938399bc7a32539dc47b4a43ff807a3f70d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsFlingSample.ets
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsFlingSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsFlingSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ Tabs() {
+ ForEach(ArrEntity.arr, (index: number) => {
+
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+ TabContent() {
+ Column().width('100%').height('100%').backgroundColor(Color.Pink)
+ }.tabBar('pink')
+
+ }, (item: number) => JSON.stringify(item))
+
+ }.onTouch((event: TouchEvent) => {
+ if (event.type == TouchType.Down) {
+ this.timeHelper.printTime(true, 1);
+ }
+ if (event.type == TouchType.Up) {
+ this.timeHelper.printTime(false, 1);
+ }
+ })
+ .onDragEnd(() => {
+ this.timeHelper.printTime(false, 1);
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..96d500165f92ea4bfba7af8a9a93d85f7ed9ca98
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsHeightSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsHeightSample');
+ @State tabsHeight: number = 300;
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change Height 300 to 400')
+ .id('TabsChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.tabsHeight = 400;
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.tabsHeight ==400 && this.timeHelper.printTime(true)) {
+ }
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ Tabs().height(this.tabsHeight)
+ if (this.tabsHeight ==400 && this.timeHelper.printTime(false)) {
+ }
+
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..701d86e601f8a6ce3c45111facb74058aaa37b90
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsHome.ets
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton';
+
+@Entry
+@Component
+struct TabsHome {
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('TabsBenchmark')
+ .padding('10vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({buttonName:'TabsCreate',buttonUrl:'pages/container/tabs/TabsCreateSample'});
+ CommonButton({buttonName:'TabsWidth',buttonUrl:'pages/container/tabs/TabsWidthSample'});
+ CommonButton({buttonName:'TabsHeight',buttonUrl:'pages/container/tabs/TabsHeightSample'});
+ CommonButton({buttonName:'TabsPadding',buttonUrl:'pages/container/tabs/TabsPaddingSample'});
+ CommonButton({buttonName:'TabsMargin',buttonUrl:'pages/container/tabs/TabsMarginSample'});
+ CommonButton({buttonName:'TabsVertical',buttonUrl:'pages/container/tabs/TabsVerticalSample'});
+ CommonButton({buttonName:'TabsBarMode',buttonUrl:'pages/container/tabs/TabsBarModeSample'});
+ CommonButton({buttonName:'TabsDivider',buttonUrl:'pages/container/tabs/TabsDividerSample'});
+ CommonButton({buttonName:'TabsBarPosition',buttonUrl:'pages/container/tabs/TabsBarPositionSample'});
+ CommonButton({buttonName:'TabsIndex',buttonUrl:'pages/container/tabs/TabsIndexSample'});
+ CommonButton({buttonName:'TabsBarWidth',buttonUrl:'pages/container/tabs/TabsBarWidthSample'});
+ CommonButton({buttonName:'TabsBarHeight',buttonUrl:'pages/container/tabs/TabsBarHeightSample'});
+ CommonButton({buttonName:'TabsFling',buttonUrl:'pages/container/tabs/TabsFlingSample'});
+ CommonButton({buttonName:'TabsDrag',buttonUrl:'pages/container/tabs/TabsDragSample'});
+ CommonButton({buttonName:'TabsClickTab',buttonUrl:'pages/container/tabs/TabsClickTabSample'});
+
+ }
+ .padding('10vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsIndexSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsIndexSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8879e4848ac9f27850cccba209793cbf7e9204ae
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsIndexSample.ets
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsIndexSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsIndexSample');
+ @State index: number = 0;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Index')
+ .id('TabsChangeIndex')
+ .margin('5vp')
+ .onClick(() => {
+ this.index = 2;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.index == 2 && this.timeHelper.printTime(true)) {
+ }
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ Tabs({index:this.index})
+ if (this.index == 2 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e39f2bcf056b092e2457a7d31306d3faaf187ac8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsMarginSample');
+ @State tabsMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Margin 20 to 30')
+ .id('TabsChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.tabsMargin = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.tabsMargin ==30 && this.timeHelper.printTime(true)) {
+ }
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ Tabs().margin(this.tabsMargin)
+ if (this.tabsMargin ==30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8f91fa6a81f82a30084fecc2f446eab5a0e7b05e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsPaddingSample.ets
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsPaddingSample');
+ @State tabsPadding: number = 20;
+ @State textStr: string = '';
+
+ aboutToAppear() {
+ this.textStr = (router.getParams() as Record)['text'] as string;
+ }
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Padding 20 to 30')
+ .id('TabsChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.tabsPadding = 30;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.tabsPadding ==30 && this.timeHelper.printTime(true)) {
+ }
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ Tabs().padding(this.tabsPadding)
+ if (this.tabsPadding ==30 && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsVerticalSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsVerticalSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ae4f76ab4b85fd9bc99ef0dbdab8d84a538b78ad
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsVerticalSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsVerticalSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsVerticalSample');
+ @State tabsVertical: boolean = true;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Row() {
+ Button('change Vertical')
+ .id('TabsChangeVertical')
+ .margin('5vp')
+ .onClick(() => {
+ this.tabsVertical = false;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.tabsVertical == false && this.timeHelper.printTime(true)) {
+ }
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ Tabs().vertical(this.tabsVertical)
+ if (this.tabsVertical == false && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f3d996b51200e71dcfcdccdd7ca928504198e38e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/container/tabs/TabsWidthSample.ets
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct TabsWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('TabsWidthSample');
+ @State tabsWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Column() {
+ Button('change width 80% to 100%')
+ .id('TabChangeWidth')
+ .margin('15vp')
+ .onClick(() => {
+ this.tabsWidth = '100%';
+ })
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.tabsWidth == '100%' && this.timeHelper.printTime(true)) {
+ }
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ Tabs().width(this.tabsWidth)
+ if (this.tabsWidth == '100%' && this.timeHelper.printTime(false)) {
+ }
+ }, (item: number) => JSON.stringify(item))
+
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4cbcbe41307e01c19ffd37ac9c3d7856cece1254
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ Circle()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleFillOpacitySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleFillOpacitySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2e8be62584d5ea71d1d0014eab8762ad5fbbc9b8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleFillOpacitySample.ets
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件fillOpacity属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleFillOpacitySample {
+ timeHelper: TimeHelper = new TimeHelper('CircleFillOpacitySample');
+ @State circleFillOpacity: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change fillOpacity')
+ .id('change fillOpacity')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleFillOpacity = 0;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleFillOpacity != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.circleFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ if (this.circleFillOpacity != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleFillSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleFillSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8a9a1fd69761506978e77519943572b7f64090f4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleFillSample.ets
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件fill属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+
+@Entry
+@Component
+struct CircleFillSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleFillSample');
+ @State circleFill: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change fill')
+ .id('change fill')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleFill = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleFill != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fill(this.circleFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+
+
+ if (this.circleFill != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d3a209ca3760ca83321c3c689cdbcc6280fbb66c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleHeightSample.ets
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleHeightSample');
+ @State circleHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(this.circleHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ if (this.circleHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8e0e5ca30c601501338041b65d1c28fbdad35c7f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleHome.ets
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct CircleHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('CircleHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'CircleCreateSample', buttonUrl: 'pages/other/circle/CircleCreateSample' });
+ CommonButton({ buttonName: 'CircleFillSample', buttonUrl: 'pages/other/circle/CircleFillSample' });
+ CommonButton({ buttonName: 'CircleFillOpacitySample', buttonUrl: 'pages/other/circle/CircleFillOpacitySample' });
+ CommonButton({ buttonName: 'CircleStrokeSample', buttonUrl: 'pages/other/circle/CircleStrokeSample' });
+ CommonButton({ buttonName: 'CircleStrokeDashArraySample', buttonUrl: 'pages/other/circle/CircleStrokeDashArraySample' });
+ CommonButton({ buttonName: 'CircleStrokeDashOffsetSample', buttonUrl: 'pages/other/circle/CircleStrokeDashOffsetSample' });
+ CommonButton({ buttonName: 'CircleStrokeWidthSample', buttonUrl: 'pages/other/circle/CircleStrokeWidthSample' });
+ CommonButton({ buttonName: 'CircleWidthSample', buttonUrl: 'pages/other/circle/CircleWidthSample' });
+ CommonButton({ buttonName: 'CircleHeightSample', buttonUrl: 'pages/other/circle/CircleHeightSample' });
+ CommonButton({ buttonName: 'CirclePaddingSample', buttonUrl: 'pages/other/circle/CirclePaddingSample' });
+ CommonButton({ buttonName: 'CircleMarginSample', buttonUrl: 'pages/other/circle/CircleMarginSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5c4659e89c775dc17944fe1e02f7e3b28517eca4
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleMarginSample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleMarginSample');
+ @State circleMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .margin(this.circleMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ if (this.circleMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CirclePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CirclePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d601a43f6db86660c4e88967d16fbcf319c5ffe9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CirclePaddingSample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CirclePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('CirclePaddingSample');
+ @State circlePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.circlePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circlePadding != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .padding(this.circlePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ if (this.circlePadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeDashArraySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeDashArraySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2c89360a239273be045c200bfde8321d0b68803e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeDashArraySample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件strokeDashArray属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleStrokeDashArraySample {
+ timeHelper: TimeHelper = new TimeHelper('CircleStrokeDashArraySample');
+ @State circleStrokeDashArray: Array = [5];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeDashArray')
+ .id('change strokeDashArray')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleStrokeDashArray = [10];
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleStrokeDashArray != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.circleStrokeDashArray)
+ if (this.circleStrokeDashArray != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeDashOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeDashOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1bffbb8eb800a513c4a9cda737e19c27c43d697f
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeDashOffsetSample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件strokeDashOffset属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleStrokeDashOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleStrokeDashOffsetSample');
+ @State circleStrokeDashOffset: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeDashOffset')
+ .id('change strokeDashOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleStrokeDashOffset = -20;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleStrokeDashOffset != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(30)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.circleStrokeDashOffset)
+ if (this.circleStrokeDashOffset != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..326185005fb7a5f74287f8394675b430ce54e1e8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeSample.ets
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件stroke属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleStrokeSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleStrokeSample');
+ @State circleStroke: number = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change stroke')
+ .id('change stroke')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleStroke = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleStroke != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.circleStroke)
+ .strokeWidth(5)
+ if (this.circleStroke != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..56ddf8985f5e47dfb379dcbdf3adb94ca7baa686
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleStrokeWidthSample.ets
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件strokeWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleStrokeWidthSample');
+ @State circleStrokeWidth: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeWidth')
+ .id('change strokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleStrokeWidth = 5;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleStrokeWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ Circle()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.circleStrokeWidth)
+ if (this.circleStrokeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..30136267a0caa7208696605d13fbd0e7898efc35
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/circle/CircleWidthSample.ets
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Circle组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct CircleWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('CircleWidthSample');
+ @State circleWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.circleWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.circleWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ Circle()
+ .width(this.circleWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+
+ if (this.circleWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f12b91b416bcce44cc2a8227520421c696a69e7a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineCreateSample.ets
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('LineCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+ Line()
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineFillOpacitySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineFillOpacitySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8a054fcc90ebac4cded958f8afe370482cbe7872
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineFillOpacitySample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineFillOpacitySample {
+ timeHelper: TimeHelper = new TimeHelper('LineFillOpacitySample');
+ @State lineFillOpacity: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change FillOpacity')
+ .id('LineChangeFillOpacity')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineFillOpacity = 0;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineFillOpacity == 1 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+ Line().fillOpacity(this.lineFillOpacity)
+
+ if (this.lineFillOpacity == 1 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineFillSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineFillSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b2c12015bd70af45bc459569c61b118e70951fed
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineFillSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineFillSample {
+ timeHelper: TimeHelper = new TimeHelper('LineFillSample');
+ @State lineFill: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Fill')
+ .id('LineChangeFill')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineFill = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineFill == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+ Line().fill(this.lineFill)
+
+ if (this.lineFill == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bc41610e225b7c5b0e53a86b56cc26f03408f63a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineHeightSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('LineHeightSample');
+ @State lineHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Height')
+ .id('LineChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+ Line().height(this.lineHeight)
+
+ if (this.lineHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d48654c90372172f804be5a4ef892531e80a7e7d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineHome.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct LineHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('LineBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'LineCreate', buttonUrl: 'pages/other/line/LineCreateSample' });
+ CommonButton({ buttonName: 'LineFill', buttonUrl: 'pages/other/line/LineFillSample' });
+ CommonButton({ buttonName: 'LineFillOpacity', buttonUrl: 'pages/other/line/LineFillOpacitySample' });
+ CommonButton({ buttonName: 'LineStroke', buttonUrl: 'pages/other/line/LineStrokeSample' });
+ CommonButton({ buttonName: 'LineStrokeDashArray', buttonUrl: 'pages/other/line/LineStrokeDashArraySample' });
+ CommonButton({ buttonName: 'LineStrokeDashOffset', buttonUrl: 'pages/other/line/LineStrokeDashOffsetSample' });
+ CommonButton({ buttonName: 'LineStrokeWidth', buttonUrl: 'pages/other/line/LineStrokeWidthSample' });
+ CommonButton({ buttonName: 'LineWidth', buttonUrl: 'pages/other/line/LineWidthSample' });
+ CommonButton({ buttonName: 'LineHeight', buttonUrl: 'pages/other/line/LineHeightSample' });
+ CommonButton({ buttonName: 'LinePadding', buttonUrl: 'pages/other/line/LinePaddingSample' });
+ CommonButton({ buttonName: 'LineMargin', buttonUrl: 'pages/other/line/LineMarginSample' });
+
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6b78c0e8e4b714abde31b23a3ae94ea3aab4f028
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('LineMarginSample');
+ @State lineMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Margin')
+ .id('LineChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+ Line().margin(this.lineMargin)
+
+ if (this.lineMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LinePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LinePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4b63f1c3654d1ef17f0fbd324ef589b9ec9b687a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LinePaddingSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LinePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('LinePaddingSample');
+ @State linePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Padding')
+ .id('LineChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.linePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.linePadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+ Line().padding(this.linePadding)
+
+ if (this.linePadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeDashArraySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeDashArraySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d143445569fcd18bee302c1358435481026d9368
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeDashArraySample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineStrokeDashArraySample {
+ timeHelper: TimeHelper = new TimeHelper('LineStrokeDashArraySample');
+ @State shapeStrokeDashArray: number[] = [5];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeDashArray')
+ .id('LineChangeStrokeDashArray')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeStrokeDashArray[0]= 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeStrokeDashArray[0] == 10 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+ Line().strokeDashArray(this.shapeStrokeDashArray)
+
+ if (this.shapeStrokeDashArray[0] == 10 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeDashOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeDashOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..180c2a2c5eab0bebad00b2b227d0983c3220ae7a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeDashOffsetSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineStrokeDashOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('LineStrokeDashOffsetSample');
+ @State lineStrokeDashOffset: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeDashOffset')
+ .id('LineChangeStrokeDashOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineStrokeDashOffset = -20;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineStrokeDashOffset == -20 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+ Line().strokeDashOffset(this.lineStrokeDashOffset)
+
+ if (this.lineStrokeDashOffset == -20 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ad808b4c0cecdf01c97221709f820ebd9307d72d
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineStrokeSample {
+ timeHelper: TimeHelper = new TimeHelper('LineStrokeSample');
+ @State lineStroke: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Stroke')
+ .id('LineChangeStroke')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineStroke = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineStroke == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+ Line().stroke(this.lineStroke)
+
+ if (this.lineStroke == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ea8aa4522eb2f5ccfd9d49bbc08ce2d2bd4d069c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineStrokeWidthSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('LineStrokeWidthSample');
+ @State lineStrokeWidth: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeWidth')
+ .id('LineChangeStrokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineStrokeWidth = 5;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineStrokeWidth == 5 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+ Line().strokeWidth(this.lineStrokeWidth)
+
+ if (this.lineStrokeWidth == 5 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8b9f95174585345a85b012e33393bbc053c3c195
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/line/LineWidthSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct LineWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('LineWidthSample');
+ @State lineWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width')
+ .id('LineChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.lineWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.lineWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+ Line().width(this.lineWidth)
+
+ if (this.lineWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..31e449d59ccb3ded7583f04cb042f146159d25eb
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathCreateSample.ets
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('PathCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+ Path()
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathFillOpacitySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathFillOpacitySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4487a1df96c359a9a63df2b1eae362a5ad128239
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathFillOpacitySample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathFillOpacitySample {
+ timeHelper: TimeHelper = new TimeHelper('PathFillOpacitySample');
+ @State pathFillOpacity: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change FillOpacity')
+ .id('PathChangeFillOpacity')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathFillOpacity = 0;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathFillOpacity == 1 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+ Path().fillOpacity(this.pathFillOpacity)
+
+ if (this.pathFillOpacity == 1 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathFillSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathFillSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3428432fd6b15c324a5a29e2adb1225e9e38f780
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathFillSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathFillSample {
+ timeHelper: TimeHelper = new TimeHelper('PathFillSample');
+ @State pathFill: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Fill')
+ .id('PathChangeFill')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathFill = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathFill == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+ Path().fill(this.pathFill)
+
+ if (this.pathFill == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e7bfe9c00e1981fd0a696a1b30cab551eda41fa1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathHeightSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('PathHeightSample');
+ @State pathHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Height')
+ .id('PathChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+ Path().height(this.pathHeight)
+
+ if (this.pathHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5002cac3beb2ef4a4980fa004ff47adc1efe35ca
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathHome.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct PathHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('PathBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'PathCreate', buttonUrl: 'pages/other/path/PathCreateSample' });
+ CommonButton({ buttonName: 'PathFill', buttonUrl: 'pages/other/path/PathFillSample' });
+ CommonButton({ buttonName: 'PathFillOpacity', buttonUrl: 'pages/other/path/PathFillOpacitySample' });
+ CommonButton({ buttonName: 'PathStroke', buttonUrl: 'pages/other/path/PathStrokeSample' });
+ CommonButton({ buttonName: 'PathStrokeDashArray', buttonUrl: 'pages/other/path/PathStrokeDashArraySample' });
+ CommonButton({ buttonName: 'PathStrokeDashOffset', buttonUrl: 'pages/other/path/PathStrokeDashOffsetSample' });
+ CommonButton({ buttonName: 'PathStrokeWidth', buttonUrl: 'pages/other/path/PathStrokeWidthSample' });
+ CommonButton({ buttonName: 'PathWidth', buttonUrl: 'pages/other/path/PathWidthSample' });
+ CommonButton({ buttonName: 'PathHeight', buttonUrl: 'pages/other/path/PathHeightSample' });
+ CommonButton({ buttonName: 'PathPadding', buttonUrl: 'pages/other/path/PathPaddingSample' });
+ CommonButton({ buttonName: 'PathMargin', buttonUrl: 'pages/other/path/PathMarginSample' });
+
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ada5bd2ff0f243254bbc4c06820d06d44b645806
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('PathMarginSample');
+ @State pathMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Margin')
+ .id('PathChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+ Path().margin(this.pathMargin)
+
+ if (this.pathMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ee91bc9caa127c40416e3cc1dabe14fbb1135189
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathPaddingSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('PathPaddingSample');
+ @State pathPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Padding')
+ .id('PathChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+ Path().padding(this.pathPadding)
+
+ if (this.pathPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeDashArraySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeDashArraySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e55190d50d6d174675443cdbc20c0209c5c9a788
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeDashArraySample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathStrokeDashArraySample {
+ timeHelper: TimeHelper = new TimeHelper('PathStrokeDashArraySample');
+ @State shapeStrokeDashArray: number[] = [5];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeDashArray')
+ .id('PathChangeStrokeDashArray')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeStrokeDashArray[0]= 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeStrokeDashArray[0] == 10 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+ Path().strokeDashArray(this.shapeStrokeDashArray)
+
+ if (this.shapeStrokeDashArray[0] == 10 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeDashOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeDashOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6f9e7dfaaed1651bd8754a6545042d318cf73cbc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeDashOffsetSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathStrokeDashOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('PathStrokeDashOffsetSample');
+ @State pathStrokeDashOffset: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeDashOffset')
+ .id('PathChangeStrokeDashOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathStrokeDashOffset = -20;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathStrokeDashOffset == -20 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+ Path().strokeDashOffset(this.pathStrokeDashOffset)
+
+ if (this.pathStrokeDashOffset == -20 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f2151bfe919791853a09451714de0f60f29a9b0c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathStrokeSample {
+ timeHelper: TimeHelper = new TimeHelper('PathStrokeSample');
+ @State pathStroke: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Stroke')
+ .id('PathChangeStroke')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathStroke = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathStroke == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+ Path().stroke(this.pathStroke)
+
+ if (this.pathStroke == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7c8e45bef8469e565afdff7741177b450484dc56
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathStrokeWidthSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('PathStrokeWidthSample');
+ @State pathStrokeWidth: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeWidth')
+ .id('PathChangeStrokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathStrokeWidth = 5;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathStrokeWidth == 5 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+ Path().strokeWidth(this.pathStrokeWidth)
+
+ if (this.pathStrokeWidth == 5 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..535bf139bcb627bfcabbe9a1b44a7025c294dc9b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/path/PathWidthSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PathWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('PathWidthSample');
+ @State pathWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width')
+ .id('PathChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.pathWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.pathWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+ Path().width(this.pathWidth)
+
+ if (this.pathWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..462d9da119ab003df21ea74df4985a5cd69d81a5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineCreateSample.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ Polyline()
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineFillOpacitySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineFillOpacitySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d23929bac0a5f1d70ca0c2d3411fb5473682b9d3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineFillOpacitySample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件fillOpacity属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineFillOpacitySample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineFillOpacitySample');
+ @State polylineFillOpacity: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change fillOpacity')
+ .id('change fillOpacity')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineFillOpacity = 0;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineFillOpacity != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(this.polylineFillOpacity)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylineFillOpacity != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineFillSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineFillSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..4f0b5c65d45913adbdca50080d87aec6700b2e7c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineFillSample.ets
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件fill属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+
+@Entry
+@Component
+struct PolylineFillSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineFillSample');
+ @State polylineFill: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change fill')
+ .id('change fill')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineFill = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineFill != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fill(this.polylineFill)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+
+
+ if (this.polylineFill != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8801dda59fb5a81536d5ad2cdfcb12870c50ca12
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineHeightSample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineHeightSample');
+ @State polylineHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 100 to 200')
+ .id('change height 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineHeight = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineHeight != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(this.polylineHeight)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylineHeight != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..816e5ef1144cffd1b53adc3f655b5dcdbb1dab30
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineHome.ets
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct PolylineHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('PolylineHome')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'PolylineCreateSample', buttonUrl: 'pages/other/polyline/PolylineCreateSample' });
+ CommonButton({ buttonName: 'PolylineFillSample', buttonUrl: 'pages/other/polyline/PolylineFillSample' });
+ CommonButton({ buttonName: 'PolylineFillOpacitySample', buttonUrl: 'pages/other/polyline/PolylineFillOpacitySample' });
+ CommonButton({ buttonName: 'PolylineStrokeSample', buttonUrl: 'pages/other/polyline/PolylineStrokeSample' });
+ CommonButton({ buttonName: 'PolylineStrokeDashArraySample', buttonUrl: 'pages/other/polyline/PolylineStrokeDashArraySample' });
+ CommonButton({ buttonName: 'PolylineStrokeDashOffsetSample', buttonUrl: 'pages/other/polyline/PolylineStrokeDashOffsetSample' });
+ CommonButton({ buttonName: 'PolylineStrokeWidthSample', buttonUrl: 'pages/other/polyline/PolylineStrokeWidthSample' });
+ CommonButton({ buttonName: 'PolylineWidthSample', buttonUrl: 'pages/other/polyline/PolylineWidthSample' });
+ CommonButton({ buttonName: 'PolylineHeightSample', buttonUrl: 'pages/other/polyline/PolylineHeightSample' });
+ CommonButton({ buttonName: 'PolylinePaddingSample', buttonUrl: 'pages/other/polyline/PolylinePaddingSample' });
+ CommonButton({ buttonName: 'PolylineMarginSample', buttonUrl: 'pages/other/polyline/PolylineMarginSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a617dd3e7d416c09c89a097ed401d690804a7435
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineMarginSample.ets
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineMarginSample');
+ @State polylineMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineMargin != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .margin(this.polylineMargin)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylineMargin != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylinePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylinePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e91be1049c725e5f605e5efcdd6f17bf19c65567
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylinePaddingSample.ets
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylinePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylinePaddingSample');
+ @State polylinePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylinePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylinePadding != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .padding(this.polylinePadding)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylinePadding != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeDashArraySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeDashArraySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e3d714cb67e6ecad849935c216ac20a834d5b1c9
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeDashArraySample.ets
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件strokeDashArray属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineStrokeDashArraySample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineStrokeDashArraySample');
+ @State polylineStrokeDashArray: Array = [5];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeDashArray')
+ .id('change strokeDashArray')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineStrokeDashArray = [10];
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineStrokeDashArray != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashArray(this.polylineStrokeDashArray)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylineStrokeDashArray != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeDashOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeDashOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..65c25dc8c4ff1487202bb48e2290509e3ce38748
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeDashOffsetSample.ets
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件strokeDashOffset属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineStrokeDashOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineStrokeDashOffsetSample');
+ @State polylineStrokeDashOffset: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeDashOffset')
+ .id('change strokeDashOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineStrokeDashOffset = -20;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineStrokeDashOffset != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(30)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .strokeDashOffset(this.polylineStrokeDashOffset)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylineStrokeDashOffset != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b6c82b074a09b3cbebe3b4d70b091a08351ea1ee
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeSample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件stroke属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineStrokeSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineStrokeSample');
+ @State polylineStroke: number = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change stroke')
+ .id('change stroke')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineStroke = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineStroke != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(this.polylineStroke)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylineStroke != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..840547575093780ee7a58fa3d16ac7d7ac892fe3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineStrokeWidthSample.ets
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件strokeWidth属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineStrokeWidthSample');
+ @State polylineStrokeWidth: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change strokeWidth')
+ .id('change strokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineStrokeWidth = 5;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineStrokeWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(100)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(this.polylineStrokeWidth)
+ .points([[0, 0], [50, 100], [100, 0]])
+ if (this.polylineStrokeWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5fa654db7770d4f2644b9447e692b80f90ab6ccf
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/polyline/PolylineWidthSample.ets
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Polyline组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct PolylineWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('PolylineWidthSample');
+ @State polylineWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 100 to 200')
+ .id('change width 100 to 200')
+ .margin('5vp')
+ .onClick(() => {
+ this.polylineWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.polylineWidth != null && this.timeHelper.printTime(true)) {
+ }
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+ Polyline()
+ .width(this.polylineWidth)
+ .height(100)
+ .fillOpacity(0)
+ .stroke(Color.Red)
+ .strokeWidth(5)
+ .points([[0, 0], [50, 100], [100, 0]])
+
+ if (this.polylineWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..16e191e8e7f166bd3b7e435c0eaa395249f7c9dc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeCreateSample.ets
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+ Shape()
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeFillOpacitySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeFillOpacitySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e8f46bca422bfaa7f83edbfec799e5fe48d42b5b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeFillOpacitySample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeOpacitySample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeOpacitySample');
+ @State shapeFillOpacity: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change FillOpacity')
+ .id('ShapeChangeFillOpacity')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeFillOpacity = 0;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeFillOpacity == 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+ Shape().fillOpacity(this.shapeFillOpacity)
+
+ if (this.shapeFillOpacity == 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeFillSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeFillSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0e6b4d96ca127a5d44c3a2d2243f830f4c831081
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeFillSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeFillSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeFillSample');
+ @State shapeFill: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Fill')
+ .id('ShapeChangeFill')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeFill = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeFill == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+ Shape().fill(this.shapeFill)
+
+ if (this.shapeFill == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c024d94072a6ff029ae60115e46598cf1961e21e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeHeightSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeHeightSample');
+ @State shapeHeight: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Height')
+ .id('ShapeChangeHeight')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeHeight = 200;
+ })
+ }.width('100%')
+
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeHeight == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+ Shape().height(this.shapeHeight)
+
+ if (this.shapeHeight == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..cbd4812f62494b475c4c54bd563a9f239609c64a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeHome.ets
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct ShapeHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('ShapeBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'ShapeCreate', buttonUrl: 'pages/other/shape/ShapeCreateSample' });
+ CommonButton({ buttonName: 'ShapeFill', buttonUrl: 'pages/other/shape/ShapeFillSample' });
+ CommonButton({ buttonName: 'ShapeFillOpacity', buttonUrl: 'pages/other/shape/ShapeFillOpacitySample' });
+ CommonButton({ buttonName: 'ShapeStroke', buttonUrl: 'pages/other/shape/ShapeStrokeSample' });
+ CommonButton({ buttonName: 'ShapeStrokeDashArray', buttonUrl: 'pages/other/shape/ShapeStrokeDashArraySample' });
+ CommonButton({ buttonName: 'ShapeStrokeDashOffset', buttonUrl: 'pages/other/shape/ShapeStrokeDashOffsetSample' });
+ CommonButton({ buttonName: 'ShapeStrokeWidth', buttonUrl: 'pages/other/shape/ShapeStrokeWidthSample' });
+ CommonButton({ buttonName: 'ShapeWidth', buttonUrl: 'pages/other/shape/ShapeWidthSample' });
+ CommonButton({ buttonName: 'ShapeHeight', buttonUrl: 'pages/other/shape/ShapeHeightSample' });
+ CommonButton({ buttonName: 'ShapePadding', buttonUrl: 'pages/other/shape/ShapePaddingSample' });
+ CommonButton({ buttonName: 'ShapeMargin', buttonUrl: 'pages/other/shape/ShapeMarginSample' });
+
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3a694af5f27fb28d0142a39f56f8c92a554e4fb1
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeMarginSample.ets
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeMarginSample');
+ @State shapeMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Margin')
+ .id('ShapeChangeMargin')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeMargin == 30 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+ Shape().margin(this.shapeMargin)
+
+ if (this.shapeMargin == 30 && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapePaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapePaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ea5cb72f8b85e756c774d272a5950981b09579d6
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapePaddingSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapePaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapePaddingSample');
+ @State shapePadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Padding')
+ .id('ShapeChangePadding')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapePadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapePadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+ Shape().padding(this.shapePadding)
+
+ if (this.shapePadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeDashArraySample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeDashArraySample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ad9c055f8644b3b6a7a5efe8b10ec9566db57c6e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeDashArraySample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeStrokeDashArraySample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeStrokeDashArraySample');
+ @State shapeStrokeDashArray: number[] = [5];
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeDashArray')
+ .id('ShapeChangeStrokeDashArray')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeStrokeDashArray[0]= 10;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeStrokeDashArray[0] == 10 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+ Shape().strokeDashArray(this.shapeStrokeDashArray)
+
+ if (this.shapeStrokeDashArray[0] == 10 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeDashOffsetSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeDashOffsetSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fc034403be3b6e75c4746a69db2117727c85e19b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeDashOffsetSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeStrokeDashOffsetSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeStrokeDashOffsetSample');
+ @State shapeStrokeDashOffset: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeDashOffset')
+ .id('ShapeChangeStrokeDashOffset')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeStrokeDashOffset = -20;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeStrokeDashOffset == -20 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+ Shape().strokeDashOffset(this.shapeStrokeDashOffset)
+
+ if (this.shapeStrokeDashOffset == -20 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..a5b434d4a63ae8591ffa0a1480d5cb6018f143fd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeStrokeSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeStrokeSample');
+ @State shapeStroke: Color = Color.Red;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change Stroke')
+ .id('ShapeChangeStroke')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeStroke = Color.Yellow;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeStroke == Color.Yellow && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+ Shape().stroke(this.shapeStroke)
+
+ if (this.shapeStroke == Color.Yellow && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3183ad3a4b0f52dc40475a26516f53b9e37a6c03
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeStrokeWidthSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeStrokeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeStrokeWidthSample');
+ @State shapeStrokeWidth: number = 1;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change StrokeWidth')
+ .id('ShapeChangeStrokeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeStrokeWidth = 5;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeStrokeWidth == 5 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+ Shape().strokeWidth(this.shapeStrokeWidth)
+
+ if (this.shapeStrokeWidth == 5 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3105fad14c1dc6f8f25fdcd498684d584fa8edba
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/shape/ShapeWidthSample.ets
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct ShapeWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('ShapeWidthSample');
+ @State shapeWidth: number = 100;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width')
+ .id('ShapeChangeWidth')
+ .margin('5vp')
+ .onClick(() => {
+ this.shapeWidth = 200;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.shapeWidth == 200 && this.timeHelper.printTime(true)) {
+ }
+
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+ Shape().width(this.shapeWidth)
+
+ if (this.shapeWidth == 200 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoCreateSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoCreateSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..229983eb97f39451019ebe5a2654d2459e1880d5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoCreateSample.ets
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Video组件首次创建耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct VideoCreateSample {
+ timeHelper: TimeHelper = new TimeHelper('VideoCreateSample');
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.timeHelper.printTime(true)) {
+ }
+
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+ Video({})
+
+ if (this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoHeightSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoHeightSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e233ca5b053804a38cc457087bbbf3658e53707e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoHeightSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Video组件height属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct VideoHeightSample {
+ timeHelper: TimeHelper = new TimeHelper('VideoHeightSample');
+ @State videoHeight: number = 300;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change height 300 to 400')
+ .id('change height 300 to 400')
+ .margin('5vp')
+ .onClick(() => {
+ this.videoHeight = 400;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.videoHeight > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+ Video({}).height(this.videoHeight)
+
+ if (this.videoHeight > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoHome.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoHome.ets
new file mode 100644
index 0000000000000000000000000000000000000000..7a3418ff7588ebca550d5c627e57020da177349b
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoHome.ets
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { CommonButton } from '../../../util/CommonButton'
+
+@Entry
+@Component
+struct VideoHome {
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Text('VideoBenchmark')
+ .padding('15vp')
+ .width('100%')
+ .fontSize('25fp')
+ .textAlign(TextAlign.Center)
+
+ CommonButton({ buttonName: 'VideoCreateSample', buttonUrl: 'pages/other/video/VideoCreateSample' });
+ CommonButton({ buttonName: 'VideoWidthSample', buttonUrl: 'pages/other/video/VideoWidthSample' });
+ CommonButton({ buttonName: 'VideoHeightSample', buttonUrl: 'pages/other/video/VideoHeightSample' });
+ CommonButton({ buttonName: 'VideoPaddingSample', buttonUrl: 'pages/other/video/VideoPaddingSample' });
+ CommonButton({ buttonName: 'VideoMarginSample', buttonUrl: 'pages/other/video/VideoMarginSample' });
+ }
+ .padding('5vp')
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoMarginSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoMarginSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e4e69c42aaf072daff118c0eef0bd91c5ab3febd
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoMarginSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Video组件margin属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct VideoMarginSample {
+ timeHelper: TimeHelper = new TimeHelper('VideoMarginSample');
+ @State videoMargin: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change margin 20 to 30')
+ .id('change margin 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.videoMargin = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.videoMargin > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+ Video({}).margin(this.videoMargin)
+
+ if (this.videoMargin > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoPaddingSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..205cb045f636b49e28372d954f48921256b0681e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoPaddingSample.ets
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Video组件padding属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct VideoPaddingSample {
+ timeHelper: TimeHelper = new TimeHelper('VideoPaddingSample');
+ @State videoPadding: number = 20;
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change padding 20 to 30')
+ .id('change padding 20 to 30')
+ .margin('5vp')
+ .onClick(() => {
+ this.videoPadding = 30;
+ })
+ }.width('100%')
+
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.videoPadding > 0 && this.timeHelper.printTime(true)) {
+ }
+
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+ Video({}).padding(this.videoPadding)
+
+ if (this.videoPadding > 0 && this.timeHelper.printTime(false)) {
+ }
+ })
+
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoWidthSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoWidthSample.ets
new file mode 100644
index 0000000000000000000000000000000000000000..048f217a549d9fff2270113cff9316aafa153e0c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/other/video/VideoWidthSample.ets
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Video组件width属性更新布局耗时
+ */
+
+import { ArrEntity } from '../../../entity/ArrEntity'
+import { TimeHelper } from '../../../util/TimeHelper'
+
+@Entry
+@Component
+struct VideoWidthSample {
+ timeHelper: TimeHelper = new TimeHelper('VideoWidthSample');
+ @State videoWidth: string = '80%';
+
+ build() {
+ Scroll() {
+ Flex({ direction: FlexDirection.Row, wrap: FlexWrap.Wrap }) {
+ Column() {
+ Button('change width 80% to 100%')
+ .id('change width 80% to 100%')
+ .margin('5vp')
+ .onClick(() => {
+ this.videoWidth = '100%';
+ })
+ }.width('100%')
+ ForEach(ArrEntity.arr, (index: number) => {
+ if (this.videoWidth != null && this.timeHelper.printTime(true)) {
+ }
+
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+ Video({}).width(this.videoWidth)
+
+ if (this.videoWidth != null && this.timeHelper.printTime(false)) {
+ }
+ })
+ }
+ .width('100%')
+ }.margin({ bottom: 60 })
+ .width('100%')
+
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/util/CommonButton.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/util/CommonButton.ets
new file mode 100644
index 0000000000000000000000000000000000000000..acca196d54372a041d47c31d44e64af94c366052
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/util/CommonButton.ets
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import router from '@ohos.router';
+
+@Component
+export struct CommonButton {
+ @State buttonName: string = '';
+ @State buttonUrl: string = '';
+ @State data: string = '';
+
+ build() {
+ Text(this.buttonName)
+ .id(this.buttonName)
+ .padding(px2vp(5))
+ .fontSize(px2fp(16))
+ .backgroundColor(Color.Blue)
+ .fontColor(Color.White)
+ .borderRadius(5)
+ .margin(px2vp(5))
+ .onClick(() => {
+ router.pushUrl({
+ url: this.buttonUrl,
+ params: {
+ text: this.data,
+ buttonName: this.buttonName
+ }
+ })
+ })
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/util/TimeHelper.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/util/TimeHelper.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d337f939fcc766fb3553007edc5c6b1d281ad747
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/util/TimeHelper.ets
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hiTraceMeter from '@ohos.hiTraceMeter';
+import { ArrEntity } from '../entity/ArrEntity';
+
+export class TimeHelper {
+ testCaseName: string = ''
+ startTime: number = 0;
+
+ constructor(testCaseName: string) {
+ this.startTime = 0;
+ this.testCaseName = testCaseName;
+ }
+
+ printTime(isStart: boolean, count: number = ArrEntity.arr.length): boolean {
+ let name: string = `testCaseName : ${this.testCaseName}`;
+ isStart ? console.time(name) : console.timeEnd(name);
+ isStart ? hiTraceMeter.startTrace(name, 1024) : hiTraceMeter.finishTrace(name, 1024);
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/util/UrlConstant.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/util/UrlConstant.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f9b94d8a9cf9096b7573afc8268bccfde090ee3e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/util/UrlConstant.ets
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export class UrlClass {
+ buttonName: string;
+ buttonUrl: string;
+ data: string;
+
+ constructor(buttonName: string, buttonUrl: string, data: string) {
+ this.buttonName = buttonName;
+ this.buttonUrl = buttonUrl;
+ this.data = data;
+ }
+}
+
+export let ScrollUrlClass: UrlClass[] = [
+ new UrlClass('ScrollCreate', 'pages/container/scroll/ScrollCreateSample', ''),
+ new UrlClass('ScrollWidth', 'pages/container/scroll/ScrollWidthSample', ''),
+ new UrlClass('ScrollHeight', 'pages/container/scroll/ScrollHeightSample', ''),
+ new UrlClass('ScrollPadding', 'pages/container/scroll/ScrollPaddingSample', ''),
+ new UrlClass('ScrollMargin', 'pages/container/scroll/ScrollMarginSample', ''),
+ new UrlClass('ScrollEnableScrollInteractionTrueToFalse', 'pages/container/scroll/ScrollEnableScrollInteractionSample', 'true'),
+ new UrlClass('ScrollEnableScrollInteractionFalseToTrue', 'pages/container/scroll/ScrollEnableScrollInteractionSample', 'false'),
+ new UrlClass('ScrollDrag', 'pages/container/scroll/ScrollDragSample', ''),
+ new UrlClass('ScrollSlippage', 'pages/container/scroll/ScrollSlippageSample', ''),
+ new UrlClass('ScrollScrollTo', 'pages/container/scroll/ScrollScrollToSample', ''),
+ new UrlClass('ScrollScrollEdge', 'pages/container/scroll/ScrollScrollEdgeSample', ''),
+ new UrlClass('ScrollEdgeEffectSpring', 'pages/container/scroll/ScrollEdgeEffectSample', '0'),
+ new UrlClass('ScrollEdgeEffectFade', 'pages/container/scroll/ScrollEdgeEffectSample', '1'),
+ new UrlClass('ScrollEdgeEffectNone', 'pages/container/scroll/ScrollEdgeEffectSample', '2'),
+ new UrlClass('ScrollScrollBy', 'pages/container/scroll/ScrollScrollBySample', ''),
+]
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/util/Utils.ts b/performance/arkui/benchMark_Component/entry/src/main/ets/util/Utils.ts
new file mode 100644
index 0000000000000000000000000000000000000000..437a028d4ebf324e7bf49c5126f03d2337051f25
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/ets/util/Utils.ts
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import display from '@ohos.display';
+import { Configuration } from '@ohos.app.ability.Configuration';
+
+/**
+ * 更新px2vp、px2fp方法来适配UI尺寸
+ *
+ * 由于UI提供的尺寸以像素为单位,且UI图屏幕尺寸为1440x2560,所以在计算vp/fp时,需要进行转换
+ *
+ * 按照dpi/160 = px/vp公式,还需要对px做scale(缩放到实际屏幕尺寸)
+ * 有两种计算缩放的方法,分别适配屏幕宽度和高度
+ * 使用宽度计算缩放:scale = 屏幕宽度 / 1440(我们使用宽度计算)
+ * 使用高度计算缩放:scale = 屏幕高度 / 2560
+ * densityPixels = dpi/160 = (px*scale)/vp --> vp = (px * scale) / densityPixels
+ * ratio = scale / densityPixels --> vp = px * ratio
+ */
+export function updateScale(config: Configuration) {
+ let previewer = { density: 480, direction: 0, disp: { width: 1080, height: 2340, densityPixels: 3 } } // 预览配置
+ let density = config ? config.screenDensity : previewer.density
+ let direction = config ? config.direction : previewer.direction
+ let disp = config ? display.getDefaultDisplaySync() : previewer.disp
+ console.info("density:" + density + ", direction:" + direction + ", width:" + disp.width + ", height:" + disp.height)
+
+ let scale = (direction == 0 ? disp.width : disp.height) / 720
+ let ratio = scale / disp.densityPixels
+ console.info("scale: " + scale + ", ratio:" + ratio)
+
+ globalThis.px2vp = (px) => {
+ return px * ratio;
+ }
+ globalThis.px2fp = (px) => {
+ return px * ratio;
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/module.json5 b/performance/arkui/benchMark_Component/entry/src/main/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..6f2734bc4f37c89617ecf39dff2829571bf384c5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/module.json5
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry",
+ "type": "entry",
+ "description": "$string:module_desc",
+ "mainElement": "EntryAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "abilities": [
+ {
+ "name": "EntryAbility",
+ "srcEntry": "./ets/entryability/EntryAbility.ts",
+ "description": "$string:EntryAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:EntryAbility_label",
+ "startWindowIcon": "$media:icon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/resources/base/element/color.json b/performance/arkui/benchMark_Component/entry/src/main/resources/base/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/resources/base/element/string.json b/performance/arkui/benchMark_Component/entry/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..eac35c546b1311a1eb959a7c3b65654d264547db
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "BenchMark"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/resources/base/media/icon.png b/performance/arkui/benchMark_Component/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and b/performance/arkui/benchMark_Component/entry/src/main/resources/base/media/icon.png differ
diff --git a/performance/arkui/benchMark_Component/entry/src/main/resources/base/profile/main_pages.json b/performance/arkui/benchMark_Component/entry/src/main/resources/base/profile/main_pages.json
new file mode 100644
index 0000000000000000000000000000000000000000..9af907eead1bd7609bde3157863ac9d62da672a8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,615 @@
+{
+ "src": [
+ "pages/Index",
+ "pages/base/text/TextHome",
+ "pages/base/text/TextCreate10CharSample",
+ "pages/base/text/TextAlign10CharSample",
+ "pages/base/text/TextWidth10CharSample",
+ "pages/base/text/TextHeight10CharSample",
+ "pages/base/text/TextPadding10CharSample",
+ "pages/base/text/TextMargin10CharSample",
+ "pages/base/text/TextFont10CharSample",
+ "pages/base/text/TextContent10CharSample",
+ "pages/base/text/TextTextIndent10CharSample",
+ "pages/base/text/TextTextCase10CharSample",
+ "pages/base/text/TextLetterSpacing10CharSample",
+ "pages/base/text/TextBaselineOffset10CharSample",
+ "pages/base/text/TextLineHeight10CharSample",
+ "pages/base/text/TextMaxLines10CharSample",
+ "pages/base/text/TextOverflow10CharSample",
+ "pages/base/text/TextHeightAdaptivePolicy10CharOneSample",
+ "pages/base/text/TextHeightAdaptivePolicy10CharTwoSample",
+ "pages/base/text/TextHeightAdaptivePolicy10CharThreeSample",
+ "pages/base/text/TextCreate100CharSample",
+ "pages/base/text/TextAlign100CharSample",
+ "pages/base/text/TextWidth100CharSample",
+ "pages/base/text/TextHeight100CharSample",
+ "pages/base/text/TextPadding100CharSample",
+ "pages/base/text/TextMargin100CharSample",
+ "pages/base/text/TextFont100CharSample",
+ "pages/base/text/TextContent100CharSample",
+ "pages/base/text/TextTextIndent100CharSample",
+ "pages/base/text/TextTextCase100CharSample",
+ "pages/base/text/TextLetterSpacing100CharSample",
+ "pages/base/text/TextBaselineOffset100CharSample",
+ "pages/base/text/TextLineHeight100CharSample",
+ "pages/base/text/TextMaxLines100CharSample",
+ "pages/base/text/TextOverflow100CharSample",
+ "pages/base/text/TextHeightAdaptivePolicy100CharOneSample",
+ "pages/base/text/TextHeightAdaptivePolicy100CharTwoSample",
+ "pages/base/text/TextHeightAdaptivePolicy100CharThreeSample",
+ "pages/base/textInput/TextInputHome",
+ "pages/base/textInput/TextInputCreate10CharSample",
+ "pages/base/textInput/TextInputWidth10CharSample",
+ "pages/base/textInput/TextInputHeight10CharSample",
+ "pages/base/textInput/TextInputMargin10CharSample",
+ "pages/base/textInput/TextInputPadding10CharSample",
+ "pages/base/textInput/TextInputAlign10CharSample",
+ "pages/base/textInput/TextInputType10CharSample",
+ "pages/base/textInput/TextInputCreate100CharSample",
+ "pages/base/textInput/TextInputWidth100CharSample",
+ "pages/base/textInput/TextInputHeight100CharSample",
+ "pages/base/textInput/TextInputMargin100CharSample",
+ "pages/base/textInput/TextInputPadding100CharSample",
+ "pages/base/textInput/TextInputAlign100CharSample",
+ "pages/base/textInput/TextInputType100CharSample",
+ "pages/container/row/RowHome",
+ "pages/container/row/RowCreateSample",
+ "pages/container/row/RowWidthSample",
+ "pages/container/row/RowHeightSample",
+ "pages/container/row/RowPaddingSample",
+ "pages/container/row/RowMarginSample",
+ "pages/container/row/RowSpaceSample",
+ "pages/container/row/RowSpaceMarginSample",
+ "pages/container/row/RowAlignSample",
+ "pages/container/row/RowJustifySample",
+ "pages/container/column/ColumnHome",
+ "pages/container/column/ColumnCreateSample",
+ "pages/container/column/ColumnWidthSample",
+ "pages/container/column/ColumnHeightSample",
+ "pages/container/column/ColumnPaddingSample",
+ "pages/container/column/ColumnMarginSample",
+ "pages/container/column/ColumnSpaceSample",
+ "pages/container/column/ColumnSpaceMarginSample",
+ "pages/container/column/ColumnAlignSample",
+ "pages/container/column/ColumnJustifySample",
+ "pages/container/scroll/ScrollCreateSample",
+ "pages/container/scroll/ScrollDragSample",
+ "pages/container/scroll/ScrollEdgeEffectSample",
+ "pages/container/scroll/ScrollEnableScrollInteractionSample",
+ "pages/container/scroll/ScrollHeightSample",
+ "pages/container/scroll/ScrollHome",
+ "pages/container/scroll/ScrollMarginSample",
+ "pages/container/scroll/ScrollPaddingSample",
+ "pages/container/scroll/ScrollScrollBySample",
+ "pages/container/scroll/ScrollScrollEdgeSample",
+ "pages/container/scroll/ScrollScrollToSample",
+ "pages/container/scroll/ScrollSlippageSample",
+ "pages/container/scroll/ScrollWidthSample",
+ "pages/container/tabs/TabsHome",
+ "pages/container/tabs/TabsCreateSample",
+ "pages/container/tabs/TabsWidthSample",
+ "pages/container/tabs/TabsHeightSample",
+ "pages/container/tabs/TabsPaddingSample",
+ "pages/container/tabs/TabsMarginSample",
+ "pages/container/tabs/TabsVerticalSample",
+ "pages/container/tabs/TabsBarModeSample",
+ "pages/container/tabs/TabsDividerSample",
+ "pages/container/tabs/TabsBarPositionSample",
+ "pages/container/tabs/TabsIndexSample",
+ "pages/container/tabs/TabsBarWidthSample",
+ "pages/container/tabs/TabsBarHeightSample",
+ "pages/container/tabs/TabsFlingSample",
+ "pages/container/tabs/TabsDragSample",
+ "pages/container/tabs/TabsClickTabSample",
+ "pages/container/swiper/SwiperHome",
+ "pages/container/swiper/SwiperCreateSample",
+ "pages/container/swiper/SwiperWidthSample",
+ "pages/container/swiper/SwiperHeightSample",
+ "pages/container/swiper/SwiperPaddingSample",
+ "pages/container/swiper/SwiperMarginSample",
+ "pages/container/swiper/SwiperIndexSample",
+ "pages/container/swiper/SwiperVerticalSample",
+ "pages/container/swiper/SwiperItemSpaceSample",
+ "pages/container/swiper/SwiperDisplayModeSample",
+ "pages/container/swiper/SwiperDisplayCountSample",
+ "pages/container/swiper/SwiperNextMarginSample",
+ "pages/container/swiper/SwiperPrevMarginSample",
+ "pages/container/swiper/SwiperCurveSample",
+ "pages/container/swiper/SwiperControllerShowNextSample",
+ "pages/container/swiper/SwiperManualSlidingSample",
+ "pages/container/swiper/SwiperLoopSample",
+ "pages/container/swiper/SwiperEffectModeSample",
+ "pages/container/swiper/SwiperDurationSample",
+ "pages/base/navigation/NavigationHome",
+ "pages/base/navigation/NavigationCreateSample",
+ "pages/base/navigation/NavigationWidthSample",
+ "pages/base/navigation/NavigationHeightSample",
+ "pages/base/navigation/NavigationPaddingSample",
+ "pages/base/navigation/NavigationMarginSample",
+ "pages/base/navigation/NavigationTitleModeSample",
+ "pages/base/navigation/NavigationHideToolBarSample",
+ "pages/base/navigation/NavigationHideTitleBarSample",
+ "pages/base/navigation/NavigationHideBackButtonSample",
+ "pages/base/navigation/NavigationNavBarWidthSample",
+ "pages/base/navigation/NavigationNavBarPositionSample",
+ "pages/base/navigation/NavigationModeSample",
+ "pages/base/navigation/NavigationHideNavBarSample",
+ "pages/base/navigation/NavigationStackJumpSample",
+ "pages/base/navigation/NavigationSplitJumpSample",
+ "pages/container/grid/GridHome",
+ "pages/container/grid/GridCreateSample",
+ "pages/container/grid/GridWidthSample",
+ "pages/container/grid/GridHeightSample",
+ "pages/container/grid/GridPaddingSample",
+ "pages/container/grid/GridMarginSample",
+ "pages/container/grid/GridSetRCColumnsTemplateSample",
+ "pages/container/grid/GridSetRCRowsTemplateSample",
+ "pages/container/grid/GridSetRCRowsGapSample",
+ "pages/container/grid/GridSetRCColumnsGapSample",
+ "pages/container/grid/GridSetCColumnsGapSample",
+ "pages/container/grid/GridSetCRowsGapSample",
+ "pages/container/grid/GridSetRColumnsGapSample",
+ "pages/container/grid/GridSetRRowsGapSample",
+ "pages/container/grid/GridMinCountSample",
+ "pages/container/grid/GridMaxCountSample",
+ "pages/container/grid/GridNotSetRCColumnsGapSample",
+ "pages/container/grid/GridNotSetRCLayoutDirectionSample",
+ "pages/container/grid/GridNotSetRCCellLengthSample",
+ "pages/container/grid/GridManualScrollingSample",
+ "pages/container/grid/GridScrollToSample",
+ "pages/container/grid/GridScrollEdgeSample",
+ "pages/container/grid/GridScrollBySample",
+ "pages/container/grid/GridEdgeEffectSample",
+ "pages/other/video/VideoHome",
+ "pages/other/video/VideoCreateSample",
+ "pages/other/video/VideoWidthSample",
+ "pages/other/video/VideoHeightSample",
+ "pages/other/video/VideoPaddingSample",
+ "pages/other/video/VideoMarginSample",
+ "pages/container/flex/FlexHome",
+ "pages/container/flex/FlexCreateSample",
+ "pages/container/flex/FlexWidthSample",
+ "pages/container/flex/FlexHeightSample",
+ "pages/container/flex/FlexPaddingSample",
+ "pages/container/flex/FlexMarginSample",
+ "pages/container/flex/FlexValueDirectionSample",
+ "pages/container/flex/FlexValueWrapSample",
+ "pages/container/flex/FlexValueJustifyContentSample",
+ "pages/container/flex/FlexValueAlignItemsSample",
+ "pages/container/flex/FlexValueAlignContentSample",
+ "pages/base/button/ButtonHome",
+ "pages/base/button/ButtonCreateSample",
+ "pages/base/button/ButtonWidthSample",
+ "pages/base/button/ButtonHeightSample",
+ "pages/base/button/ButtonPaddingSample",
+ "pages/base/button/ButtonMarginSample",
+ "pages/base/button/ButtonOptionTypeSample",
+ "pages/base/button/ButtonTypeSample",
+ "pages/container/gridRow/GridRowHome",
+ "pages/container/gridRow/GridRowCreateSample",
+ "pages/container/gridRow/GridRowWidthSample",
+ "pages/container/gridRow/GridRowHeightSample",
+ "pages/container/gridRow/GridRowPaddingSample",
+ "pages/container/gridRow/GridRowMarginSample",
+ "pages/container/gridRow/GridRowColumnsSample",
+ "pages/container/gridRow/GridRowGutterSample",
+ "pages/container/gridRow/GridRowDirectionSample",
+ "pages/container/gridRow/GridRowBreakpointsSample",
+ "pages/container/gridCol/GridColHome",
+ "pages/container/gridCol/GridColCreateSample",
+ "pages/container/gridCol/GridColOptionSpanSample",
+ "pages/container/gridCol/GridColOptionOffsetSample",
+ "pages/container/gridCol/GridColOptionOrderSample",
+ "pages/container/gridCol/GridColSpanSample",
+ "pages/container/gridCol/GridColOffsetSample",
+ "pages/container/gridCol/GridColOrderSample",
+ "pages/container/gridCol/GridColWidthSample",
+ "pages/container/gridCol/GridColHeightSample",
+ "pages/container/gridCol/GridColPaddingSample",
+ "pages/container/gridCol/GridColMarginSample",
+ "pages/base/image/ImageHome",
+ "pages/base/image/ImageCreateSample",
+ "pages/base/image/ImageWidthSample",
+ "pages/base/image/ImageHeightSample",
+ "pages/base/image/ImagePaddingSample",
+ "pages/base/image/ImageMarginSample",
+ "pages/base/image/ImageObjectFitSample",
+ "pages/base/image/ImageObjectRepeatSample",
+ "pages/base/image/ImageAutoResizeSample",
+ "pages/base/image/ImageInterpolationSample",
+ "pages/base/image/ImageFitOriginalSizeSample",
+ "pages/container/list/ListHome",
+ "pages/container/list/ListCreateSample",
+ "pages/container/list/ListWidthSample",
+ "pages/container/list/ListHeightSample",
+ "pages/container/list/ListPaddingSample",
+ "pages/container/list/ListMarginSample",
+ "pages/container/list/ListItemWidthSample",
+ "pages/container/list/ListItemHeightSample",
+ "pages/container/list/ListItemPaddingSample",
+ "pages/container/list/ListItemMarginSample",
+ "pages/container/list/ListItemGroupDividerSample",
+ "pages/container/list/ListItemGroupSpaceSample",
+ "pages/container/list/ListSpaceSample",
+ "pages/container/list/ListListDirectionSample",
+ "pages/container/list/ListAlignListItemSample",
+ "pages/container/list/ListLanesSample",
+ "pages/container/list/ListCachedCountSample",
+ "pages/container/list/ListDividerSample",
+ "pages/container/list/ListScrollBarSample",
+ "pages/container/list/ListRemoveItemSample",
+ "pages/container/list/ListAddItemSample",
+ "pages/container/list/ListEdgeEffectSample",
+ "pages/container/list/ListChainAnimationSample",
+ "pages/container/list/ListFrictionSample",
+ "pages/container/list/ListEnableScrollInteractionSample",
+ "pages/container/list/ListScrollSnapAlignSample",
+ "pages/container/list/ListChainAnimationOptionsSample",
+ "pages/container/list/ListStickySample",
+ "pages/base/select/SelectHome",
+ "pages/base/select/SelectCreateSample",
+ "pages/base/select/SelectWidthSample",
+ "pages/base/select/SelectHeightSample",
+ "pages/base/select/SelectSizeSample",
+ "pages/base/select/SelectPaddingSample",
+ "pages/base/select/SelectMarginSample",
+ "pages/base/select/SelectSpaceSample",
+ "pages/base/select/SelectArrowPositionSample",
+ "pages/base/select/SelectFirstExpandSample",
+ "pages/base/select/SelectSecondExpandSample",
+ "pages/base/select/SelectFirstExpandCollapseSample",
+ "pages/base/select/SelectSecondExpandCollapseSample",
+ "pages/base/checkbox/CheckBoxHome",
+ "pages/base/checkbox/CheckBoxCreateSample",
+ "pages/base/checkbox/CheckBoxWidthSample",
+ "pages/base/checkbox/CheckBoxHeightSample",
+ "pages/base/checkbox/CheckBoxPaddingSample",
+ "pages/base/checkbox/CheckBoxMarginSample",
+ "pages/base/checkbox/CheckBoxSizeSample",
+ "pages/base/checkbox/CheckBoxSelectSample",
+ "pages/base/checkbox/CheckBoxMarkStyleSample",
+ "pages/base/checkbox/CheckBoxGroupSelectSample",
+ "pages/base/checkbox/CheckBoxGroupCancelSelectSample",
+ "pages/base/span/SpanHome",
+ "pages/base/span/SpanCreateInTextSample",
+ "pages/base/span/SpanCreateInRichEditorSample",
+ "pages/base/span/SpanValueInTextSample",
+ "pages/base/span/SpanValueInRichEditorSample",
+ "pages/base/span/SpanLetterSpacingInTextSample",
+ "pages/base/span/SpanLetterSpacingInRichEditorSample",
+ "pages/base/span/SpanTextCaseInTextSample",
+ "pages/base/span/SpanTextCaseInRichEditorSample",
+ "pages/base/span/SpanFontInTextSample",
+ "pages/base/span/SpanFontInRichEditorSample",
+ "pages/base/slider/SliderHome",
+ "pages/base/slider/SliderCreateSample",
+ "pages/base/slider/SliderWidthSample",
+ "pages/base/slider/SliderHeightSample",
+ "pages/base/slider/SliderPaddingSample",
+ "pages/base/slider/SliderMarginSample",
+ "pages/base/slider/SliderStepSample",
+ "pages/base/slider/SliderDirectionSample",
+ "pages/base/slider/SliderReverseSample",
+ "pages/base/slider/SliderStyleSample",
+ "pages/base/slider/SliderTrackThicknessSample",
+ "pages/base/slider/SliderBlockSizeSample",
+ "pages/base/slider/SliderFingerSlidingSample",
+ "pages/base/slider/SliderClickSample",
+ "pages/base/slider/SliderMouseScrollSample",
+ "pages/base/slider/SliderKeyboardScrollSample",
+ "pages/base/divider/DividerHome",
+ "pages/base/divider/DividerCreateSample",
+ "pages/base/divider/DividerStrokeWidthSample",
+ "pages/base/divider/DividerWidthSample",
+ "pages/base/divider/DividerHeightSample",
+ "pages/base/divider/DividerSizeSample",
+ "pages/base/divider/DividerPaddingSample",
+ "pages/base/divider/DividerMarginSample",
+ "pages/base/divider/DividerColorSample",
+ "pages/base/divider/DividerVerticalSample",
+ "pages/base/divider/DividerLineCapSample",
+ "pages/base/toggle/ToggleHome",
+ "pages/base/toggle/ToggleCreateSample",
+ "pages/base/toggle/ToggleSelectedColorSample",
+ "pages/base/toggle/ToggleSwitchPointColorSample",
+ "pages/base/toggle/ToggleWidthSample",
+ "pages/base/toggle/ToggleHeightSample",
+ "pages/base/toggle/ToggleSizeSample",
+ "pages/base/toggle/TogglePaddingSample",
+ "pages/base/toggle/ToggleMarginSample",
+ "pages/base/toggle/ToggleSwitchSample",
+ "pages/base/toggle/ToggleCheckboxSelectSample",
+ "pages/base/toggle/ToggleCheckboxCancelSample",
+ "pages/container/refresh/RefreshHome",
+ "pages/container/refresh/RefreshCreateSample",
+ "pages/container/refresh/RefreshWidthSample",
+ "pages/container/refresh/RefreshHeightSample",
+ "pages/container/refresh/RefreshSizeSample",
+ "pages/container/refresh/RefreshPaddingSample",
+ "pages/container/refresh/RefreshMarginSample",
+ "pages/container/refresh/RefreshPullSample",
+ "pages/container/refresh/RefreshOffsetSample",
+ "pages/container/refresh/RefreshFrictionSample",
+ "pages/container/refresh/RefreshOnStateChangeSample",
+ "pages/base/textArea/TextAreaHome",
+ "pages/base/textArea/TextAreaCreateSample",
+ "pages/base/textArea/TextAreaTextAlignSample",
+ "pages/base/textArea/TextAreaWidthSample",
+ "pages/base/textArea/TextAreaHeightSample",
+ "pages/base/textArea/TextAreaPaddingSample",
+ "pages/base/textArea/TextAreaMarginSample",
+ "pages/base/textArea/TextAreaFontSample",
+ "pages/base/textArea/TextAreaTextSample",
+ "pages/base/textArea/TextAreaMaxLinesSample",
+ "pages/base/search/SearchHome",
+ "pages/base/search/SearchCreateSample",
+ "pages/base/search/SearchValueSample",
+ "pages/base/search/SearchTextAlignSample",
+ "pages/base/search/SearchWidthSample",
+ "pages/base/search/SearchHeightSample",
+ "pages/base/search/SearchPaddingSample",
+ "pages/base/search/SearchMarginSample",
+ "pages/base/search/SearchTextFontSample",
+ "pages/base/search/SearchPlaceholderFontSample",
+ "pages/base/progress/ProgressHome",
+ "pages/base/progress/ProgressCreateSample",
+ "pages/base/progress/ProgressWidthSample",
+ "pages/base/progress/ProgressHeightSample",
+ "pages/base/progress/ProgressPaddingSample",
+ "pages/base/progress/ProgressMarginSample",
+ "pages/base/progress/ProgressProgressTypeSample",
+ "pages/base/progress/ProgressProgressStyleSample",
+ "pages/base/progress/ProgressLinearSample",
+ "pages/base/progress/ProgressRingSample",
+ "pages/base/progress/ProgressScaleRingSample",
+ "pages/base/marquee/MarqueeHome",
+ "pages/base/marquee/MarqueeCreateSample",
+ "pages/base/marquee/MarqueeWidthSample",
+ "pages/base/marquee/MarqueeHeightSample",
+ "pages/base/marquee/MarqueePaddingSample",
+ "pages/base/marquee/MarqueeMarginSample",
+ "pages/base/marquee/MarqueeSrcSample",
+ "pages/base/marquee/MarqueeStepSample",
+ "pages/base/marquee/MarqueeFromStartSample",
+ "pages/base/dataPanel/DataPanelHome",
+ "pages/base/dataPanel/DataPanelCreateSample",
+ "pages/base/dataPanel/DataPanelWidthSample",
+ "pages/base/dataPanel/DataPanelHeightSample",
+ "pages/base/dataPanel/DataPanelPaddingSample",
+ "pages/base/dataPanel/DataPanelMarginSample",
+ "pages/base/dataPanel/DataPanelCloseEffectSample",
+ "pages/base/dataPanel/DataPanelStrokeWidthSample",
+ "pages/base/dataPanel/DataPanelRadiusSample",
+ "pages/base/dataPanel/DataPanelOffsetXSample",
+ "pages/base/dataPanel/DataPanelOffsetYSample",
+ "pages/base/rating/RatingHome",
+ "pages/base/rating/RatingCreateSample",
+ "pages/base/rating/RatingWidthSample",
+ "pages/base/rating/RatingHeightSample",
+ "pages/base/rating/RatingPaddingSample",
+ "pages/base/rating/RatingMarginSample",
+ "pages/base/rating/RatingStarsSample",
+ "pages/base/rating/RatingStarStyleSample",
+ "pages/base/rating/RatingOptionsRatingSample",
+ "pages/base/rating/RatingClickSample",
+ "pages/base/rating/RatingSwipSample",
+ "pages/base/textClock/TextClockHome",
+ "pages/base/textClock/TextClockCreateSample",
+ "pages/base/textClock/TextClockWidthSample",
+ "pages/base/textClock/TextClockHeightSample",
+ "pages/base/textClock/TextClockPaddingSample",
+ "pages/base/textClock/TextClockMarginSample",
+ "pages/base/textClock/TextClockFormatSample",
+ "pages/container/hyperlink/HyperlinkHome",
+ "pages/container/hyperlink/HyperlinkCreateSample",
+ "pages/container/hyperlink/HyperlinkWidthSample",
+ "pages/container/hyperlink/HyperlinkHeightSample",
+ "pages/container/hyperlink/HyperlinkPaddingSample",
+ "pages/container/hyperlink/HyperlinkMarginSample",
+ "pages/base/qRCode/QRCodeHome",
+ "pages/base/qRCode/QRCodeCreateSample",
+ "pages/base/qRCode/QRCodeWidthSample",
+ "pages/base/qRCode/QRCodeHeightSample",
+ "pages/base/qRCode/QRCodePaddingSample",
+ "pages/base/qRCode/QRCodeMarginSample",
+ "pages/base/gauge/GaugeHome",
+ "pages/base/gauge/GaugeCreateSample",
+ "pages/base/gauge/GaugeWidthSample",
+ "pages/base/gauge/GaugeHeightSample",
+ "pages/base/gauge/GaugePaddingSample",
+ "pages/base/gauge/GaugeMarginSample",
+ "pages/base/gauge/GaugeStrokeWidthSample",
+ "pages/base/gauge/GaugeTrackShadowSample",
+ "pages/base/gauge/GaugeAngleSample",
+ "pages/container/badge/BadgeHome",
+ "pages/container/badge/BadgeCreateSample",
+ "pages/container/badge/BadgeSizeSample",
+ "pages/container/badge/BadgeColorSample",
+ "pages/container/badge/BadgeFontSizeSample",
+ "pages/container/badge/BadgeFontWeightSample",
+ "pages/container/badge/BadgeBorderWidthSample",
+ "pages/base/alphabetIndexer/AlphabetIndexerHome",
+ "pages/base/alphabetIndexer/AlphabetIndexerCreateSample",
+ "pages/base/alphabetIndexer/AlphabetIndexerSelectedColorSample",
+ "pages/base/alphabetIndexer/AlphabetIndexerPopupColorSample",
+ "pages/base/alphabetIndexer/AlphabetIndexerSelectedBackgroundColorSample",
+ "pages/base/alphabetIndexer/AlphabetIndexerPopupBackgroundSample",
+ "pages/base/alphabetIndexer/AlphabetIndexerSelectedFontSample",
+ "pages/base/alphabetIndexer/AlphabetIndexerPopupFontSample",
+ "pages/base/menu/MenuHome",
+ "pages/base/menu/MenuCreateSample",
+ "pages/base/menu/MenuFontSample",
+ "pages/base/menu/MenuFontColorSample",
+ "pages/base/menu/MenuWidthSample",
+ "pages/base/menu/MenuHeightSample",
+ "pages/base/menu/MenuPaddingSample",
+ "pages/base/menu/MenuMarginSample",
+ "pages/base/menu/MenuFirstExpendSample",
+ "pages/base/menu/MenuSecondExpendSample",
+ "pages/base/menu/MenuMoreCloseSample",
+ "pages/base/menu/MenuGroupCloseExpandSample",
+ "pages/base/menu/MenuGroupMoreCloseSample",
+ "pages/base/textPicker/TextPickerHome",
+ "pages/base/textPicker/TextPickerCreateSample",
+ "pages/base/textPicker/TextPickerTextStyleSample",
+ "pages/base/textPicker/TextPickerSelectedTextStyleSample",
+ "pages/base/textPicker/TextPickerDisappearTextStyleSample",
+ "pages/base/textPicker/TextPickerWidthSample",
+ "pages/base/textPicker/TextPickerHeightSample",
+ "pages/base/textPicker/TextPickerPaddingSample",
+ "pages/base/textPicker/TextPickerMarginSample",
+ "pages/base/textPicker/TextPickerFingerSwipSample",
+ "pages/base/textPicker/TextPickerClickSample",
+ "pages/base/textPicker/TextPickerMouseScrollSample",
+ "pages/base/textPicker/TextPickerKeyBoardScrollSample",
+ "pages/container/counter/CounterHome",
+ "pages/container/counter/CounterCreateSample",
+ "pages/container/counter/CounterWidthSample",
+ "pages/container/counter/CounterHeightSample",
+ "pages/container/counter/CounterPaddingSample",
+ "pages/container/counter/CounterMarginSample",
+ "pages/base/xComponent/XComponentHome",
+ "pages/base/xComponent/XComponentCreateSample",
+ "pages/base/patternLock/PatternLockHome",
+ "pages/base/patternLock/PatternLockCreateSample",
+ "pages/base/patternLock/PatternLockSideLengthSample",
+ "pages/base/patternLock/PatternLockCircleRadiusSample",
+ "pages/base/patternLock/PatternLockRegularColorSample",
+ "pages/base/patternLock/PatternLockSelectedColorSample",
+ "pages/base/patternLock/PatternLockActiveColorSample",
+ "pages/base/patternLock/PatternLockPathColorSample",
+ "pages/base/patternLock/PatternLockPathStrokeWidthSample",
+ "pages/base/patternLock/PatternLockWidthSample",
+ "pages/base/patternLock/PatternLockHeightSample",
+ "pages/base/patternLock/PatternLockPaddingSample",
+ "pages/base/patternLock/PatternLockMarginSample",
+ "pages/other/shape/ShapeHome",
+ "pages/other/shape/ShapeCreateSample",
+ "pages/other/shape/ShapeFillSample",
+ "pages/other/shape/ShapeFillOpacitySample",
+ "pages/other/shape/ShapeStrokeSample",
+ "pages/other/shape/ShapeStrokeDashArraySample",
+ "pages/other/shape/ShapeStrokeDashOffsetSample",
+ "pages/other/shape/ShapeStrokeWidthSample",
+ "pages/other/shape/ShapeWidthSample",
+ "pages/other/shape/ShapeHeightSample",
+ "pages/other/shape/ShapePaddingSample",
+ "pages/other/shape/ShapeMarginSample",
+ "pages/other/path/PathHome",
+ "pages/other/path/PathCreateSample",
+ "pages/other/path/PathFillSample",
+ "pages/other/path/PathFillOpacitySample",
+ "pages/other/path/PathStrokeSample",
+ "pages/other/path/PathStrokeDashArraySample",
+ "pages/other/path/PathStrokeDashOffsetSample",
+ "pages/other/path/PathStrokeWidthSample",
+ "pages/other/path/PathWidthSample",
+ "pages/other/path/PathHeightSample",
+ "pages/other/path/PathPaddingSample",
+ "pages/other/path/PathMarginSample",
+ "pages/other/line/LineHome",
+ "pages/other/line/LineCreateSample",
+ "pages/other/line/LineFillSample",
+ "pages/other/line/LineFillOpacitySample",
+ "pages/other/line/LineStrokeSample",
+ "pages/other/line/LineStrokeDashArraySample",
+ "pages/other/line/LineStrokeDashOffsetSample",
+ "pages/other/line/LineStrokeWidthSample",
+ "pages/other/line/LineWidthSample",
+ "pages/other/line/LineHeightSample",
+ "pages/other/line/LinePaddingSample",
+ "pages/other/line/LineMarginSample",
+ "pages/other/circle/CircleHome",
+ "pages/other/circle/CircleCreateSample",
+ "pages/other/circle/CircleFillSample",
+ "pages/other/circle/CircleFillOpacitySample",
+ "pages/other/circle/CircleStrokeSample",
+ "pages/other/circle/CircleStrokeDashArraySample",
+ "pages/other/circle/CircleStrokeDashOffsetSample",
+ "pages/other/circle/CircleStrokeWidthSample",
+ "pages/other/circle/CircleWidthSample",
+ "pages/other/circle/CircleHeightSample",
+ "pages/other/circle/CirclePaddingSample",
+ "pages/other/circle/CircleMarginSample",
+ "pages/other/polyline/PolylineHome",
+ "pages/other/polyline/PolylineCreateSample",
+ "pages/other/polyline/PolylineFillSample",
+ "pages/other/polyline/PolylineFillOpacitySample",
+ "pages/other/polyline/PolylineStrokeSample",
+ "pages/other/polyline/PolylineStrokeDashArraySample",
+ "pages/other/polyline/PolylineStrokeDashOffsetSample",
+ "pages/other/polyline/PolylineStrokeWidthSample",
+ "pages/other/polyline/PolylineWidthSample",
+ "pages/other/polyline/PolylineHeightSample",
+ "pages/other/polyline/PolylinePaddingSample",
+ "pages/other/polyline/PolylineMarginSample",
+ "pages/container/sideBarContainer/SideBarContainerHome",
+ "pages/container/sideBarContainer/SideBarContainerCreateSample",
+ "pages/container/sideBarContainer/SideBarContainerWidthSample",
+ "pages/container/sideBarContainer/SideBarContainerHeightSample",
+ "pages/container/sideBarContainer/SideBarContainerPaddingSample",
+ "pages/container/sideBarContainer/SideBarContainerMarginSample",
+ "pages/container/sideBarContainer/SideBarContainerShowSideBarSample",
+ "pages/container/sideBarContainer/SideBarContainerControlButtonSample",
+ "pages/container/sideBarContainer/SideBarContainerShowControlButtonSample",
+ "pages/container/sideBarContainer/SideBarContainerSideBarWidthSample",
+ "pages/container/sideBarContainer/SideBarContainerAutoHideSample",
+ "pages/container/sideBarContainer/SideBarContainerSideBarPositionSample",
+ "pages/container/sideBarContainer/SideBarContainerDividerSample",
+ "pages/container/sideBarContainer/SideBarContainerMinContentWidthSample",
+ "pages/container/sideBarContainer/SideBarContainerMinSideBarWidthSample",
+ "pages/container/sideBarContainer/SideBarContainerMaxSideBarWidthSample",
+ "pages/container/sideBarContainer/SideBarContainerDragSideBarSample",
+ "pages/container/sideBarContainer/SideBarContainerDragContentSample",
+ "pages/base/imageAnimator/ImageAnimatorHome",
+ "pages/base/imageAnimator/ImageAnimatorCreateSample",
+ "pages/base/imageAnimator/ImageAnimatorWidthSample",
+ "pages/base/imageAnimator/ImageAnimatorHeightSample",
+ "pages/base/imageAnimator/ImageAnimatorPaddingSample",
+ "pages/base/imageAnimator/ImageAnimatorMarginSample",
+ "pages/base/imageAnimator/ImageAnimatorImagesSample",
+ "pages/base/imageAnimator/ImageAnimatorStateSample",
+ "pages/base/imageAnimator/ImageAnimatorDurationSample",
+ "pages/base/imageAnimator/ImageAnimatorReverseSample",
+ "pages/base/imageAnimator/ImageAnimatorFixedSizeSample",
+ "pages/base/imageAnimator/ImageAnimatorFillModeSample",
+ "pages/base/imageAnimator/ImageAnimatorIterationsSample",
+ "pages/base/loadingProgress/LoadingProgressHome",
+ "pages/base/loadingProgress/LoadingProgressCreateSample",
+ "pages/base/loadingProgress/LoadingProgressWidthSample",
+ "pages/base/loadingProgress/LoadingProgressHeightSample",
+ "pages/base/loadingProgress/LoadingProgressPaddingSample",
+ "pages/base/loadingProgress/LoadingProgressMarginSample",
+ "pages/base/loadingProgress/LoadingProgressEnableLoadingSample",
+ "pages/base/textTimer/TextTimerHome",
+ "pages/base/textTimer/TextTimerCreateSample",
+ "pages/base/textTimer/TextTimerWidthSample",
+ "pages/base/textTimer/TextTimerHeightSample",
+ "pages/base/textTimer/TextTimerPaddingSample",
+ "pages/base/textTimer/TextTimerMarginSample",
+ "pages/base/textTimer/TextTimerControllerSample",
+ "pages/base/textTimer/TextTimerFormatSample",
+ "pages/base/blank/BlankHome",
+ "pages/base/blank/BlankCreateSample",
+ "pages/base/blank/BlankWidthSample",
+ "pages/base/blank/BlankHeightSample",
+ "pages/base/blank/BlankPaddingSample",
+ "pages/base/blank/BlankMarginSample",
+ "pages/base/blank/BlankMinSample",
+ "pages/base/radio/RadioHome",
+ "pages/base/radio/RadioCreateSample",
+ "pages/base/radio/RadioWidthSample",
+ "pages/base/radio/RadioHeightSample",
+ "pages/base/radio/RadioPaddingSample",
+ "pages/base/radio/RadioMarginSample",
+ "pages/base/scrollBar/ScrollBarHome",
+ "pages/base/scrollBar/ScrollBarCreateSample",
+ "pages/base/scrollBar/ScrollBarWidthSample",
+ "pages/base/scrollBar/ScrollBarHeightSample",
+ "pages/base/scrollBar/ScrollBarPaddingSample",
+ "pages/base/scrollBar/ScrollBarMarginSample",
+ "pages/base/scrollBar/ScrollBarDirectionSample",
+ "pages/base/scrollBar/ScrollBarStateSample"
+ ]
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/main/resources/en_US/element/string.json b/performance/arkui/benchMark_Component/entry/src/main/resources/en_US/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..eac35c546b1311a1eb959a7c3b65654d264547db
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/resources/en_US/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "BenchMark"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/main/resources/zh_CN/element/string.json b/performance/arkui/benchMark_Component/entry/src/main/resources/zh_CN/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..8a3a845589d39cbe7a0b4894aedcd1127bce61dc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/main/resources/zh_CN/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "模块描述"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "BenchMark"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Ability.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Ability.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..5ebeaa432e5526066d2e18d8b65276d286383efe
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,2734 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { Driver, ON } from '@ohos.UiTest';
+import { KeyCode } from '@ohos.multimodalInput.keyCode';
+
+const driver = Driver.create();
+let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator();
+
+//通过id验证有没有这个组件 有的话点击一下
+async function checkButtonAndClickWithID(text: string, delayTime: number = 1000) {
+ let idName = text;
+ await driver.assertComponentExist(ON.id(idName));
+ let button = await driver.findComponent(ON.id(idName));
+ await button.click();
+ if (delayTime > 0) {
+ await driver.delayMs(delayTime);
+ }
+}
+
+async function pressBack() {
+ await driver.pressBack();
+ await driver.delayMs(1000);
+}
+
+export default function abilityTest() {
+ describe('ActsAbilityTest', () => {
+ beforeAll(() => {
+
+ })
+ beforeEach(() => {
+
+ })
+ afterEach(() => {
+
+ })
+ afterAll(() => {
+
+ })
+ /**
+ * 拉起应用
+ */
+ it(`Benchmark_StartAbility_001`, 0, async (done: Function) => {
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 begin');
+ try {
+ await abilityDelegatorRegistry.startAbility({
+ bundleName: 'cn.openharmony.benchmarksample',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (err) {
+ done();
+ }
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 end');
+ })
+
+ /**
+ * 点击首页Text
+ */
+ it(`TextBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Text');
+ //创建Text组件
+ await checkButtonAndClickWithID('TextCreate10Char');
+ await driver.delayMs(1000);
+ await pressBack();
+ // await checkButtonAndClickWithID('TextCreate100Char');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // //改变Align
+ // await checkButtonAndClickWithID('TextAlign10char');
+ // await checkButtonAndClickWithID('TextAlign.Start');
+ // await checkButtonAndClickWithID('TextAlign.Center');
+ // await checkButtonAndClickWithID('TextAlign.End');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAlign100Char');
+ // await checkButtonAndClickWithID('TextAlign.Start');
+ // await checkButtonAndClickWithID('TextAlign.Center');
+ // await checkButtonAndClickWithID('TextAlign.End');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('TextWidth10Char');
+ // await checkButtonAndClickWithID('TextChangeWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextWidth100Char');
+ // await checkButtonAndClickWithID('TextChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('TextHeight10Char');
+ // await checkButtonAndClickWithID('TextChangeHeight');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextHeight100Char');
+ // await checkButtonAndClickWithID('TextChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('TextPadding10Char');
+ // await checkButtonAndClickWithID('TextChangePadding');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextPadding100Char');
+ // await checkButtonAndClickWithID('TextChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('TextMargin10Char');
+ // await checkButtonAndClickWithID('TextChangeMargin');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextMargin100Char');
+ // await checkButtonAndClickWithID('TextChangeMargin');
+ // await pressBack();
+ // //改变Font
+ // await checkButtonAndClickWithID('TextFont10Char');
+ // await checkButtonAndClickWithID('TextChangeFont');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextFont100Char');
+ // await checkButtonAndClickWithID('TextChangeFont');
+ // await pressBack();
+ // //改变Text文本长度
+ // await checkButtonAndClickWithID('TextContent10Char');
+ // await checkButtonAndClickWithID('TextChangeContent');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextContent100Char');
+ // await checkButtonAndClickWithID('TextChangeContent');
+ // await pressBack();
+ // //改变TextIndent
+ // await checkButtonAndClickWithID('TextTextIndent10Char');
+ // await checkButtonAndClickWithID('TextChangeTextIndent');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTextIndent100Char');
+ // await checkButtonAndClickWithID('TextChangeTextIndent');
+ // await pressBack();
+ // //改变TextCase
+ // await checkButtonAndClickWithID('TextTextCase10Char');
+ // await checkButtonAndClickWithID('TextChangeTextCase');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTextCase100Char');
+ // await checkButtonAndClickWithID('TextChangeTextCase');
+ // await pressBack();
+ // //改变LetterSpacing
+ // await checkButtonAndClickWithID('TextLetterSpacing10Char');
+ // await checkButtonAndClickWithID('TextChangeTextLetterSpacing');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextLetterSpacing100Char');
+ // await checkButtonAndClickWithID('TextChangeTextLetterSpacing');
+ // await pressBack();
+ // //改变BaselineOffset
+ // await checkButtonAndClickWithID('TextBaselineOffset10Char');
+ // await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextBaselineOffset100Char');
+ // await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ // await pressBack();
+ // // 改变TextBaselineOffset
+ // await checkButtonAndClickWithID('TextLineHeight10Char');
+ // await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextLineHeight100Char');
+ // await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ // await pressBack();
+ // await driver.swipe(360, 1100, 360, 500, 200)
+ // //改变TextChangeMaxLines
+ // await checkButtonAndClickWithID('TextMaxLines10Char');
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('TextChangeMaxLines');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextMaxLines100Char');
+ // await checkButtonAndClickWithID('TextChangeMaxLines');
+ // await pressBack();
+ // //改变Overflow
+ // await checkButtonAndClickWithID('TextOverflow10Char');
+ // await checkButtonAndClickWithID('TextChangeOverflow');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextOverflow100Char');
+ // await checkButtonAndClickWithID('TextChangeOverflow');
+ // await pressBack();
+ // //改变heightAdaptivePolicy maxLine
+ // await checkButtonAndClickWithID('heightAdaptivePolicyOne10Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyOne');
+ // await pressBack();
+ // await checkButtonAndClickWithID('heightAdaptivePolicyOne100Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyOne');
+ // await pressBack();
+ // //改变heightAdaptivePolicy minfontSize
+ // await checkButtonAndClickWithID('heightAdaptivePolicyTwo10Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyTwo');
+ // await pressBack();
+ // await checkButtonAndClickWithID('heightAdaptivePolicyTwo100Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyTwo');
+ // await pressBack();
+ // //改变heightAdaptivePolicy content
+ // await checkButtonAndClickWithID('heightAdaptivePolicyThree10Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyThree');
+ // await pressBack();
+ // await checkButtonAndClickWithID('heightAdaptivePolicyThree100Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyThree');
+ // await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页GridRow
+ */
+ it(`GridRowBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('GridRow');
+
+ await checkButtonAndClickWithID('GridRowCreate');
+ await pressBack();
+
+ // await checkButtonAndClickWithID('GridRowWidth');
+ // await checkButtonAndClickWithID('GridRowWidth');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridRowHeight');
+ // await checkButtonAndClickWithID('GridRowHeight');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridRowPadding');
+ // await checkButtonAndClickWithID('GridRowPadding');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridRowMargin');
+ // await checkButtonAndClickWithID('GridRowMargin');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridRowColumns');
+ // await checkButtonAndClickWithID('GridRowColumns');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridRowGutter');
+ // await checkButtonAndClickWithID('GridRowGutter');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridRowDirection');
+ // await checkButtonAndClickWithID('GridRowDirection');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridRowBreakpoints');
+ // await checkButtonAndClickWithID('GridRowBreakpoints');
+ // await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页GridCol
+ */
+ it(`GridColBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('GridCol');
+
+ await checkButtonAndClickWithID('GridColCreate');
+ await pressBack();
+
+ // await checkButtonAndClickWithID('GridColOptionSpan');
+ // await checkButtonAndClickWithID('GridColOptionSpan');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColOptionOffset');
+ // await checkButtonAndClickWithID('GridColOptionOffset');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColOptionOrder');
+ // await checkButtonAndClickWithID('GridColOptionOrder');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColSpan');
+ // await checkButtonAndClickWithID('GridColSpan');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColOffset');
+ // await checkButtonAndClickWithID('GridColOffset');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColOrder');
+ // await checkButtonAndClickWithID('GridColOrder');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColWidth');
+ // await checkButtonAndClickWithID('GridColWidth');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColHeight');
+ // await checkButtonAndClickWithID('GridColHeight');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColPadding');
+ // await checkButtonAndClickWithID('GridColPadding');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('GridColMargin');
+ // await checkButtonAndClickWithID('GridColMargin');
+ // await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页TextInput
+ */
+ it(`TextInputBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextInput');
+ //创建TextInput组件
+ await checkButtonAndClickWithID('TextInputCreate10Char');
+ await driver.delayMs(1000);
+ await pressBack();
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('TextInputCreate100Char');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ //
+ // //改变width
+ // await checkButtonAndClickWithID('TextInputWidth10Char');
+ // await checkButtonAndClickWithID('TextInputChangeWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextInputWidth100Char');
+ // await checkButtonAndClickWithID('TextInputChangeWidth');
+ // await pressBack();
+ //
+ // //改变height
+ // await checkButtonAndClickWithID('TextInputHeight10Char');
+ // await checkButtonAndClickWithID('TextInputChangeHeight');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextInputHeight100Char');
+ // await checkButtonAndClickWithID('TextInputChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('TextInputPadding10Char');
+ // await checkButtonAndClickWithID('TextInputChangePadding');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextInputPadding100Char');
+ // await checkButtonAndClickWithID('TextInputChangePadding');
+ // await pressBack();
+ //
+ // //改变Margin
+ // await checkButtonAndClickWithID('TextInputMargin10Char');
+ // await checkButtonAndClickWithID('TextInputChangeMargin');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextInputMargin100Char');
+ // await checkButtonAndClickWithID('TextInputChangeMargin');
+ // await pressBack();
+ //
+ // //改变Align
+ // await checkButtonAndClickWithID('TextInputAlign10Char');
+ // await checkButtonAndClickWithID('TextInputAlign.Start');
+ // await checkButtonAndClickWithID('TextInputAlign.Center');
+ // await checkButtonAndClickWithID('TextInputAlign.End');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextInputAlign100Char');
+ // await checkButtonAndClickWithID('TextInputAlign.Start');
+ // await checkButtonAndClickWithID('TextInputAlign.Center');
+ // await checkButtonAndClickWithID('TextInputAlign.End');
+ // await pressBack();
+ //
+ // //改变InputType
+ // await checkButtonAndClickWithID('TextInputType10Char');
+ // await checkButtonAndClickWithID('TextInputType.Norma');
+ // await checkButtonAndClickWithID('TextInputType.Password');
+ // await checkButtonAndClickWithID('TextInputType.Email');
+ // await checkButtonAndClickWithID('TextInputType.Number');
+ // await checkButtonAndClickWithID('TextInputType.PhoneNumber');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextInputType100Char');
+ // await checkButtonAndClickWithID('TextInputType.Norma');
+ // await checkButtonAndClickWithID('TextInputType.Password');
+ // await checkButtonAndClickWithID('TextInputType.Email');
+ // await checkButtonAndClickWithID('TextInputType.Number');
+ // await checkButtonAndClickWithID('TextInputType.PhoneNumber');
+ // await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Image
+ */
+ it(`ImageBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Image');
+
+ await checkButtonAndClickWithID('ImageCreate');
+ await pressBack();
+
+ // await checkButtonAndClickWithID('ImageWidth');
+ // await checkButtonAndClickWithID('ImageWidth');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImageHeight');
+ // await checkButtonAndClickWithID('ImageHeight');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImagePadding');
+ // await checkButtonAndClickWithID('ImagePadding');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImageMargin');
+ // await checkButtonAndClickWithID('ImageMargin');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImageObjectFit');
+ // await checkButtonAndClickWithID('ImageObjectFit_Contain');
+ // await checkButtonAndClickWithID('ImageObjectFit_Cover');
+ // await checkButtonAndClickWithID('ImageObjectFit_Auto');
+ // await checkButtonAndClickWithID('ImageObjectFit_Fill');
+ // await checkButtonAndClickWithID('ImageObjectFit_ScaleDown');
+ // await checkButtonAndClickWithID('ImageObjectFit_None');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImageObjectRepeat');
+ // await checkButtonAndClickWithID('ImageObjectRepeat_X');
+ // await checkButtonAndClickWithID('ImageObjectRepeat_Y');
+ // await checkButtonAndClickWithID('ImageObjectRepeat_XY');
+ // await checkButtonAndClickWithID('ImageObjectRepeat_NoRepeat');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImageAutoResize');
+ // await checkButtonAndClickWithID('ImageAutoResize');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImageInterpolation');
+ // await checkButtonAndClickWithID('ImageInterpolation_None');
+ // await checkButtonAndClickWithID('ImageInterpolation_High');
+ // await checkButtonAndClickWithID('ImageInterpolation_Medium');
+ // await checkButtonAndClickWithID('ImageInterpolation_Low');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ImageFitOriginalSize');
+ // await checkButtonAndClickWithID('ImageFitOriginalSize');
+ // await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Row
+ */
+ it(`RowBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Row');
+ //创建Row组件
+ await checkButtonAndClickWithID('RowCreate');
+ await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('RowWidth');
+ // await checkButtonAndClickWithID('RowChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('RowHeight');
+ // await checkButtonAndClickWithID('RowChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('RowPadding');
+ // await checkButtonAndClickWithID('RowChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('RowMargin');
+ // await checkButtonAndClickWithID('RowChangeMargin');
+ // await pressBack();
+ // //改变space
+ // await checkButtonAndClickWithID('RowSpace');
+ // await checkButtonAndClickWithID('RowChangeSpace');
+ // await pressBack();
+ // //改变magin space
+ // await checkButtonAndClickWithID('RowMarginSpace');
+ // await checkButtonAndClickWithID('RowChangeMarginSpace');
+ // await pressBack();
+ // //改变Aligin
+ // await checkButtonAndClickWithID('RowAlign');
+ // await checkButtonAndClickWithID('VerticalAlign.Top');
+ // await checkButtonAndClickWithID('VerticalAlign.Center');
+ // await checkButtonAndClickWithID('VerticalAlign.Bottom');
+ // await pressBack();
+ // //改变JustifyContent
+ // await checkButtonAndClickWithID('RowJustify');
+ // await checkButtonAndClickWithID('FlexAlign.Start');
+ // await checkButtonAndClickWithID('FlexAlign.Center');
+ // await checkButtonAndClickWithID('FlexAlign.End');
+ // await checkButtonAndClickWithID('FlexAlign.SpaceBetween');
+ // await checkButtonAndClickWithID('FlexAlign.SpaceAround');
+ // await checkButtonAndClickWithID('FlexAlign.SpaceEvenly');
+ // await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Column
+ */
+ it(`ColumnBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Column');
+ //创建Column组件
+ await checkButtonAndClickWithID('ColumnCreate');
+ await pressBack();
+ //改变width
+ // await checkButtonAndClickWithID('ColumnWidth');
+ // await checkButtonAndClickWithID('ColumnChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('ColumnHeight');
+ // await checkButtonAndClickWithID('ColumnChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('ColumnPadding');
+ // await checkButtonAndClickWithID('ColumnChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('ColumnMargin');
+ // await checkButtonAndClickWithID('ColumnChangeMargin');
+ // await pressBack();
+ // //改变space
+ // await checkButtonAndClickWithID('ColumnSpace');
+ // await checkButtonAndClickWithID('ColumnChangeSpace');
+ // await pressBack();
+ // //改变magin space
+ // await checkButtonAndClickWithID('ColumnMarginSpace');
+ // await checkButtonAndClickWithID('ColumnChangeMarginSpace');
+ // await pressBack();
+ // //改变Aligin
+ // await checkButtonAndClickWithID('ColumnAlign');
+ // await checkButtonAndClickWithID('HorizontalAlign.Start');
+ // await checkButtonAndClickWithID('HorizontalAlign.Center');
+ // await checkButtonAndClickWithID('HorizontalAlign.End');
+ // await pressBack();
+ // //改变JustifyContent
+ // await checkButtonAndClickWithID('ColumnJustify');
+ // await checkButtonAndClickWithID('FlexAlign.Start');
+ // await checkButtonAndClickWithID('FlexAlign.Center');
+ // await checkButtonAndClickWithID('FlexAlign.End');
+ // await checkButtonAndClickWithID('FlexAlign.SpaceBetween');
+ // await checkButtonAndClickWithID('FlexAlign.SpaceAround');
+ // await checkButtonAndClickWithID('FlexAlign.SpaceEvenly');
+ // await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页List
+ */
+ it(`ListBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('List');
+
+ await checkButtonAndClickWithID('ListCreate');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListWidth');
+ await checkButtonAndClickWithID('ListWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListHeight');
+ await checkButtonAndClickWithID('ListHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListPadding');
+ await checkButtonAndClickWithID('ListPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListMargin');
+ await checkButtonAndClickWithID('ListMargin');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemWidth');
+ await checkButtonAndClickWithID('ListItemWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemHeight');
+ await checkButtonAndClickWithID('ListItemHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemPadding');
+ await checkButtonAndClickWithID('ListItemPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemMargin');
+ await checkButtonAndClickWithID('ListItemMargin');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemGroupDivider');
+ await checkButtonAndClickWithID('ListItemGroupDivider');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemGroupSpace');
+ await checkButtonAndClickWithID('ListItemGroupSpace');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListSpace');
+ await checkButtonAndClickWithID('ListSpace');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListListDirection');
+ await checkButtonAndClickWithID('ListListDirection');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListAlignListItem');
+ await checkButtonAndClickWithID('ListAlignListItem_Start');
+ await checkButtonAndClickWithID('ListAlignListItem_Center');
+ await checkButtonAndClickWithID('ListAlignListItem_End');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListLanes');
+ await checkButtonAndClickWithID('ListLanes');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListCachedCount');
+ await checkButtonAndClickWithID('ListCachedCount');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListDivider');
+ await checkButtonAndClickWithID('ListDivider');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListScrollBar');
+ await checkButtonAndClickWithID('ListScrollBar_Off');
+ await checkButtonAndClickWithID('ListScrollBar_On');
+ await checkButtonAndClickWithID('ListScrollBar_Auto');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListRemoveItem');
+ await checkButtonAndClickWithID('ListChangeRemoveItem');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListAddItem');
+ await checkButtonAndClickWithID('ListAddItem');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListEdgeEffect');
+ await checkButtonAndClickWithID('ListEdgeEffect_Spring');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListEdgeEffect_Fade');
+ await driver.swipe(100, 300, 100, 900);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListEdgeEffect_None');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListChainAnimation');
+ await checkButtonAndClickWithID('ListChainAnimation');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListFriction');
+ await checkButtonAndClickWithID('ListFriction');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListEnableScrollInteraction');
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_true');
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_Scroller');
+ await driver.delayMs(500);
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_false');
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_Scroller');
+ await driver.delayMs(500);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListScrollSnapAlign');
+ await checkButtonAndClickWithID('ListScrollSnapAlign_NONE');
+ await driver.swipe(600, 1080, 600, 300);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListScrollSnapAlign_START');
+ await driver.swipe(100, 500, 100, 1080);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListScrollSnapAlign_CENTER');
+ await driver.swipe(600, 1080, 600, 100);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListScrollSnapAlign_END');
+ await driver.swipe(100, 500, 100, 1080);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListChainAnimationOptions');
+ await checkButtonAndClickWithID('ListChainAnimationOptions');
+ await driver.swipe(600, 1080, 600, 300);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListSticky');
+ await checkButtonAndClickWithID('ListSticky_None');
+ await driver.swipe(600, 1080, 600, 300);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListSticky_Header');
+ await driver.swipe(100, 500, 100, 1080);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListSticky_Footer');
+ await driver.swipe(600, 1080, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Scroll
+ */
+ it(`ScrollBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Scroll');
+ //创建Scroll组件
+ await checkButtonAndClickWithID('ScrollCreate');
+ await pressBack();
+
+ //改变width
+ // await checkButtonAndClickWithID('ScrollWidth');
+ // await checkButtonAndClickWithID('ScrollWidth');
+ // await pressBack();
+ //
+ // //改变height
+ // await checkButtonAndClickWithID('ScrollHeight');
+ // await checkButtonAndClickWithID('ScrollHeight');
+ // await pressBack();
+ //
+ // //改变Padding
+ // await checkButtonAndClickWithID('ScrollPadding');
+ // await checkButtonAndClickWithID('ScrollPadding');
+ // await pressBack();
+ //
+ // //改变Margin
+ // await checkButtonAndClickWithID('ScrollMargin');
+ // await checkButtonAndClickWithID('ScrollMargin');
+ // await pressBack();
+ //
+ //
+ // //改变EnableScrollInteraction
+ // await checkButtonAndClickWithID('ScrollEnableScrollInteractionTrueToFalse');
+ // await checkButtonAndClickWithID('ScrollEnableScrollInteractionTrueToFalse');
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ScrollEnableScrollInteractionFalseToTrue');
+ // await checkButtonAndClickWithID('ScrollEnableScrollInteractionFalseToTrue');
+ // await pressBack();
+ //
+ // //拖动场景下Scroll组件更新布局耗时
+ // await checkButtonAndClickWithID('ScrollDrag');
+ // await driver.fling({
+ // x: 100, y: 1100
+ // }, {
+ // x: 100, y: 500
+ // }, 100, 100)
+ // await pressBack();
+ //
+ // //抛滑场景下Scroll组件更新布局耗时
+ // await checkButtonAndClickWithID('ScrollSlippage');
+ // await driver.fling({
+ // x: 100, y: 1100
+ // }, {
+ // x: 100, y: 500
+ // }, 100, 600)
+ // await pressBack();
+ // //Scroll组件调用scrollTo触发页面跳转布局
+ // await checkButtonAndClickWithID('ScrollScrollTo');
+ // await checkButtonAndClickWithID('ScrollScrollTo');
+ // await pressBack();
+ // //Scroll组件调用scrollEdge触发页面跳转布局
+ // await checkButtonAndClickWithID('ScrollScrollEdge');
+ // await checkButtonAndClickWithID('ScrollScrollEdge');
+ // await pressBack();
+ // //Scroll组件edgeEffect属性更新布局耗时
+ // await checkButtonAndClickWithID('ScrollEdgeEffectSpring');
+ // await checkButtonAndClickWithID('ScrollEdgeEffectSpring');
+ // await driver.swipe(100, 1100, 100, 500, 200)
+ // await pressBack();
+ //
+ //
+ // await checkButtonAndClickWithID('ScrollEdgeEffectFade');
+ // await checkButtonAndClickWithID('ScrollEdgeEffectFade');
+ // await driver.swipe(100, 1100, 100, 500, 200)
+ // await pressBack();
+ //
+ // await checkButtonAndClickWithID('ScrollEdgeEffectNone');
+ // await checkButtonAndClickWithID('ScrollEdgeEffectNone');
+ // await driver.swipe(100, 1100, 100, 500, 200)
+ // await pressBack();
+ //
+ // //Scroll组件调用scrollBy触发页面跳转布局
+ // await checkButtonAndClickWithID('ScrollScrollBy');
+ // await checkButtonAndClickWithID('ScrollScrollBy');
+ // await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Tab
+ */
+ it(`TabsBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Tabs');
+ //创建Tab组件
+ await checkButtonAndClickWithID('TabsCreate');
+ await pressBack();
+ //改变width
+ // await checkButtonAndClickWithID('TabsWidth');
+ // await checkButtonAndClickWithID('TabChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('TabsHeight');
+ // await checkButtonAndClickWithID('TabsChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('TabsPadding');
+ // await checkButtonAndClickWithID('TabsChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('TabsMargin');
+ // await checkButtonAndClickWithID('TabsChangeMargin');
+ // await pressBack();
+ // //改变Vertical
+ // await checkButtonAndClickWithID('TabsVertical');
+ // await checkButtonAndClickWithID('TabsChangeVertical');
+ // await pressBack();
+ // //改变TabsBarMode
+ // await checkButtonAndClickWithID('TabsBarMode');
+ // await checkButtonAndClickWithID('TabsChangeTabsBarMode');
+ // await pressBack();
+ // //改变Divider
+ // await checkButtonAndClickWithID('TabsDivider');
+ // await checkButtonAndClickWithID('TabsChangeDivider');
+ // await pressBack();
+ // //改变BarPosition
+ // await checkButtonAndClickWithID('TabsBarPosition');
+ // await checkButtonAndClickWithID('TabsChangeBarPosition');
+ // await pressBack();
+ // await driver.delayMs(1000);
+ // //改变tabIndex
+ // await checkButtonAndClickWithID('TabsIndex');
+ // await driver.delayMs(2000);
+ // await checkButtonAndClickWithID('TabsChangeIndex');
+ // await pressBack();
+ // //改变BarWidth
+ // await checkButtonAndClickWithID('TabsBarWidth');
+ // await checkButtonAndClickWithID('TabChangeBarWidth');
+ // await pressBack();
+ // //改变BarHeight
+ // await checkButtonAndClickWithID('TabsBarHeight');
+ // await checkButtonAndClickWithID('TabChangeBarHeight');
+ // await pressBack();
+ // //抛滑Fling
+ // await checkButtonAndClickWithID('TabsFling');
+ // await driver.fling({
+ // x: 100, y: 500
+ // }, {
+ // x: 700, y: 500
+ // }, 100, 100)
+ // await pressBack();
+ // //抛滑Drag
+ // await checkButtonAndClickWithID('TabsDrag');
+ // await driver.fling({
+ // x: 700, y: 500
+ // }, {
+ // x: 100, y: 500
+ // }, 100, 100)
+ // await pressBack();
+ // //点击页签ClickTab
+ // await checkButtonAndClickWithID('TabsClickTab');
+ // await checkButtonAndClickWithID('TabsChangeIndex');
+ // await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Swiper
+ */
+ it(`SwiperBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Swiper');
+ await checkButtonAndClickWithID('SwiperCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperIndexSample');
+ await checkButtonAndClickWithID('change index 5 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperVerticalSample');
+ await checkButtonAndClickWithID('change Vertical false to true');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperItemSpaceSample');
+ await checkButtonAndClickWithID('change itemSpace 0 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperDisplayModeSample');
+ await checkButtonAndClickWithID('change displayMode to STRETCH');
+ await checkButtonAndClickWithID('change displayMode to AUTO_LINEAR');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperDisplayCountSample');
+ await checkButtonAndClickWithID('change displayCount 1 to 3');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperNextMarginSample');
+ await checkButtonAndClickWithID('change nextMargin 0 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperPrevMarginSample');
+ await checkButtonAndClickWithID('change prevMargin 0 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperCurveSample');
+ await checkButtonAndClickWithID('change curve to Linear');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Ease');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to EaseIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to EaseOut');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to EaseInOut');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to FastOutSlowIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to LinearOutSlowIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to FastOutLinearIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to ExtremeDeceleration');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Sharp');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Rhythm');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Smooth');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Friction');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperControllerShowNextSample');
+ await checkButtonAndClickWithID('swiperController showNext');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperManualSlidingSample');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperLoopSample');
+ await checkButtonAndClickWithID('change loop false to true');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperEffectModeSample');
+ await checkButtonAndClickWithID('change effectMode to Spring');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change effectMode to Fade');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change effectMode to None');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperDurationSample');
+ await checkButtonAndClickWithID('change duration 200 to 500');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Navigation
+ */
+ it(`NavigationBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Navigation');
+ await checkButtonAndClickWithID('NavigationCreateSample');
+ await pressBack();
+ // await checkButtonAndClickWithID('NavigationWidthSample');
+ // await checkButtonAndClickWithID('change width 500 to 600');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationHeightSample');
+ // await checkButtonAndClickWithID('change height 300 to 400');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationTitleModeSample');
+ // await checkButtonAndClickWithID('change titleMode to Free');
+ // await checkButtonAndClickWithID('change titleMode to Full');
+ // await checkButtonAndClickWithID('change titleMode to Mini');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationHideToolBarSample');
+ // await checkButtonAndClickWithID('change hideToolBar true to false');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationHideTitleBarSample');
+ // await checkButtonAndClickWithID('change hideTitleBar true to false');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationHideBackButtonSample');
+ // await checkButtonAndClickWithID('change hideBackButton true to false');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationNavBarWidthSample');
+ // await checkButtonAndClickWithID('change navBarWidth 240 to 400');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationModeSample');
+ // await checkButtonAndClickWithID('change navigationMode Stack to Split');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationNavBarPositionSample');
+ // await checkButtonAndClickWithID('change navBarPosition Start to End');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationHideNavBarSample');
+ // await checkButtonAndClickWithID('change hideNavBar Stack to Split');
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationStackJumpSample');
+ // await checkButtonAndClickWithID('Stack jump to next page');
+ // await pressBack();
+ // await pressBack();
+ // await checkButtonAndClickWithID('NavigationSplitJumpSample');
+ // await checkButtonAndClickWithID('Split jump to next page');
+ // await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Grid
+ */
+ it(`GridBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Grid');
+ await checkButtonAndClickWithID('GridCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('GridWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('GridHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('GridPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GridMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCColumnsTemplateSample');
+ await checkButtonAndClickWithID('change columnsTemplate 1fr 1fr to 1fr 1fr 2fr');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCRowsTemplateSample');
+ await checkButtonAndClickWithID('change rowsTemplate 1fr 1fr to 1fr 1fr 2fr');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCRowsGapSample');
+ await checkButtonAndClickWithID('change rowsGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetCColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRRowsGapSample');
+ await checkButtonAndClickWithID('change rowsGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRRowsGapSample');
+ await checkButtonAndClickWithID('change rowsGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridMinCountSample');
+ await checkButtonAndClickWithID('change minCount 0 to 5');
+ await pressBack();
+ await checkButtonAndClickWithID('GridMaxCountSample');
+ await checkButtonAndClickWithID('change maxCount 10 to 5');
+ await pressBack();
+ await checkButtonAndClickWithID('GridNotSetRCColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 0 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridNotSetRCLayoutDirectionSample');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.Row');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.RowReverse');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.Row');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.ColumnReverse');
+ await pressBack();
+ await checkButtonAndClickWithID('GridNotSetRCCellLengthSample');
+ await checkButtonAndClickWithID('change cellLength 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('GridManualScrollingSample');
+ await driver.swipe(540, 1000, 540, 500, 200);
+ await pressBack();
+ await checkButtonAndClickWithID('GridScrollToSample');
+ await checkButtonAndClickWithID('change scrollTo to 100');
+ await pressBack();
+ await driver.swipe(540, 1000, 540, 500, 200);
+ await checkButtonAndClickWithID('GridScrollEdgeSample');
+ await checkButtonAndClickWithID('change scrollEdge to Edge.Bottom');
+ await pressBack();
+ await checkButtonAndClickWithID('GridScrollBySample');
+ await checkButtonAndClickWithID('change scrollBy to 100');
+ await pressBack();
+ await checkButtonAndClickWithID('GridEdgeEffectSample');
+ await checkButtonAndClickWithID('change edgeEffect to EdgeEffect.Spring');
+ await checkButtonAndClickWithID('change edgeEffect to EdgeEffect.Fade');
+ await checkButtonAndClickWithID('change edgeEffect to EdgeEffect.None');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Video
+ */
+ it(`VideoBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Video');
+ await checkButtonAndClickWithID('VideoCreateSample');
+ await driver.delayMs(1000);
+ await pressBack();
+ await checkButtonAndClickWithID('VideoWidthSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('VideoHeightSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('VideoPaddingSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('VideoMarginSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+ //
+ // *
+ // * 点击首页Flex
+ // it(`FlexBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Flex');
+ // await checkButtonAndClickWithID('FlexCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexWidthSample');
+ // await checkButtonAndClickWithID('change width 80% to 100%');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexHeightSample');
+ // await checkButtonAndClickWithID('change height 300 to 400');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexValueDirectionSample');
+ // await checkButtonAndClickWithID('change value direction to FlexDirection.Row');
+ // await checkButtonAndClickWithID('change value direction to FlexDirection.RowReverse');
+ // await checkButtonAndClickWithID('change value direction to FlexDirection.Column');
+ // await checkButtonAndClickWithID('change value direction to FlexDirection.ColumnReverse');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexValueWrapSample');
+ // await checkButtonAndClickWithID('change value wrap to FlexWrap.NoWrap');
+ // await checkButtonAndClickWithID('change value wrap to FlexWrap.Wrap');
+ // await checkButtonAndClickWithID('change value wrap to FlexWrap.WrapReverse');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexValueJustifyContentSample');
+ // await checkButtonAndClickWithID('change value justifyContent to FlexAlign.Start');
+ // await checkButtonAndClickWithID('change value justifyContent to FlexAlign.Center');
+ // await checkButtonAndClickWithID('change value justifyContent to FlexAlign.End');
+ // await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceBetween');
+ // await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceAround');
+ // await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceEvenly');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexValueAlignItemsSample');
+ // await checkButtonAndClickWithID('change value alignItems to ItemAlign.Auto');
+ // await checkButtonAndClickWithID('change value alignItems to ItemAlign.Start');
+ // await checkButtonAndClickWithID('change value alignItems to ItemAlign.Center');
+ // await checkButtonAndClickWithID('change value alignItems to ItemAlign.End');
+ // await checkButtonAndClickWithID('change value alignItems to ItemAlign.Stretch');
+ // await checkButtonAndClickWithID('change value alignItems to ItemAlign.Baseline');
+ // await pressBack();
+ // await checkButtonAndClickWithID('FlexValueAlignContentSample');
+ // await checkButtonAndClickWithID('change value alignContent to FlexAlign.Start');
+ // await checkButtonAndClickWithID('change value alignContent to FlexAlign.Center');
+ // await checkButtonAndClickWithID('change value alignContent to FlexAlign.End');
+ // await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceBetween');
+ // await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceAround');
+ // await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceEvenly');
+ // await pressBack();
+ // await pressBack();
+ // })
+
+ /**
+ * 点击首页Button
+ */
+ it(`ButtonBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Button');
+ await checkButtonAndClickWithID('ButtonCreateSample');
+ await pressBack();
+ // await checkButtonAndClickWithID('ButtonWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ButtonHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ButtonPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ButtonMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ButtonOptionTypeSample');
+ // await checkButtonAndClickWithID('change Option type to Circle');
+ // await checkButtonAndClickWithID('change Option type to Normal');
+ // await checkButtonAndClickWithID('change Option type to Capsule');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ButtonTypeSample');
+ // await checkButtonAndClickWithID('change Option type to Circle');
+ // await checkButtonAndClickWithID('change Option type to Normal');
+ // await checkButtonAndClickWithID('change Option type to Capsule');
+ // await pressBack();
+ await pressBack();
+ })
+
+ // /**
+ // * 点击首页Select
+ // */
+ // it(`SelectBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Select');
+ // //创建Select组件
+ // await checkButtonAndClickWithID('SelectCreate');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('SelectWidth');
+ // await checkButtonAndClickWithID('SelectChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('SelectHeight');
+ // await checkButtonAndClickWithID('SelectChangeHeight');
+ // await pressBack();
+ // //改变Size
+ // await checkButtonAndClickWithID('SelectSize');
+ // await checkButtonAndClickWithID('SelectChangeSize');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('SelectPadding');
+ // await checkButtonAndClickWithID('SelectChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('SelectMargin');
+ // await checkButtonAndClickWithID('SelectChangeMargin');
+ // await pressBack();
+ // //改变Space
+ // await checkButtonAndClickWithID('SelectSpace');
+ // await checkButtonAndClickWithID('SelectChangeSpace');
+ // await pressBack();
+ // //改变ArrowPosition
+ // await checkButtonAndClickWithID('SelectArrowPosition');
+ // await checkButtonAndClickWithID('SelectChangeArrowPosition');
+ // await pressBack();
+ // //首次展开
+ // await checkButtonAndClickWithID('SelectFirstExpand');
+ // await checkButtonAndClickWithID('SelectFirstExpand');
+ // await pressBack();
+ // await pressBack();
+ // //再次展开
+ // await checkButtonAndClickWithID('SelectSecondExpand');
+ // await checkButtonAndClickWithID('SelectSecondExpand');
+ // await checkButtonAndClickWithID('SelectSecondExpand');
+ // await checkButtonAndClickWithID('SelectSecondExpand');
+ // await pressBack();
+ // await pressBack();
+ // //首次展开后收起
+ // await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ // await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ // await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ // await pressBack();
+ // //多次展开后收起
+ // await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ // await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ // await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ // await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ // await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+
+ // /**
+ // * 点击首页CheckBox
+ // */
+ // it(`CheckboxBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('CheckBox');
+ // //创建CheckBox组件
+ // await checkButtonAndClickWithID('CheckBoxCreate');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('CheckBoxWidth');
+ // await checkButtonAndClickWithID('CheckBoxChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('CheckBoxHeight');
+ // await checkButtonAndClickWithID('CheckBoxChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('CheckBoxPadding');
+ // await checkButtonAndClickWithID('CheckBoxChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('CheckBoxMargin');
+ // await checkButtonAndClickWithID('CheckBoxChangeMargin');
+ // await pressBack();
+ // //改变Size
+ // await checkButtonAndClickWithID('CheckBoxSize');
+ // await checkButtonAndClickWithID('CheckBoxChangeSize');
+ // await pressBack();
+ // //改变Select
+ // await checkButtonAndClickWithID('CheckBoxSelect');
+ // await checkButtonAndClickWithID('CheckBoxChangeSelect');
+ // await pressBack();
+ // //改变MarkStyle
+ // await checkButtonAndClickWithID('CheckBoxMarkStyle');
+ // await checkButtonAndClickWithID('CheckBoxChangeMarkStyle');
+ // await pressBack();
+ // //GroupSelect
+ // await checkButtonAndClickWithID('CheckBoxGroupSelect');
+ // await checkButtonAndClickWithID('CheckBoxChangeSelect');
+ // await pressBack();
+ // //GroupCancelSelect
+ // await checkButtonAndClickWithID('CheckBoxGroupCancelSelect');
+ // await checkButtonAndClickWithID('CheckBoxChangeCancelSelect');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+
+
+ // /**
+ // * 点击首页Span
+ // */
+ // it(`SpanboxBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Span');
+ // //Text内创建Span组件
+ // await checkButtonAndClickWithID('SpanCreateInText');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // //RichEditor内创建Span组件
+ // await checkButtonAndClickWithID('SpanCreateInRichEditor');
+ // await pressBack();
+ // //Text内改变value
+ // await checkButtonAndClickWithID('SpanValueInText');
+ // await checkButtonAndClickWithID('SpanChangeValueInText');
+ // await pressBack();
+ // //RichEditor内改变value
+ // await checkButtonAndClickWithID('SpanValueInRichEditor');
+ // await checkButtonAndClickWithID('SpanChangeValueInRichEditor');
+ // await pressBack();
+ // //Text内改变LetterSpacing
+ // await checkButtonAndClickWithID('SpanLetterSpacingInText');
+ // await checkButtonAndClickWithID('SpanChangeLetterSpacingInText');
+ // await pressBack();
+ // //RichEditor内改变LetterSpacing
+ // await checkButtonAndClickWithID('SpanLetterSpacingInRichEditor');
+ // await checkButtonAndClickWithID('SpanChangeLetterSpacingInRichEditor');
+ // await pressBack();
+ // // Text内改变LetterSpacing
+ // await checkButtonAndClickWithID('SpanTextCaseInText');
+ // await checkButtonAndClickWithID('TextCase.Normal.Text');
+ // await checkButtonAndClickWithID('TextCase.LowerCase.Text');
+ // await checkButtonAndClickWithID('TextCase.UpperCase.Text');
+ // await pressBack();
+ // //RichEditor内改变LetterSpacing
+ // await checkButtonAndClickWithID('SpanTextCaseInRichEditor');
+ // await checkButtonAndClickWithID('TextCase.Normal.RichEditor');
+ // await checkButtonAndClickWithID('TextCase.LowerCase.RichEditor');
+ // await checkButtonAndClickWithID('TextCase.UpperCase.RichEditor');
+ // await pressBack();
+ // //Text内改变font
+ // await checkButtonAndClickWithID('SpanFontInText');
+ // await checkButtonAndClickWithID('SpanChangeFontInText');
+ // await pressBack();
+ // //RichEditor内改变Font
+ // await checkButtonAndClickWithID('SpanFontInRichEditor');
+ // await checkButtonAndClickWithID('SpanChangeFontInRichEditor');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+
+ /**
+ * 点击首页Slider
+ */
+ it(`SliderBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Slider');
+ //创建Slider组件
+ await checkButtonAndClickWithID('SliderCreate');
+ await pressBack();
+ //改变width
+ // await checkButtonAndClickWithID('SliderWidth');
+ // await checkButtonAndClickWithID('SliderChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('SliderHeight');
+ // await checkButtonAndClickWithID('SliderChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('SliderPadding');
+ // await checkButtonAndClickWithID('SliderChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('SliderMargin');
+ // await checkButtonAndClickWithID('SliderChangeMargin');
+ // await pressBack();
+ // //改变Step
+ // await checkButtonAndClickWithID('SliderStep');
+ // await checkButtonAndClickWithID('SliderChangeStep');
+ // await pressBack();
+ // //改变Direction
+ // await checkButtonAndClickWithID('SliderDirection');
+ // await checkButtonAndClickWithID('SliderChangeDirection');
+ // await pressBack();
+ // //改变reverse
+ // await checkButtonAndClickWithID('SliderReverse');
+ // await checkButtonAndClickWithID('SliderChangeReverse');
+ // await pressBack();
+ // //改变Style
+ // await checkButtonAndClickWithID('SliderStyle');
+ // await checkButtonAndClickWithID('SliderChangeStyle');
+ // await pressBack();
+ // //改变TrackThickness
+ // await checkButtonAndClickWithID('SliderTrackThickness');
+ // await checkButtonAndClickWithID('SliderChangeTrackThickness');
+ // await pressBack();
+ // //改变BlockSize
+ // await checkButtonAndClickWithID('SliderBlockSize');
+ // await checkButtonAndClickWithID('SliderChangeBlockSize');
+ // await pressBack();
+ // //手指滑动
+ // await checkButtonAndClickWithID('SliderFingerSliding');
+ // await driver.swipe(13, 296, 383, 296, 200);
+ // await pressBack();
+ // //手指点击滑轨
+ // await checkButtonAndClickWithID('SliderClick');
+ // await driver.click(383, 296);
+ // await pressBack();
+ // // 鼠标滚轮调节滑块位置
+ // await checkButtonAndClickWithID('SliderMouseScroll');
+ // await driver.mouseScroll({
+ // x: 163, y: 339
+ // }, true, 20);
+ // await pressBack();
+ // // 外接键盘调节滑块位置
+ // await checkButtonAndClickWithID('SliderKeyboardScroll');
+ // // await driver.triggerKey(KeyCode.KEYCODE_DPAD_RIGHT);
+ // await driver.swipe(13, 296, 383, 296, 200);
+ // await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ // /**
+ // * 点击首页Divider
+ // */
+ // it(`DividerBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Divider');
+ // //创建Divider组件
+ // await checkButtonAndClickWithID('DividerCreate');
+ // await pressBack();
+ // //更改StrokeWidth
+ // await checkButtonAndClickWithID('DividerStrokeWidth');
+ // await checkButtonAndClickWithID('DividerChangeStrokeWidth');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('DividerWidth');
+ // await checkButtonAndClickWithID('DividerChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('DividerHeight');
+ // await checkButtonAndClickWithID('DividerChangeHeight');
+ // await pressBack();
+ // //改变Size
+ // await checkButtonAndClickWithID('DividerSize');
+ // await checkButtonAndClickWithID('DividerChangeSize');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('DividerPadding');
+ // await checkButtonAndClickWithID('DividerChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('DividerMargin');
+ // await checkButtonAndClickWithID('DividerChangeMargin');
+ // await pressBack();
+ // //改变Color
+ // await checkButtonAndClickWithID('DividerColor');
+ // await checkButtonAndClickWithID('DividerChangeColor');
+ // await pressBack();
+ // //改变Vertical
+ // await checkButtonAndClickWithID('DividerVertical');
+ // await checkButtonAndClickWithID('DividerChangeVerticalTrue');
+ // await checkButtonAndClickWithID('DividerChangeVerticalFalse');
+ // await pressBack();
+ // //改变LineCap
+ // await checkButtonAndClickWithID('DividerLineCap');
+ // await checkButtonAndClickWithID('DividerChangeLineCapButt');
+ // await checkButtonAndClickWithID('DividerChangeLineCapRound');
+ // await checkButtonAndClickWithID('DividerChangeLineCapSquare');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+
+ /**
+ * 点击首页Toggle
+ */
+ it(`ToggleBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Toggle');
+ await checkButtonAndClickWithID('ToggleCreateSample');
+ await pressBack();
+ // await checkButtonAndClickWithID('ToggleSelectedColorSample');
+ // await checkButtonAndClickWithID('change selectedColor');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleSwitchPointColorSample');
+ // await checkButtonAndClickWithID('change switchPointColor');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleSizeSample');
+ // await checkButtonAndClickWithID('change size');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TogglePaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleSwitchSample');
+ // await checkButtonAndClickWithID('change toggleIsOn');
+ // await checkButtonAndClickWithID('change toggleIsOn');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleCheckboxSelectSample');
+ // await checkButtonAndClickWithID('change select');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ToggleCheckboxCancelSample');
+ // await checkButtonAndClickWithID('change cancel');
+ // await pressBack();
+ await pressBack();
+ })
+
+ // /**
+ // * 点击首页Refresh
+ // */
+ // it(`RefreshBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Refresh');
+ // await checkButtonAndClickWithID('RefreshCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshSizeSample');
+ // await checkButtonAndClickWithID('change size');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshPullSample');
+ // await driver.swipe(360, 200, 360, 500, 600)
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshOffsetSample');
+ // await checkButtonAndClickWithID('change offset 20 to 30');
+ // await driver.swipe(360, 200, 360, 500, 600)
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshFrictionSample');
+ // await checkButtonAndClickWithID('change friction 60 to 80');
+ // await driver.swipe(360, 200, 360, 500, 600)
+ // await pressBack();
+ // await checkButtonAndClickWithID('RefreshOnStateChangeSample');
+ // await driver.swipe(360, 200, 360, 500, 600)
+ // await pressBack();
+ // await pressBack();
+ // })
+
+ // /**
+ // * 点击首页TextArea
+ // */
+ // it(`TextAreaBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('TextArea');
+ // await checkButtonAndClickWithID('TextAreaCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaTextAlignSample');
+ // await checkButtonAndClickWithID('change textAlign to Start');
+ // await checkButtonAndClickWithID('change textAlign to Center');
+ // await checkButtonAndClickWithID('change textAlign to End');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaFontSample');
+ // await checkButtonAndClickWithID('change font');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaTextSample');
+ // await checkButtonAndClickWithID('change textAreaTextLength 10 to 100');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextAreaMaxLinesSample');
+ // await checkButtonAndClickWithID('change maxLines 1 to 3');
+ // await pressBack();
+ // await pressBack();
+ // })
+
+ // /**
+ // * 点击首页Search
+ // */
+ // it(`SearchBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Search');
+ // await checkButtonAndClickWithID('SearchCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchValueSample');
+ // await checkButtonAndClickWithID('change searchValueLength 10 to 100');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchTextAlignSample');
+ // await checkButtonAndClickWithID('change textAlign to Start');
+ // await checkButtonAndClickWithID('change textAlign to Center');
+ // await checkButtonAndClickWithID('change textAlign to End');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchTextFontSample');
+ // await checkButtonAndClickWithID('change textFont');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SearchPlaceholderFontSample');
+ // await checkButtonAndClickWithID('change placeholderFont');
+ // await pressBack();
+ // await pressBack();
+ // })
+
+ // /**
+ // * 点击首页Progress
+ // */
+ it(`ProgressBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Progress');
+ await checkButtonAndClickWithID('ProgressCreateSample');
+ await pressBack();
+ // await checkButtonAndClickWithID('ProgressWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressProgressTypeSample');
+ // await checkButtonAndClickWithID('change progressType to Linear');
+ // await checkButtonAndClickWithID('change progressType to Ring');
+ // await checkButtonAndClickWithID('change progressType to Eclipse');
+ // await checkButtonAndClickWithID('change progressType to ScaleRing');
+ // await checkButtonAndClickWithID('change progressType to Capsule');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressProgressStyleSample');
+ // await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressLinearSample');
+ // await checkButtonAndClickWithID('change strokeWidth(4-20) add strokeRadius(0-10)');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressRingSample');
+ // await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ProgressScaleRingSample');
+ // await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ // await pressBack();
+ await pressBack();
+ })
+ //
+ // /**
+ // * 点击首页Marquee
+ // */
+ // it(`MarqueeBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Marquee');
+ // //创建Marquee组件
+ // await checkButtonAndClickWithID('MarqueeCreate');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('MarqueeWidth');
+ // await checkButtonAndClickWithID('MarqueeChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('MarqueeHeight');
+ // await checkButtonAndClickWithID('MarqueeChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('MarqueePadding');
+ // await checkButtonAndClickWithID('MarqueeChangePadding');
+ // await pressBack();
+ // // 改变Margin
+ // await checkButtonAndClickWithID('MarqueeMargin');
+ // await checkButtonAndClickWithID('MarqueeChangeMargin');
+ // await pressBack();
+ // // 改变Src
+ // await checkButtonAndClickWithID('MarqueeSrc');
+ // await checkButtonAndClickWithID('MarqueeChangeSrc');
+ // await pressBack();
+ // // 改变Step
+ // await checkButtonAndClickWithID('MarqueeStep');
+ // await checkButtonAndClickWithID('MarqueeChangeStep');
+ // await pressBack();
+ // // 改变FromStart
+ // await checkButtonAndClickWithID('MarqueeFromStart');
+ // await checkButtonAndClickWithID('MarqueeChangeFromStart');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页DataPanel
+ // */
+ // it(`DataPanelBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('DataPanel');
+ // //创建DataPanel组件
+ // await checkButtonAndClickWithID('DataPanelCreate');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('DataPanelWidth');
+ // await checkButtonAndClickWithID('DataPanelChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('DataPanelHeight');
+ // await checkButtonAndClickWithID('DataPanelChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('DataPanelPadding');
+ // await checkButtonAndClickWithID('DataPanelChangePadding');
+ // await pressBack();
+ // // 改变Margin
+ // await checkButtonAndClickWithID('DataPanelMargin');
+ // await checkButtonAndClickWithID('DataPanelChangeMargin');
+ // await pressBack();
+ // // 改变CloseEffect
+ // await checkButtonAndClickWithID('DataPanelCloseEffect');
+ // await checkButtonAndClickWithID('DataPanelChangeCloseEffect');
+ // await pressBack();
+ // // 改变StrokeWidth
+ // await checkButtonAndClickWithID('DataPanelStrokeWidth');
+ // await checkButtonAndClickWithID('DataPanelChangeStrokeWidth');
+ // await pressBack();
+ // // 改变Radius
+ // await checkButtonAndClickWithID('DataPanelRadius');
+ // await checkButtonAndClickWithID('DataPanelChangeRadius');
+ // await pressBack();
+ // // 改变OffsetX
+ // await checkButtonAndClickWithID('DataPanelOffsetX');
+ // await checkButtonAndClickWithID('DataPanelChangeOffsetX');
+ // await pressBack();
+ // // 改变OffsetY
+ // await checkButtonAndClickWithID('DataPanelOffsetY');
+ // await checkButtonAndClickWithID('DataPanelChangeOffsetY');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页Rating
+ // */
+ // it(`RatingBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Rating');
+ // //创建Rating组件
+ // await checkButtonAndClickWithID('RatingCreate');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('RatingWidth');
+ // await checkButtonAndClickWithID('RatingChangeWidth');
+ // await pressBack();
+ // //改变height
+ // await checkButtonAndClickWithID('RatingHeight');
+ // await checkButtonAndClickWithID('RatingChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('RatingPadding');
+ // await checkButtonAndClickWithID('RatingChangePadding');
+ // await pressBack();
+ // // 改变Margin
+ // await checkButtonAndClickWithID('RatingMargin');
+ // await checkButtonAndClickWithID('RatingChangeMargin');
+ // await pressBack();
+ // // 改变Stars
+ // await checkButtonAndClickWithID('RatingStars');
+ // await checkButtonAndClickWithID('RatingChangeStars');
+ // await pressBack();
+ // // 改变StarStyle
+ // await checkButtonAndClickWithID('RatingStarStyle');
+ // await checkButtonAndClickWithID('RatingChangeStarStyle');
+ // await pressBack();
+ // // 改变OptionsRating
+ // await checkButtonAndClickWithID('RatingOptionsRating');
+ // await checkButtonAndClickWithID('RatingChangeOptionsRating');
+ // await pressBack();
+ // // Click
+ // await checkButtonAndClickWithID('RatingClick');
+ // await checkButtonAndClickWithID('RatingClickIndex6');
+ // await pressBack();
+ // // swip
+ // await checkButtonAndClickWithID('RatingSwip');
+ // await driver.swipe(50, 600, 500, 600);
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页TextClock
+ // */
+ // it(`TextClockBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('TextClock');
+ // await checkButtonAndClickWithID('TextClockCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextClockWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextClockHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextClockPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextClockMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextClockFormatSample');
+ // await checkButtonAndClickWithID('change format');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页Hyperlink
+ // */
+ // it(`HyperlinkBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Hyperlink');
+ // await checkButtonAndClickWithID('HyperlinkCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('HyperlinkWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('HyperlinkHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('HyperlinkPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('HyperlinkMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页QRCode
+ // */
+ // it(`QRCodeBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('QRCode');
+ // await checkButtonAndClickWithID('QRCodeCreateSample');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // await checkButtonAndClickWithID('QRCodeWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('QRCodeHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('QRCodePaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('QRCodeMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页Gauge
+ // */
+ // it(`GaugeBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Gauge');
+ // await checkButtonAndClickWithID('GaugeCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('GaugeWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('GaugeHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('GaugePaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('GaugeMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('GaugeStrokeWidthSample');
+ // await checkButtonAndClickWithID('change strokeWidth 4 to 10');
+ // await pressBack();
+ // // await checkButtonAndClickWithID('GaugeTrackShadowSample');
+ // // await checkButtonAndClickWithID('change trackShadow');
+ // // await pressBack();
+ // await checkButtonAndClickWithID('GaugeAngleSample');
+ // await checkButtonAndClickWithID('change angle');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页Badge
+ // */
+ // it(`BadgeBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Badge');
+ // //创建Badge组件
+ // await checkButtonAndClickWithID('BadgeCreate');
+ // await pressBack();
+ // //改变Size
+ // await checkButtonAndClickWithID('BadgeSize');
+ // await checkButtonAndClickWithID('BadgeChangeSize');
+ // await pressBack();
+ // //改变Color
+ // await checkButtonAndClickWithID('BadgeColor');
+ // await checkButtonAndClickWithID('BadgeChangeColor');
+ // await pressBack();
+ // //改变FontSize
+ // await checkButtonAndClickWithID('BadgeFontSize');
+ // await checkButtonAndClickWithID('BadgeChangeFontSize');
+ // await pressBack();
+ // //改变FontWeight
+ // await checkButtonAndClickWithID('BadgeFontWeight');
+ // await checkButtonAndClickWithID('BadgeChangeFontWeight');
+ // await pressBack();
+ // //改变BorderWidth
+ // await checkButtonAndClickWithID('BadgeBorderWidth');
+ // await checkButtonAndClickWithID('BadgeChangeBorderWidth');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页AlphabetIndexer
+ // */
+ // it(`AlphabetIndexerBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('AlphabetIndexer');
+ // //创建AlphabetIndexerCreate组件
+ // await checkButtonAndClickWithID('AlphabetIndexerCreate');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // //改变SelectedColor
+ // await checkButtonAndClickWithID('AlphabetIndexerSelectedColor');
+ // await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedColor');
+ // await pressBack();
+ // //改变PopupColor
+ // await checkButtonAndClickWithID('AlphabetIndexerPopupColor');
+ // await checkButtonAndClickWithID('AlphabetIndexerChangePopupColor');
+ // await pressBack();
+ // //改变SelectedBackgroundColor
+ // await checkButtonAndClickWithID('AlphabetIndexerSelectedBackgroundColor');
+ // await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedBackgroundColor');
+ // await pressBack();
+ // // 改变PopupBackground
+ // await checkButtonAndClickWithID('AlphabetIndexerPopupBackground');
+ // await checkButtonAndClickWithID('AlphabetIndexerChangePopupBackground');
+ // await pressBack();
+ // //改变SelectedFont
+ // await checkButtonAndClickWithID('AlphabetIndexerSelectedFont');
+ // await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedFont');
+ // await pressBack();
+ // //改变popupFont
+ // await checkButtonAndClickWithID('AlphabetIndexerPopupFont');
+ // await checkButtonAndClickWithID('AlphabetIndexerChangePopupFont');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页Menu
+ // */
+ // it(`DividerBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Menu');
+ // //创建Menu组件
+ // await checkButtonAndClickWithID('MenuCreate');
+ // await pressBack();
+ // //改变Font
+ // await checkButtonAndClickWithID('MenuFont');
+ // await checkButtonAndClickWithID('MenuChangeFont');
+ // await pressBack();
+ // //改变FontColor
+ // await checkButtonAndClickWithID('MenuFontColor');
+ // await checkButtonAndClickWithID('MenuChangeFontColor');
+ // await pressBack();
+ // //改变Width
+ // await checkButtonAndClickWithID('MenuWidth');
+ // await checkButtonAndClickWithID('MenuChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('MenuHeight');
+ // await checkButtonAndClickWithID('MenuChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('MenuPadding');
+ // await checkButtonAndClickWithID('MenuChangePadding');
+ // await pressBack();
+ // // 变Margin
+ // await checkButtonAndClickWithID('MenuMargin');
+ // await checkButtonAndClickWithID('MenuChangeMargin');
+ // await pressBack();
+ // // Menu展开菜单Expend
+ // await checkButtonAndClickWithID('MenuFirstExpend');
+ // await checkButtonAndClickWithID('MenuFirstChangeExpend');
+ // await checkButtonAndClickWithID('MenuFirstChangeExpendSencond');
+ // await checkButtonAndClickWithID('MenuFirstChangeExpendThird');
+ // await pressBack();
+ // await pressBack();
+ // // Menu收起后再次展开菜单Expend
+ // await checkButtonAndClickWithID('MenuSecondExpend');
+ // await checkButtonAndClickWithID('MenuSecondChangeExpend');
+ // await checkButtonAndClickWithID('MenuSecondChangeExpendSencond');
+ // await checkButtonAndClickWithID('MenuSecondChangeExpendThird');
+ // await pressBack();
+ // await checkButtonAndClickWithID('MenuSecondChangeExpend');
+ // await checkButtonAndClickWithID('MenuSecondChangeExpendSencond');
+ // await checkButtonAndClickWithID('MenuSecondChangeExpendThird');
+ // await pressBack();
+ // await pressBack();
+ // // Menu收起后多次关闭
+ // await checkButtonAndClickWithID('MenuMoreClose');
+ // await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ // await checkButtonAndClickWithID('MenuMoreCloseSencond');
+ // await checkButtonAndClickWithID('MenuMoreCloseThird');
+ // await pressBack();
+ // await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ // await pressBack();
+ // await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ // await pressBack();
+ // await pressBack();
+ // // Group收起后再次展开
+ // await checkButtonAndClickWithID('MenuGroupCloseExpand');
+ // await checkButtonAndClickWithID('MenuChangeGroupCloseExpand');
+ // await pressBack();
+ // await checkButtonAndClickWithID('MenuChangeGroupCloseExpand');
+ // await pressBack();
+ // await pressBack();
+ // // Group多次关闭
+ // await checkButtonAndClickWithID('MenuGroupMoreClose');
+ // await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ // await pressBack();
+ // await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ // await pressBack();
+ // await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ // await pressBack();
+ // await pressBack();
+ //
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页TextPicker
+ // */
+ // it(`TextPickerBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('TextPicker');
+ // //创建TextPicker组件
+ // await checkButtonAndClickWithID('TextPickerCreate');
+ // await pressBack();
+ // //改变TextStyle
+ // await checkButtonAndClickWithID('TextPickerTextStyle');
+ // await checkButtonAndClickWithID('TextPickerChangeTextStyle');
+ // await pressBack();
+ // //改变SelectedTextStyle
+ // await checkButtonAndClickWithID('TextPickerSelectedTextStyle');
+ // await checkButtonAndClickWithID('TextPickerChangeSelectedTextStyle');
+ // await pressBack();
+ // //改变DisappearTextStyle
+ // await checkButtonAndClickWithID('TextPickerDisappearTextStyle');
+ // await checkButtonAndClickWithID('TextPickerChangeDisappearTextStyle');
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('TextPickerWidth');
+ // await checkButtonAndClickWithID('TextPickerChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('TextPickerHeight');
+ // await checkButtonAndClickWithID('TextPickerChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('TextPickerPadding');
+ // await checkButtonAndClickWithID('TextPickerChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('TextPickerMargin');
+ // await checkButtonAndClickWithID('TextPickerChangeMargin');
+ // await pressBack();
+ // //手指滑动
+ // await checkButtonAndClickWithID('TextPickerFingerSwip');
+ // await driver.swipe(150, 300, 150, 150)
+ // await pressBack();
+ // //手指点击
+ // await checkButtonAndClickWithID('TextPickerClick');
+ // await driver.click(150, 150)
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // //鼠标滚轮MouseScroll
+ // await checkButtonAndClickWithID('TextPickerMouseScroll');
+ // await driver.mouseScroll({ x: 150, y: 200 }, true, 5);
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // //键盘Scroll
+ // await checkButtonAndClickWithID('TextPickerKeyBoardScroll');
+ // // await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN);
+ // await driver.swipe(150, 300, 150, 150)
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页Counter
+ // */
+ // it(`CounterBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Counter');
+ // //创建Counter组件
+ // await checkButtonAndClickWithID('CounterCreate');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // //改变width
+ // await checkButtonAndClickWithID('CounterWidth');
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('CounterChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('CounterHeight');
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('CounterChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('CounterPadding');
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('CounterChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('CounterMargin');
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('CounterChangeMargin');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页XComponent
+ // */
+ // it(`XComponentBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('XComponent');
+ // //创建XComponent组件
+ // await checkButtonAndClickWithID('XComponentCreate');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页PatternLock
+ // */
+ // it(`PatternLockBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('PatternLock');
+ // //创建PatternLock组件
+ // await checkButtonAndClickWithID('PatternLockCreate');
+ // await driver.delayMs(1000);
+ // await pressBack();
+ // //改变SideLength
+ // await checkButtonAndClickWithID('PatternLockSideLength');
+ // await checkButtonAndClickWithID('PatternLockChangeSideLength');
+ // await pressBack();
+ // //改变CircleRadius
+ // await checkButtonAndClickWithID('PatternLockCircleRadius');
+ // await checkButtonAndClickWithID('PatternLockChangeCircleRadius');
+ // await pressBack();
+ // //改变RegularColor
+ // await checkButtonAndClickWithID('PatternLockRegularColor');
+ // await checkButtonAndClickWithID('PatternLockChangeRegularColor');
+ // await pressBack();
+ // //改变SelectedColor
+ // await checkButtonAndClickWithID('PatternLockSelectedColor');
+ // await checkButtonAndClickWithID('PatternLockChangeSelectedColor');
+ // await pressBack();
+ // //改变ActiveColor
+ // await checkButtonAndClickWithID('PatternLockActiveColor');
+ // await checkButtonAndClickWithID('PatternLockChangeActiveColor');
+ // await pressBack();
+ // //改变PathColor
+ // await checkButtonAndClickWithID('PatternLockPathColor');
+ // await checkButtonAndClickWithID('PatternLockChangePathColor');
+ // await pressBack();
+ // //改变PathStrokeWidth
+ // await checkButtonAndClickWithID('PatternLockPathStrokeWidth');
+ // await checkButtonAndClickWithID('PatternLockChangePathStrokeWidth');
+ // await pressBack();
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页Shape
+ // */
+ // it(`ShapeBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Shape');
+ // //创建Shape组件
+ // await checkButtonAndClickWithID('ShapeCreate');
+ // await pressBack();
+ // //改变Fill
+ // await checkButtonAndClickWithID('ShapeFill');
+ // await checkButtonAndClickWithID('ShapeChangeFill');
+ // await pressBack();
+ // //改变FillOpacity
+ // await checkButtonAndClickWithID('ShapeFillOpacity');
+ // await checkButtonAndClickWithID('ShapeChangeFillOpacity');
+ // await pressBack();
+ // //改变stroke
+ // await checkButtonAndClickWithID('ShapeStroke');
+ // await checkButtonAndClickWithID('ShapeChangeStroke');
+ // await pressBack();
+ // //改变StrokeDashArray
+ // await checkButtonAndClickWithID('ShapeStrokeDashArray');
+ // await checkButtonAndClickWithID('ShapeChangeStrokeDashArray');
+ // await pressBack();
+ // //改变StrokeDashOffset
+ // await checkButtonAndClickWithID('ShapeStrokeDashOffset');
+ // await checkButtonAndClickWithID('ShapeChangeStrokeDashOffset');
+ // await pressBack();
+ // //改变StrokeWidth
+ // await checkButtonAndClickWithID('ShapeStrokeWidth');
+ // await checkButtonAndClickWithID('ShapeChangeStrokeWidth');
+ // await pressBack();
+ // //改变Width
+ // await checkButtonAndClickWithID('ShapeWidth');
+ // await checkButtonAndClickWithID('ShapeChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('ShapeHeight');
+ // await checkButtonAndClickWithID('ShapeChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('ShapePadding');
+ // await checkButtonAndClickWithID('ShapeChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('ShapeMargin');
+ // await checkButtonAndClickWithID('ShapeChangeMargin');
+ // await pressBack();
+ //
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页Path
+ // */
+ // it(`PathBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Path');
+ // //创建Path组件
+ // await checkButtonAndClickWithID('PathCreate');
+ // await pressBack();
+ // //改变Fill
+ // await checkButtonAndClickWithID('PathFill');
+ // await checkButtonAndClickWithID('PathChangeFill');
+ // await pressBack();
+ // // 改变FillOpacity
+ // await checkButtonAndClickWithID('PathFillOpacity');
+ // await checkButtonAndClickWithID('PathChangeFillOpacity');
+ // await pressBack();
+ // //改变Stroke
+ // await checkButtonAndClickWithID('PathStroke');
+ // await checkButtonAndClickWithID('PathChangeStroke');
+ // await pressBack();
+ // //改变StrokeDashArray
+ // await checkButtonAndClickWithID('PathStrokeDashArray');
+ // await checkButtonAndClickWithID('PathChangeStrokeDashArray');
+ // await pressBack();
+ // //改变StrokeDashOffset
+ // await checkButtonAndClickWithID('PathStrokeDashOffset');
+ // await checkButtonAndClickWithID('PathChangeStrokeDashOffset');
+ // await pressBack();
+ // //改变StrokeWidth
+ // await checkButtonAndClickWithID('PathStrokeWidth');
+ // await checkButtonAndClickWithID('PathChangeStrokeWidth');
+ // await pressBack();
+ // //改变Width
+ // await checkButtonAndClickWithID('PathWidth');
+ // await checkButtonAndClickWithID('PathChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('PathHeight');
+ // await checkButtonAndClickWithID('PathChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('PathPadding');
+ // await checkButtonAndClickWithID('PathChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('PathMargin');
+ // await checkButtonAndClickWithID('PathChangeMargin');
+ // await pressBack();
+ //
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页Line
+ // */
+ // it(`LineBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Line');
+ // //创建Line组件
+ // await checkButtonAndClickWithID('LineCreate');
+ // await pressBack();
+ // //改变Fill
+ // await checkButtonAndClickWithID('LineFill');
+ // await checkButtonAndClickWithID('LineChangeFill');
+ // await pressBack();
+ // // 改变FillOpacity
+ // await checkButtonAndClickWithID('LineFillOpacity');
+ // await checkButtonAndClickWithID('LineChangeFillOpacity');
+ // await pressBack();
+ // //改变Stroke
+ // await checkButtonAndClickWithID('LineStroke');
+ // await checkButtonAndClickWithID('LineChangeStroke');
+ // await pressBack();
+ // //改变StrokeDashArray
+ // await checkButtonAndClickWithID('LineStrokeDashArray');
+ // await checkButtonAndClickWithID('LineChangeStrokeDashArray');
+ // await pressBack();
+ // //改变StrokeDashOffset
+ // await checkButtonAndClickWithID('LineStrokeDashOffset');
+ // await checkButtonAndClickWithID('LineChangeStrokeDashOffset');
+ // await pressBack();
+ // //改变StrokeWidth
+ // await checkButtonAndClickWithID('LineStrokeWidth');
+ // await checkButtonAndClickWithID('LineChangeStrokeWidth');
+ // await pressBack();
+ // //改变Width
+ // await checkButtonAndClickWithID('LineWidth');
+ // await checkButtonAndClickWithID('LineChangeWidth');
+ // await pressBack();
+ // //改变Height
+ // await checkButtonAndClickWithID('LineHeight');
+ // await checkButtonAndClickWithID('LineChangeHeight');
+ // await pressBack();
+ // //改变Padding
+ // await checkButtonAndClickWithID('LinePadding');
+ // await checkButtonAndClickWithID('LineChangePadding');
+ // await pressBack();
+ // //改变Margin
+ // await checkButtonAndClickWithID('LineMargin');
+ // await checkButtonAndClickWithID('LineChangeMargin');
+ // await pressBack();
+ //
+ // await pressBack(); //返回首页
+ // })
+ //
+ // /**
+ // * 点击首页Circle
+ // */
+ // it(`CircleBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Circle');
+ // await checkButtonAndClickWithID('CircleCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleFillSample');
+ // await checkButtonAndClickWithID('change fill');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleFillOpacitySample');
+ // await checkButtonAndClickWithID('change fillOpacity');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleStrokeSample');
+ // await checkButtonAndClickWithID('change stroke');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleStrokeDashArraySample');
+ // await checkButtonAndClickWithID('change strokeDashArray');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleStrokeDashOffsetSample');
+ // await checkButtonAndClickWithID('change strokeDashOffset');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleStrokeWidthSample');
+ // await checkButtonAndClickWithID('change strokeWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CirclePaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('CircleMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页Polyline
+ // */
+ // it(`PolylineBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Polyline');
+ // await checkButtonAndClickWithID('PolylineCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineFillSample');
+ // await checkButtonAndClickWithID('change fill');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineFillOpacitySample');
+ // await checkButtonAndClickWithID('change fillOpacity');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineStrokeSample');
+ // await checkButtonAndClickWithID('change stroke');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineStrokeDashArraySample');
+ // await checkButtonAndClickWithID('change strokeDashArray');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineStrokeDashOffsetSample');
+ // await checkButtonAndClickWithID('change strokeDashOffset');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineStrokeWidthSample');
+ // await checkButtonAndClickWithID('change strokeWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylinePaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('PolylineMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页SideBarContainer
+ // */
+ // it(`SideBarContainerBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('SideBarContainer');
+ // await checkButtonAndClickWithID('SideBarContainerCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerShowSideBarSample');
+ // await checkButtonAndClickWithID('change showSideBar');
+ // await checkButtonAndClickWithID('SideBarContainerControlButtonSample');
+ // await checkButtonAndClickWithID('change controlButton');
+ // await pressBack();
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerShowControlButtonSample');
+ // await checkButtonAndClickWithID('change showControlButton');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerSideBarWidthSample');
+ // await checkButtonAndClickWithID('change sideBarWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerAutoHideSample');
+ // await checkButtonAndClickWithID('change autoHide');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerSideBarPositionSample');
+ // await checkButtonAndClickWithID('change sideBarPosition');
+ // await pressBack();
+ // await driver.swipe(540, 1000, 540, 500);
+ // await checkButtonAndClickWithID('SideBarContainerDividerSample');
+ // await checkButtonAndClickWithID('change divider');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerMinContentWidthSample');
+ // await checkButtonAndClickWithID('change minContentWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerMinSideBarWidthSample');
+ // await checkButtonAndClickWithID('change minSideBarWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerMaxSideBarWidthSample');
+ // await checkButtonAndClickWithID('change maxSideBarWidth');
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerDragSideBarSample');
+ // await driver.delayMs(1000);
+ // await driver.swipe(300, 500, 100, 500);
+ // await pressBack();
+ // await checkButtonAndClickWithID('SideBarContainerDragContentSample');
+ // await driver.delayMs(1000);
+ // await driver.drag(300, 500, 500, 500);
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页ImageAnimator
+ // */
+ // it(`ImageAnimatorBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('ImageAnimator');
+ // await checkButtonAndClickWithID('ImageAnimatorCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorWidthSample');
+ // await checkButtonAndClickWithID('change width 80% to 100%');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorHeightSample');
+ // await checkButtonAndClickWithID('change height 300 to 400');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorImagesSample');
+ // await checkButtonAndClickWithID('change images');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorStateSample');
+ // await checkButtonAndClickWithID('change state');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorDurationSample');
+ // await checkButtonAndClickWithID('change duration');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorReverseSample');
+ // await checkButtonAndClickWithID('change reverse');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorFixedSizeSample');
+ // await checkButtonAndClickWithID('change fixedSize');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorFillModeSample');
+ // await checkButtonAndClickWithID('change fillMode');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ImageAnimatorIterationsSample');
+ // await checkButtonAndClickWithID('change iterations');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页LoadingProgress
+ // */
+ // it(`LoadingProgressBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('LoadingProgress');
+ // await checkButtonAndClickWithID('LoadingProgressCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('LoadingProgressWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('LoadingProgressHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('LoadingProgressPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('LoadingProgressMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('LoadingProgressEnableLoadingSample');
+ // await checkButtonAndClickWithID('change enableLoading');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页TextTimer
+ // */
+ // it(`TextTimerBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('TextTimer');
+ // await checkButtonAndClickWithID('TextTimerCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTimerWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTimerHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTimerPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTimerMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTimerControllerSample');
+ // await checkButtonAndClickWithID('change controller to start');
+ // await checkButtonAndClickWithID('change controller to pause');
+ // await checkButtonAndClickWithID('change controller to reset');
+ // await pressBack();
+ // await checkButtonAndClickWithID('TextTimerFormatSample');
+ // await checkButtonAndClickWithID('change format');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页Blank
+ // */
+ // it(`BlankBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Blank');
+ // await checkButtonAndClickWithID('BlankCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('BlankWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('BlankHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('BlankPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('BlankMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('BlankMinSample');
+ // await checkButtonAndClickWithID('change min 0 to 60');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页Radio
+ // */
+ // it(`RadioBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('Radio');
+ // await checkButtonAndClickWithID('RadioCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RadioWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RadioHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RadioPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('RadioMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await pressBack();
+ // })
+ //
+ // /**
+ // * 点击首页ScrollBar
+ // */
+ // it(`ScrollBarBenchMarkTest`, 0, async () => {
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('ScrollBar');
+ // await checkButtonAndClickWithID('ScrollBarCreateSample');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ScrollBarWidthSample');
+ // await checkButtonAndClickWithID('change width 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ScrollBarHeightSample');
+ // await checkButtonAndClickWithID('change height 100 to 200');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ScrollBarPaddingSample');
+ // await checkButtonAndClickWithID('change padding 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ScrollBarMarginSample');
+ // await checkButtonAndClickWithID('change margin 20 to 30');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ScrollBarDirectionSample');
+ // await checkButtonAndClickWithID('change direction');
+ // await pressBack();
+ // await checkButtonAndClickWithID('ScrollBarStateSample');
+ // await checkButtonAndClickWithID('change state to On');
+ // await checkButtonAndClickWithID('change state to Auto');
+ // await pressBack();
+ // await pressBack();
+ // })
+ })
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/FirstProject.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/FirstProject.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2a843ceb7ff06977c8562be064837ff35cfb5463
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/FirstProject.test.ets
@@ -0,0 +1,957 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { Driver, ON } from '@ohos.UiTest';
+
+const driver = Driver.create();
+let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator();
+
+//通过id验证有没有这个组件 有的话点击一下
+async function checkButtonAndClickWithID(text: string, delayTime: number = 3000) {
+ let idName = text;
+ await driver.assertComponentExist(ON.id(idName));
+ let button = await driver.findComponent(ON.id(idName));
+ await button.click();
+ if (delayTime > 0) {
+ await driver.delayMs(delayTime);
+ }
+}
+
+async function pressBack() {
+ await driver.pressBack();
+ await driver.delayMs(3000);
+}
+
+export default function firstProjectTest() {
+ describe('ActsFirstProjectTest', () => {
+ beforeAll(() => {
+
+ })
+ beforeEach(() => {
+
+ })
+ afterEach(() => {
+
+ })
+ afterAll(() => {
+
+ })
+ /**
+ * 拉起应用
+ */
+ it(`Benchmark_StartAbility_001`, 0, async (done: Function) => {
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 begin');
+ try {
+ await abilityDelegatorRegistry.startAbility({
+ bundleName: 'cn.openharmony.benchmarksample',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (err) {
+ done();
+ }
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 end');
+ })
+
+ //点击首页Text
+ it(`TextBenchMarkTest`, 0, async () => {
+ await driver.delayMs(5000);
+ await checkButtonAndClickWithID('Text');
+ //创建Text组件
+ await checkButtonAndClickWithID('TextCreate10Char');
+ await driver.delayMs(1000);
+ await pressBack();
+ await checkButtonAndClickWithID('TextCreate100Char');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变Align
+ await checkButtonAndClickWithID('TextAlign10char');
+ await checkButtonAndClickWithID('TextAlign.Start');
+ await checkButtonAndClickWithID('TextAlign.Center');
+ await checkButtonAndClickWithID('TextAlign.End');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextAlign100Char');
+ // await checkButtonAndClickWithID('TextAlign.Start');
+ // await checkButtonAndClickWithID('TextAlign.Center');
+ // await checkButtonAndClickWithID('TextAlign.End');
+ // await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('TextWidth10Char');
+ await checkButtonAndClickWithID('TextChangeWidth');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextWidth100Char');
+ // await checkButtonAndClickWithID('TextChangeWidth');
+ // await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('TextHeight10Char');
+ await checkButtonAndClickWithID('TextChangeHeight');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextHeight100Char');
+ // await checkButtonAndClickWithID('TextChangeHeight');
+ // await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('TextPadding10Char');
+ await checkButtonAndClickWithID('TextChangePadding');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextPadding100Char');
+ // await checkButtonAndClickWithID('TextChangePadding');
+ // await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('TextMargin10Char');
+ await checkButtonAndClickWithID('TextChangeMargin');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextMargin100Char');
+ // await checkButtonAndClickWithID('TextChangeMargin');
+ // await pressBack();
+ //改变Font
+ await checkButtonAndClickWithID('TextFont10Char');
+ await checkButtonAndClickWithID('TextChangeFont');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextFont100Char');
+ // await checkButtonAndClickWithID('TextChangeFont');
+ // await pressBack();
+ //改变Text文本长度
+ await checkButtonAndClickWithID('TextContent10Char');
+ await checkButtonAndClickWithID('TextChangeContent');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextContent100Char');
+ // await checkButtonAndClickWithID('TextChangeContent');
+ // await pressBack();
+ //改变TextIndent
+ await checkButtonAndClickWithID('TextTextIndent10Char');
+ await checkButtonAndClickWithID('TextChangeTextIndent');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextTextIndent100Char');
+ // await checkButtonAndClickWithID('TextChangeTextIndent');
+ // await pressBack();
+ //改变TextCase
+ await checkButtonAndClickWithID('TextTextCase10Char');
+ await checkButtonAndClickWithID('TextChangeTextCase');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextTextCase100Char');
+ // await checkButtonAndClickWithID('TextChangeTextCase');
+ // await pressBack();
+ //改变LetterSpacing
+ await checkButtonAndClickWithID('TextLetterSpacing10Char');
+ await checkButtonAndClickWithID('TextChangeTextLetterSpacing');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextLetterSpacing100Char');
+ // await checkButtonAndClickWithID('TextChangeTextLetterSpacing');
+ // await pressBack();
+ //改变BaselineOffset
+ await checkButtonAndClickWithID('TextBaselineOffset10Char');
+ await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextBaselineOffset100Char');
+ // await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ // await pressBack();
+ await driver.swipe(360, 2100, 360, 300, 40000)
+ // 改变TextBaselineOffset
+ await checkButtonAndClickWithID('TextLineHeight10Char');
+ await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextLineHeight100Char');
+ // await checkButtonAndClickWithID('TextChangeTextBaselineOffset');
+ // await pressBack();
+ // await driver.swipe(360, 1100, 360, 500, 200)
+ //改变TextChangeMaxLines
+ await checkButtonAndClickWithID('TextMaxLines10Char');
+ await checkButtonAndClickWithID('TextChangeMaxLines');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextMaxLines100Char');
+ // await checkButtonAndClickWithID('TextChangeMaxLines');
+ // await pressBack();
+ //改变Overflow
+ await checkButtonAndClickWithID('TextOverflow10Char');
+ await checkButtonAndClickWithID('TextChangeOverflow');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextOverflow100Char');
+ // await checkButtonAndClickWithID('TextChangeOverflow');
+ // await pressBack();
+ //改变heightAdaptivePolicy maxLine
+ await checkButtonAndClickWithID('heightAdaptivePolicyOne10Char');
+ await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyOne');
+ await pressBack();
+ // await checkButtonAndClickWithID('heightAdaptivePolicyOne100Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyOne');
+ // await pressBack();
+ //改变heightAdaptivePolicy minfontSize
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('heightAdaptivePolicyTwo10Char');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyTwo');
+ await driver.delayMs(1000);
+ await pressBack();
+ // await checkButtonAndClickWithID('heightAdaptivePolicyTwo100Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyTwo');
+ // await pressBack();
+ //改变heightAdaptivePolicy content
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('heightAdaptivePolicyThree10Char');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyThree');
+ await driver.delayMs(1000);
+ await pressBack();
+ // await checkButtonAndClickWithID('heightAdaptivePolicyThree100Char');
+ // await checkButtonAndClickWithID('TextChangeheightAdaptivePolicyThree');
+ // await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页TextInput
+ it(`TextInputBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextInput');
+ //创建TextInput组件
+ await checkButtonAndClickWithID('TextInputCreate10Char');
+ await driver.delayMs(1000);
+ await pressBack();
+ // await driver.delayMs(1000);
+ // await checkButtonAndClickWithID('TextInputCreate100Char');
+ // await driver.delayMs(1000);
+ // await pressBack();
+
+ //改变width
+ await checkButtonAndClickWithID('TextInputWidth10Char');
+ await checkButtonAndClickWithID('TextInputChangeWidth');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextInputWidth100Char');
+ // await checkButtonAndClickWithID('TextInputChangeWidth');
+ // await pressBack();
+
+ //改变height
+ await checkButtonAndClickWithID('TextInputHeight10Char');
+ await checkButtonAndClickWithID('TextInputChangeHeight');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextInputHeight100Char');
+ // await checkButtonAndClickWithID('TextInputChangeHeight');
+ // await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('TextInputPadding10Char');
+ await checkButtonAndClickWithID('TextInputChangePadding');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextInputPadding100Char');
+ // await checkButtonAndClickWithID('TextInputChangePadding');
+ // await pressBack();
+
+ //改变Margin
+ await checkButtonAndClickWithID('TextInputMargin10Char');
+ await checkButtonAndClickWithID('TextInputChangeMargin');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextInputMargin100Char');
+ // await checkButtonAndClickWithID('TextInputChangeMargin');
+ // await pressBack();
+
+ //改变Align
+ await checkButtonAndClickWithID('TextInputAlign10Char');
+ await checkButtonAndClickWithID('TextInputAlign.Start');
+ await checkButtonAndClickWithID('TextInputAlign.Center');
+ await checkButtonAndClickWithID('TextInputAlign.End');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextInputAlign100Char');
+ // await checkButtonAndClickWithID('TextInputAlign.Start');
+ // await checkButtonAndClickWithID('TextInputAlign.Center');
+ // await checkButtonAndClickWithID('TextInputAlign.End');
+ // await pressBack();
+
+ //改变InputType
+ await checkButtonAndClickWithID('TextInputType10Char');
+ await checkButtonAndClickWithID('TextInputType.Norma');
+ await checkButtonAndClickWithID('TextInputType.Password');
+ await checkButtonAndClickWithID('TextInputType.Email');
+ await checkButtonAndClickWithID('TextInputType.Number');
+ await checkButtonAndClickWithID('TextInputType.PhoneNumber');
+ await pressBack();
+ // await checkButtonAndClickWithID('TextInputType100Char');
+ // await checkButtonAndClickWithID('TextInputType.Norma');
+ // await checkButtonAndClickWithID('TextInputType.Password');
+ // await checkButtonAndClickWithID('TextInputType.Email');
+ // await checkButtonAndClickWithID('TextInputType.Number');
+ // await checkButtonAndClickWithID('TextInputType.PhoneNumber');
+ // await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Image
+ it(`ImageBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Image');
+ await checkButtonAndClickWithID('ImageCreate');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageWidth');
+ await checkButtonAndClickWithID('ImageWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageHeight');
+ await checkButtonAndClickWithID('ImageHeight');
+ await pressBack();
+ await checkButtonAndClickWithID('ImagePadding');
+ await checkButtonAndClickWithID('ImagePadding');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageMargin');
+ await checkButtonAndClickWithID('ImageMargin');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageObjectFit');
+ await checkButtonAndClickWithID('ImageObjectFit_Contain');
+ await checkButtonAndClickWithID('ImageObjectFit_Cover');
+ await checkButtonAndClickWithID('ImageObjectFit_Auto');
+ await checkButtonAndClickWithID('ImageObjectFit_Fill');
+ await checkButtonAndClickWithID('ImageObjectFit_ScaleDown');
+ await checkButtonAndClickWithID('ImageObjectFit_None');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageObjectRepeat');
+ await checkButtonAndClickWithID('ImageObjectRepeat_X');
+ await checkButtonAndClickWithID('ImageObjectRepeat_Y');
+ await checkButtonAndClickWithID('ImageObjectRepeat_XY');
+ await checkButtonAndClickWithID('ImageObjectRepeat_NoRepeat');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAutoResize');
+ await checkButtonAndClickWithID('ImageAutoResize');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageInterpolation');
+ await checkButtonAndClickWithID('ImageInterpolation_None');
+ await checkButtonAndClickWithID('ImageInterpolation_High');
+ await checkButtonAndClickWithID('ImageInterpolation_Medium');
+ await checkButtonAndClickWithID('ImageInterpolation_Low');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageFitOriginalSize');
+ await checkButtonAndClickWithID('ImageFitOriginalSize');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Row
+ it(`RowBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Row');
+ //创建Row组件
+ await checkButtonAndClickWithID('RowCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('RowWidth');
+ await checkButtonAndClickWithID('RowChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('RowHeight');
+ await checkButtonAndClickWithID('RowChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('RowPadding');
+ await checkButtonAndClickWithID('RowChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('RowMargin');
+ await checkButtonAndClickWithID('RowChangeMargin');
+ await pressBack();
+ //改变space
+ await checkButtonAndClickWithID('RowSpace');
+ await checkButtonAndClickWithID('RowChangeSpace');
+ await pressBack();
+ //改变magin space
+ await checkButtonAndClickWithID('RowMarginSpace');
+ await checkButtonAndClickWithID('RowChangeMarginSpace');
+ await pressBack();
+ //改变Aligin
+ await checkButtonAndClickWithID('RowAlign');
+ await checkButtonAndClickWithID('VerticalAlign.Top');
+ await checkButtonAndClickWithID('VerticalAlign.Center');
+ await checkButtonAndClickWithID('VerticalAlign.Bottom');
+ await pressBack();
+ //改变JustifyContent
+ await checkButtonAndClickWithID('RowJustify');
+ await checkButtonAndClickWithID('FlexAlign.Start');
+ await checkButtonAndClickWithID('FlexAlign.Center');
+ await checkButtonAndClickWithID('FlexAlign.End');
+ await checkButtonAndClickWithID('FlexAlign.SpaceBetween');
+ await checkButtonAndClickWithID('FlexAlign.SpaceAround');
+ await checkButtonAndClickWithID('FlexAlign.SpaceEvenly');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Column
+ it(`ColumnBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Column');
+ //创建Column组件
+ await checkButtonAndClickWithID('ColumnCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('ColumnWidth');
+ await checkButtonAndClickWithID('ColumnChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('ColumnHeight');
+ await checkButtonAndClickWithID('ColumnChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('ColumnPadding');
+ await checkButtonAndClickWithID('ColumnChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('ColumnMargin');
+ await checkButtonAndClickWithID('ColumnChangeMargin');
+ await pressBack();
+ //改变space
+ await checkButtonAndClickWithID('ColumnSpace');
+ await checkButtonAndClickWithID('ColumnChangeSpace');
+ await pressBack();
+ //改变magin space
+ await checkButtonAndClickWithID('ColumnMarginSpace');
+ await checkButtonAndClickWithID('ColumnChangeMarginSpace');
+ await pressBack();
+ //改变Aligin
+ await checkButtonAndClickWithID('ColumnAlign');
+ await checkButtonAndClickWithID('HorizontalAlign.Start');
+ await checkButtonAndClickWithID('HorizontalAlign.Center');
+ await checkButtonAndClickWithID('HorizontalAlign.End');
+ await pressBack();
+ //改变JustifyContent
+ await checkButtonAndClickWithID('ColumnJustify');
+ await checkButtonAndClickWithID('FlexAlign.Start');
+ await checkButtonAndClickWithID('FlexAlign.Center');
+ await checkButtonAndClickWithID('FlexAlign.End');
+ await checkButtonAndClickWithID('FlexAlign.SpaceBetween');
+ await checkButtonAndClickWithID('FlexAlign.SpaceAround');
+ await checkButtonAndClickWithID('FlexAlign.SpaceEvenly');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /////////////////////////
+
+ //点击首页List
+ it(`ListBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('List');
+
+ await checkButtonAndClickWithID('ListCreate');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListWidth');
+ await checkButtonAndClickWithID('ListWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListHeight');
+ await checkButtonAndClickWithID('ListHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListPadding');
+ await checkButtonAndClickWithID('ListPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListMargin');
+ await checkButtonAndClickWithID('ListMargin');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemWidth');
+ await checkButtonAndClickWithID('ListItemWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemHeight');
+ await checkButtonAndClickWithID('ListItemHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemPadding');
+ await checkButtonAndClickWithID('ListItemPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemMargin');
+ await checkButtonAndClickWithID('ListItemMargin');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemGroupDivider');
+ await checkButtonAndClickWithID('ListItemGroupDivider');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListItemGroupSpace');
+ await checkButtonAndClickWithID('ListItemGroupSpace');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListSpace');
+ await checkButtonAndClickWithID('ListSpace');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListListDirection');
+ await checkButtonAndClickWithID('ListListDirection');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListAlignListItem');
+ await checkButtonAndClickWithID('ListAlignListItem_Start');
+ await checkButtonAndClickWithID('ListAlignListItem_Center');
+ await checkButtonAndClickWithID('ListAlignListItem_End');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListLanes');
+ await checkButtonAndClickWithID('ListLanes');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListCachedCount');
+ await checkButtonAndClickWithID('ListCachedCount');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListDivider');
+ await checkButtonAndClickWithID('ListDivider');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListScrollBar');
+ await checkButtonAndClickWithID('ListScrollBar_Off');
+ await checkButtonAndClickWithID('ListScrollBar_On');
+ await checkButtonAndClickWithID('ListScrollBar_Auto');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListRemoveItem');
+ await checkButtonAndClickWithID('ListChangeRemoveItem');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListAddItem');
+ await checkButtonAndClickWithID('ListAddItem');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListEdgeEffect');
+ await checkButtonAndClickWithID('ListEdgeEffect_Spring');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListEdgeEffect_Fade');
+ await driver.swipe(100, 300, 100, 900);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListEdgeEffect_None');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListChainAnimation');
+ await checkButtonAndClickWithID('ListChainAnimation');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListFriction');
+ await checkButtonAndClickWithID('ListFriction');
+ await driver.swipe(600, 900, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListEnableScrollInteraction');
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_true');
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_Scroller');
+ await driver.delayMs(500);
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_false');
+ await checkButtonAndClickWithID('ListEnableScrollInteraction_Scroller');
+ await driver.delayMs(500);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListScrollSnapAlign');
+ await checkButtonAndClickWithID('ListScrollSnapAlign_NONE');
+ await driver.swipe(600, 1080, 600, 300);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListScrollSnapAlign_START');
+ await driver.swipe(100, 500, 100, 1080);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListScrollSnapAlign_CENTER');
+ await driver.swipe(600, 1080, 600, 100);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListScrollSnapAlign_END');
+ await driver.swipe(100, 500, 100, 1080);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListChainAnimationOptions');
+ await checkButtonAndClickWithID('ListChainAnimationOptions');
+ await driver.swipe(600, 1080, 600, 300);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await checkButtonAndClickWithID('ListSticky');
+ await checkButtonAndClickWithID('ListSticky_None');
+ await driver.swipe(600, 1080, 600, 300);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListSticky_Header');
+ await driver.swipe(100, 500, 100, 1080);
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ListSticky_Footer');
+ await driver.swipe(600, 1080, 600, 100);
+ await driver.delayMs(1000);
+ await pressBack();
+
+ await pressBack();
+ })
+
+ //点击首页Swiper
+ it(`SwiperBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Swiper');
+ await checkButtonAndClickWithID('SwiperCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperIndexSample');
+ await checkButtonAndClickWithID('change index 5 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperVerticalSample');
+ await checkButtonAndClickWithID('change Vertical false to true');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperItemSpaceSample');
+ await checkButtonAndClickWithID('change itemSpace 0 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperDisplayModeSample');
+ await checkButtonAndClickWithID('change displayMode to STRETCH');
+ await checkButtonAndClickWithID('change displayMode to AUTO_LINEAR');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperDisplayCountSample');
+ await checkButtonAndClickWithID('change displayCount 1 to 3');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperNextMarginSample');
+ await checkButtonAndClickWithID('change nextMargin 0 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperPrevMarginSample');
+ await checkButtonAndClickWithID('change prevMargin 0 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperCurveSample');
+ await checkButtonAndClickWithID('change curve to Linear');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Ease');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to EaseIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to EaseOut');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to EaseInOut');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to FastOutSlowIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to LinearOutSlowIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to FastOutLinearIn');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to ExtremeDeceleration');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Sharp');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Rhythm');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Smooth');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change curve to Friction');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperControllerShowNextSample');
+ await checkButtonAndClickWithID('swiperController showNext');
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperManualSlidingSample');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperLoopSample');
+ await checkButtonAndClickWithID('change loop false to true');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperEffectModeSample');
+ await checkButtonAndClickWithID('change effectMode to Spring');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change effectMode to Fade');
+ await driver.swipe(500, 800, 100, 800);
+ await checkButtonAndClickWithID('change effectMode to None');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await checkButtonAndClickWithID('SwiperDurationSample');
+ await checkButtonAndClickWithID('change duration 200 to 500');
+ await driver.swipe(500, 800, 100, 800);
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Grid
+ it(`GridBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Grid');
+ await checkButtonAndClickWithID('GridCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('GridWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('GridHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('GridPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GridMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCColumnsTemplateSample');
+ await checkButtonAndClickWithID('change columnsTemplate 1fr 1fr to 1fr 1fr 2fr');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCRowsTemplateSample');
+ await checkButtonAndClickWithID('change rowsTemplate 1fr 1fr to 1fr 1fr 2fr');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCRowsGapSample');
+ await checkButtonAndClickWithID('change rowsGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRCColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetCColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRRowsGapSample');
+ await checkButtonAndClickWithID('change rowsGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridSetRRowsGapSample');
+ await checkButtonAndClickWithID('change rowsGap 5 to 10');
+ await pressBack();
+ await checkButtonAndClickWithID('GridMinCountSample');
+ await checkButtonAndClickWithID('change minCount 0 to 5');
+ await pressBack();
+ await checkButtonAndClickWithID('GridMaxCountSample');
+ await checkButtonAndClickWithID('change maxCount 10 to 5');
+ await pressBack();
+ await checkButtonAndClickWithID('GridNotSetRCColumnsGapSample');
+ await checkButtonAndClickWithID('change columnGap 0 to 10');
+ await pressBack();
+
+ await driver.swipe(540, 2100, 540, 300, 200);
+
+ await checkButtonAndClickWithID('GridNotSetRCLayoutDirectionSample');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.Row');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.RowReverse');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.Row');
+ await checkButtonAndClickWithID('change layoutDirection to GridDirection.ColumnReverse');
+ await pressBack();
+ await checkButtonAndClickWithID('GridNotSetRCCellLengthSample');
+ await checkButtonAndClickWithID('change cellLength 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('GridManualScrollingSample');
+ await driver.swipe(540, 1000, 540, 500, 200);
+ await pressBack();
+ await checkButtonAndClickWithID('GridScrollToSample');
+ await checkButtonAndClickWithID('change scrollTo to 100');
+ await pressBack();
+ await checkButtonAndClickWithID('GridScrollEdgeSample');
+ await checkButtonAndClickWithID('change scrollEdge to Edge.Bottom');
+ await pressBack();
+ await checkButtonAndClickWithID('GridScrollBySample');
+ await checkButtonAndClickWithID('change scrollBy to 100');
+ await pressBack();
+ await checkButtonAndClickWithID('GridEdgeEffectSample');
+ await checkButtonAndClickWithID('change edgeEffect to EdgeEffect.Spring');
+ await checkButtonAndClickWithID('change edgeEffect to EdgeEffect.Fade');
+ await checkButtonAndClickWithID('change edgeEffect to EdgeEffect.None');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Video
+ it(`VideoBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Video');
+ await checkButtonAndClickWithID('VideoCreateSample');
+ await driver.delayMs(2000);
+ await pressBack();
+ await checkButtonAndClickWithID('VideoWidthSample');
+ await driver.delayMs(2000);
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('VideoHeightSample');
+ await driver.delayMs(2000);
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('VideoPaddingSample');
+ await driver.delayMs(2000);
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('VideoMarginSample');
+ await driver.delayMs(2000);
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ //////////////////////
+
+ //点击首页CheckBox
+ it(`CheckboxBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CheckBox');
+ //创建CheckBox组件
+ await checkButtonAndClickWithID('CheckBoxCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('CheckBoxWidth');
+ await checkButtonAndClickWithID('CheckBoxChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('CheckBoxHeight');
+ await checkButtonAndClickWithID('CheckBoxChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('CheckBoxPadding');
+ await checkButtonAndClickWithID('CheckBoxChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('CheckBoxMargin');
+ await checkButtonAndClickWithID('CheckBoxChangeMargin');
+ await pressBack();
+ //改变Size
+ await checkButtonAndClickWithID('CheckBoxSize');
+ await checkButtonAndClickWithID('CheckBoxChangeSize');
+ await pressBack();
+ //改变Select
+ await checkButtonAndClickWithID('CheckBoxSelect');
+ await checkButtonAndClickWithID('CheckBoxChangeSelect');
+ await pressBack();
+ //改变MarkStyle
+ await checkButtonAndClickWithID('CheckBoxMarkStyle');
+ await checkButtonAndClickWithID('CheckBoxChangeMarkStyle');
+ await pressBack();
+ //GroupSelect
+ await checkButtonAndClickWithID('CheckBoxGroupSelect');
+ await checkButtonAndClickWithID('CheckBoxChangeSelect');
+ await pressBack();
+ //GroupCancelSelect
+ await checkButtonAndClickWithID('CheckBoxGroupCancelSelect');
+ await checkButtonAndClickWithID('CheckBoxChangeCancelSelect');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Toggle
+ it(`ToggleBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Toggle');
+ await checkButtonAndClickWithID('ToggleCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleSelectedColorSample');
+ await checkButtonAndClickWithID('change selectedColor');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleSwitchPointColorSample');
+ await checkButtonAndClickWithID('change switchPointColor');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleSizeSample');
+ await checkButtonAndClickWithID('change size');
+ await pressBack();
+ await checkButtonAndClickWithID('TogglePaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleSwitchSample');
+ await checkButtonAndClickWithID('change toggleIsOn');
+ await checkButtonAndClickWithID('change toggleIsOn');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleCheckboxSelectSample');
+ await checkButtonAndClickWithID('change select');
+ await pressBack();
+ await checkButtonAndClickWithID('ToggleCheckboxCancelSample');
+ await checkButtonAndClickWithID('change cancel');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页TextArea
+ it(`TextAreaBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextArea');
+ await checkButtonAndClickWithID('TextAreaCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaTextAlignSample');
+ await checkButtonAndClickWithID('change textAlign to Start');
+ await checkButtonAndClickWithID('change textAlign to Center');
+ await checkButtonAndClickWithID('change textAlign to End');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaFontSample');
+ await checkButtonAndClickWithID('change font');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaTextSample');
+ await checkButtonAndClickWithID('change textAreaTextLength 10 to 100');
+ await pressBack();
+ await checkButtonAndClickWithID('TextAreaMaxLinesSample');
+ await checkButtonAndClickWithID('change maxLines 1 to 3');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Search
+ it(`SearchBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Search');
+ await checkButtonAndClickWithID('SearchCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchValueSample');
+ await checkButtonAndClickWithID('change searchValueLength 10 to 100');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchTextAlignSample');
+ await checkButtonAndClickWithID('change textAlign to Start');
+ await checkButtonAndClickWithID('change textAlign to Center');
+ await checkButtonAndClickWithID('change textAlign to End');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchTextFontSample');
+ await checkButtonAndClickWithID('change textFont');
+ await pressBack();
+ await checkButtonAndClickWithID('SearchPlaceholderFontSample');
+ await checkButtonAndClickWithID('change placeholderFont');
+ await pressBack();
+ await pressBack();
+ })
+
+
+ })
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/GridRow.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/GridRow.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..42b5bdb6f4b8b36afdbd3daaab0ac6b5821b9000
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/GridRow.test.ets
@@ -0,0 +1,743 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { Driver, ON } from '@ohos.UiTest';
+
+const driver = Driver.create();
+let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator();
+
+//通过id验证有没有这个组件 有的话点击一下
+async function checkButtonAndClickWithID(text: string, delayTime: number = 1000) {
+ let idName = text;
+ await driver.assertComponentExist(ON.id(idName));
+ let button = await driver.findComponent(ON.id(idName));
+ await button.click();
+ if (delayTime > 0) {
+ await driver.delayMs(delayTime);
+ }
+}
+
+async function pressBack() {
+ await driver.pressBack();
+ await driver.delayMs(1000);
+}
+
+export default function gridRowTest() {
+ describe('ActsGridRowTest', () => {
+ beforeAll(() => {
+
+ })
+ beforeEach(() => {
+
+ })
+ afterEach(() => {
+
+ })
+ afterAll(() => {
+
+ })
+ /**
+ * 拉起应用
+ */
+ it(`Benchmark_StartAbility_001`, 0, async (done: Function) => {
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 begin');
+ try {
+ await abilityDelegatorRegistry.startAbility({
+ bundleName: 'cn.openharmony.benchmarksample',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (err) {
+ done();
+ }
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 end');
+ })
+
+ /**
+ * 点击首页GridRow
+ */
+ it(`GridRowBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('GridRow');
+
+ await checkButtonAndClickWithID('GridRowCreate');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowWidth');
+ await checkButtonAndClickWithID('GridRowWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowHeight');
+ await checkButtonAndClickWithID('GridRowHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowPadding');
+ await checkButtonAndClickWithID('GridRowPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowMargin');
+ await checkButtonAndClickWithID('GridRowMargin');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowColumns');
+ await checkButtonAndClickWithID('GridRowColumns');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowGutter');
+ await checkButtonAndClickWithID('GridRowGutter');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowDirection');
+ await checkButtonAndClickWithID('GridRowDirection');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowBreakpoints');
+ await checkButtonAndClickWithID('GridRowBreakpoints');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页GridCol
+ */
+ it(`GridColBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('GridCol');
+
+ await checkButtonAndClickWithID('GridColCreate');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOptionSpan');
+ await checkButtonAndClickWithID('GridColOptionSpan');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOptionOffset');
+ await checkButtonAndClickWithID('GridColOptionOffset');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOptionOrder');
+ await checkButtonAndClickWithID('GridColOptionOrder');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColSpan');
+ await checkButtonAndClickWithID('GridColSpan');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOffset');
+ await checkButtonAndClickWithID('GridColOffset');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOrder');
+ await checkButtonAndClickWithID('GridColOrder');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColWidth');
+ await checkButtonAndClickWithID('GridColWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColHeight');
+ await checkButtonAndClickWithID('GridColHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColPadding');
+ await checkButtonAndClickWithID('GridColPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColMargin');
+ await checkButtonAndClickWithID('GridColMargin');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Scroll
+ */
+ it(`ScrollBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Scroll');
+ //创建Scroll组件
+ await checkButtonAndClickWithID('ScrollCreate');
+ await pressBack();
+
+ //改变width
+ await checkButtonAndClickWithID('ScrollWidth');
+ await checkButtonAndClickWithID('ScrollWidth');
+ await pressBack();
+
+ //改变height
+ await checkButtonAndClickWithID('ScrollHeight');
+ await checkButtonAndClickWithID('ScrollHeight');
+ await pressBack();
+
+ //改变Padding
+ await checkButtonAndClickWithID('ScrollPadding');
+ await checkButtonAndClickWithID('ScrollPadding');
+ await pressBack();
+
+ //改变Margin
+ await checkButtonAndClickWithID('ScrollMargin');
+ await checkButtonAndClickWithID('ScrollMargin');
+ await pressBack();
+
+
+ //改变EnableScrollInteraction
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionTrueToFalse');
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionTrueToFalse');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionFalseToTrue');
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionFalseToTrue');
+ await pressBack();
+
+ //拖动场景下Scroll组件更新布局耗时
+ await checkButtonAndClickWithID('ScrollDrag');
+ await driver.fling({
+ x: 100, y: 1100
+ }, {
+ x: 100, y: 500
+ }, 100, 100)
+ await pressBack();
+
+ //抛滑场景下Scroll组件更新布局耗时
+ await checkButtonAndClickWithID('ScrollSlippage');
+ await driver.fling({
+ x: 100, y: 1100
+ }, {
+ x: 100, y: 500
+ }, 100, 600)
+ await pressBack();
+ //Scroll组件调用scrollTo触发页面跳转布局
+ await checkButtonAndClickWithID('ScrollScrollTo');
+ await checkButtonAndClickWithID('ScrollScrollTo');
+ await pressBack();
+ //Scroll组件调用scrollEdge触发页面跳转布局
+ await checkButtonAndClickWithID('ScrollScrollEdge');
+ await checkButtonAndClickWithID('ScrollScrollEdge');
+ await pressBack();
+ //Scroll组件edgeEffect属性更新布局耗时
+ await checkButtonAndClickWithID('ScrollEdgeEffectSpring');
+ await checkButtonAndClickWithID('ScrollEdgeEffectSpring');
+ await driver.swipe(100, 1100, 100, 500, 200)
+ await pressBack();
+
+
+ await checkButtonAndClickWithID('ScrollEdgeEffectFade');
+ await checkButtonAndClickWithID('ScrollEdgeEffectFade');
+ await driver.swipe(100, 1100, 100, 500, 200)
+ await pressBack();
+
+ await checkButtonAndClickWithID('ScrollEdgeEffectNone');
+ await checkButtonAndClickWithID('ScrollEdgeEffectNone');
+ await driver.swipe(100, 1100, 100, 500, 200)
+ await pressBack();
+
+ //Scroll组件调用scrollBy触发页面跳转布局
+ await checkButtonAndClickWithID('ScrollScrollBy');
+ await checkButtonAndClickWithID('ScrollScrollBy');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Tab
+ */
+ it(`TabsBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Tabs');
+ //创建Tab组件
+ await checkButtonAndClickWithID('TabsCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('TabsWidth');
+ await checkButtonAndClickWithID('TabChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('TabsHeight');
+ await checkButtonAndClickWithID('TabsChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('TabsPadding');
+ await checkButtonAndClickWithID('TabsChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('TabsMargin');
+ await checkButtonAndClickWithID('TabsChangeMargin');
+ await pressBack();
+ //改变Vertical
+ await checkButtonAndClickWithID('TabsVertical');
+ await checkButtonAndClickWithID('TabsChangeVertical');
+ await pressBack();
+ //改变TabsBarMode
+ await checkButtonAndClickWithID('TabsBarMode');
+ await checkButtonAndClickWithID('TabsChangeTabsBarMode');
+ await pressBack();
+ //改变Divider
+ await checkButtonAndClickWithID('TabsDivider');
+ await checkButtonAndClickWithID('TabsChangeDivider');
+ await pressBack();
+ //改变BarPosition
+ await checkButtonAndClickWithID('TabsBarPosition');
+ await checkButtonAndClickWithID('TabsChangeBarPosition');
+ await pressBack();
+ await driver.delayMs(1000);
+ //改变tabIndex
+ await checkButtonAndClickWithID('TabsIndex');
+ await driver.delayMs(2000);
+ await checkButtonAndClickWithID('TabsChangeIndex');
+ await pressBack();
+ //改变BarWidth
+ await checkButtonAndClickWithID('TabsBarWidth');
+ await checkButtonAndClickWithID('TabChangeBarWidth');
+ await pressBack();
+ //改变BarHeight
+ await checkButtonAndClickWithID('TabsBarHeight');
+ await checkButtonAndClickWithID('TabChangeBarHeight');
+ await pressBack();
+ //抛滑Fling
+ await checkButtonAndClickWithID('TabsFling');
+ await driver.fling({
+ x: 100, y: 500
+ }, {
+ x: 700, y: 500
+ }, 100, 100)
+ await pressBack();
+ //抛滑Drag
+ await checkButtonAndClickWithID('TabsDrag');
+ await driver.fling({
+ x: 700, y: 500
+ }, {
+ x: 100, y: 500
+ }, 100, 100)
+ await pressBack();
+ //点击页签ClickTab
+ await checkButtonAndClickWithID('TabsClickTab');
+ await checkButtonAndClickWithID('TabsChangeIndex');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Navigation
+ */
+ it(`NavigationBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Navigation');
+ await checkButtonAndClickWithID('NavigationCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationWidthSample');
+ await checkButtonAndClickWithID('change width 500 to 600');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationTitleModeSample');
+ await checkButtonAndClickWithID('change titleMode to Free');
+ await checkButtonAndClickWithID('change titleMode to Full');
+ await checkButtonAndClickWithID('change titleMode to Mini');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideToolBarSample');
+ await checkButtonAndClickWithID('change hideToolBar true to false');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideTitleBarSample');
+ await checkButtonAndClickWithID('change hideTitleBar true to false');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideBackButtonSample');
+ await checkButtonAndClickWithID('change hideBackButton true to false');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationNavBarWidthSample');
+ await checkButtonAndClickWithID('change navBarWidth 240 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationModeSample');
+ await checkButtonAndClickWithID('change navigationMode Stack to Split');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationNavBarPositionSample');
+ await checkButtonAndClickWithID('change navBarPosition Start to End');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideNavBarSample');
+ await checkButtonAndClickWithID('change hideNavBar Stack to Split');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationStackJumpSample');
+ await checkButtonAndClickWithID('Stack jump to next page');
+ await pressBack();
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationSplitJumpSample');
+ await checkButtonAndClickWithID('Split jump to next page');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Flex
+ */
+ it(`FlexBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Flex');
+ await checkButtonAndClickWithID('FlexCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueDirectionSample');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.Row');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.RowReverse');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.Column');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.ColumnReverse');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueWrapSample');
+ await checkButtonAndClickWithID('change value wrap to FlexWrap.NoWrap');
+ await checkButtonAndClickWithID('change value wrap to FlexWrap.Wrap');
+ await checkButtonAndClickWithID('change value wrap to FlexWrap.WrapReverse');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueJustifyContentSample');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.Start');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.Center');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.End');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceBetween');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceAround');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceEvenly');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueAlignItemsSample');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Auto');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Start');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Center');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.End');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Stretch');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Baseline');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueAlignContentSample');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.Start');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.Center');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.End');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceBetween');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceAround');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceEvenly');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Select
+ */
+ it(`SelectBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Select');
+ //创建Select组件
+ await checkButtonAndClickWithID('SelectCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('SelectWidth');
+ await checkButtonAndClickWithID('SelectChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('SelectHeight');
+ await checkButtonAndClickWithID('SelectChangeHeight');
+ await pressBack();
+ //改变Size
+ await checkButtonAndClickWithID('SelectSize');
+ await checkButtonAndClickWithID('SelectChangeSize');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('SelectPadding');
+ await checkButtonAndClickWithID('SelectChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('SelectMargin');
+ await checkButtonAndClickWithID('SelectChangeMargin');
+ await pressBack();
+ //改变Space
+ await checkButtonAndClickWithID('SelectSpace');
+ await checkButtonAndClickWithID('SelectChangeSpace');
+ await pressBack();
+ //改变ArrowPosition
+ await checkButtonAndClickWithID('SelectArrowPosition');
+ await checkButtonAndClickWithID('SelectChangeArrowPosition');
+ await pressBack();
+ //首次展开
+ await checkButtonAndClickWithID('SelectFirstExpand');
+ await checkButtonAndClickWithID('SelectFirstExpand');
+ await pressBack();
+ await pressBack();
+ //再次展开
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await pressBack();
+ await pressBack();
+ //首次展开后收起
+ await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ await pressBack();
+ //多次展开后收起
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Slider
+ */
+ it(`SliderBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Slider');
+ //创建Slider组件
+ await checkButtonAndClickWithID('SliderCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('SliderWidth');
+ await checkButtonAndClickWithID('SliderChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('SliderHeight');
+ await checkButtonAndClickWithID('SliderChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('SliderPadding');
+ await checkButtonAndClickWithID('SliderChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('SliderMargin');
+ await checkButtonAndClickWithID('SliderChangeMargin');
+ await pressBack();
+ //改变Step
+ await checkButtonAndClickWithID('SliderStep');
+ await checkButtonAndClickWithID('SliderChangeStep');
+ await pressBack();
+ //改变Direction
+ await checkButtonAndClickWithID('SliderDirection');
+ await checkButtonAndClickWithID('SliderChangeDirection');
+ await pressBack();
+ //改变reverse
+ await checkButtonAndClickWithID('SliderReverse');
+ await checkButtonAndClickWithID('SliderChangeReverse');
+ await pressBack();
+ //改变Style
+ await checkButtonAndClickWithID('SliderStyle');
+ await checkButtonAndClickWithID('SliderChangeStyle');
+ await pressBack();
+ //改变TrackThickness
+ await checkButtonAndClickWithID('SliderTrackThickness');
+ await checkButtonAndClickWithID('SliderChangeTrackThickness');
+ await pressBack();
+ //改变BlockSize
+ await checkButtonAndClickWithID('SliderBlockSize');
+ await checkButtonAndClickWithID('SliderChangeBlockSize');
+ await pressBack();
+ //手指滑动
+ await checkButtonAndClickWithID('SliderFingerSliding');
+ await driver.swipe(13, 296, 383, 296, 200);
+ await pressBack();
+ //手指点击滑轨
+ await checkButtonAndClickWithID('SliderClick');
+ await driver.click(383, 296);
+ await pressBack();
+ // 鼠标滚轮调节滑块位置
+ await checkButtonAndClickWithID('SliderMouseScroll');
+ await driver.mouseScroll({
+ x: 163, y: 339
+ }, true, 20);
+ await pressBack();
+ // 外接键盘调节滑块位置
+ await checkButtonAndClickWithID('SliderKeyboardScroll');
+ // await driver.triggerKey(KeyCode.KEYCODE_DPAD_RIGHT);
+ await driver.swipe(13, 296, 383, 296, 200);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Divider
+ */
+ it(`DividerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Divider');
+ //创建Divider组件
+ await checkButtonAndClickWithID('DividerCreate');
+ await pressBack();
+ //更改StrokeWidth
+ await checkButtonAndClickWithID('DividerStrokeWidth');
+ await checkButtonAndClickWithID('DividerChangeStrokeWidth');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('DividerWidth');
+ await checkButtonAndClickWithID('DividerChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('DividerHeight');
+ await checkButtonAndClickWithID('DividerChangeHeight');
+ await pressBack();
+ //改变Size
+ await checkButtonAndClickWithID('DividerSize');
+ await checkButtonAndClickWithID('DividerChangeSize');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('DividerPadding');
+ await checkButtonAndClickWithID('DividerChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('DividerMargin');
+ await checkButtonAndClickWithID('DividerChangeMargin');
+ await pressBack();
+ //改变Color
+ await checkButtonAndClickWithID('DividerColor');
+ await checkButtonAndClickWithID('DividerChangeColor');
+ await pressBack();
+ //改变Vertical
+ await checkButtonAndClickWithID('DividerVertical');
+ await checkButtonAndClickWithID('DividerChangeVerticalTrue');
+ await checkButtonAndClickWithID('DividerChangeVerticalFalse');
+ await pressBack();
+ //改变LineCap
+ await checkButtonAndClickWithID('DividerLineCap');
+ await checkButtonAndClickWithID('DividerChangeLineCapButt');
+ await checkButtonAndClickWithID('DividerChangeLineCapRound');
+ await checkButtonAndClickWithID('DividerChangeLineCapSquare');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Refresh
+ */
+ it(`RefreshBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Refresh');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshCreateSample');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshWidthSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshHeightSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshSizeSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change size');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshPaddingSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshMarginSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshPullSample');
+ await driver.delayMs(1000);
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshOffsetSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change offset 20 to 30');
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshFrictionSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change friction 60 to 80');
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshOnStateChangeSample');
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Progress
+ */
+ it(`ProgressBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Progress');
+ await checkButtonAndClickWithID('ProgressCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressProgressTypeSample');
+ await checkButtonAndClickWithID('change progressType to Linear');
+ await checkButtonAndClickWithID('change progressType to Ring');
+ await checkButtonAndClickWithID('change progressType to Eclipse');
+ await checkButtonAndClickWithID('change progressType to ScaleRing');
+ await checkButtonAndClickWithID('change progressType to Capsule');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressProgressStyleSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressLinearSample');
+ await checkButtonAndClickWithID('change strokeWidth(4-20) add strokeRadius(0-10)');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressRingSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressScaleRingSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ await pressBack();
+ await pressBack();
+ })
+
+ })
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/List.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/List.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..ae5425df9d8d0af68ca08c58659dc49b995ae3cc
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/List.test.ets
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import abilityTest from './Ability.test'
+import firstProjectTest from './FirstProject.test'
+import twoTest from './Two.test'
+import threeTest from './Three.test'
+import gridRow from './GridRow.test'
+import middleThirteenTest from './MiddleThirteen.test'
+import patternLockToScrollBarTest from './PatternLockToScrollBar.test'
+
+export default function testsuite() {
+ // abilityTest()
+ firstProjectTest()
+ twoTest()
+ threeTest()
+ gridRow()
+ middleThirteenTest()
+ patternLockToScrollBarTest()
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/MiddleThirteen.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/MiddleThirteen.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..23492623891f84491a898de80fc38db1c0ef567e
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/MiddleThirteen.test.ets
@@ -0,0 +1,580 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { Driver, ON } from '@ohos.UiTest';
+import { KeyCode } from '@ohos.multimodalInput.keyCode';
+
+const driver = Driver.create();
+let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator();
+
+//通过id验证有没有这个组件 有的话点击一下
+async function checkButtonAndClickWithID(text: string, delayTime: number = 1000) {
+ let idName = text;
+ await driver.assertComponentExist(ON.id(idName));
+ let button = await driver.findComponent(ON.id(idName));
+ await button.click();
+ if (delayTime > 0) {
+ await driver.delayMs(delayTime);
+ }
+}
+
+async function pressBack() {
+ await driver.pressBack();
+ await driver.delayMs(1000);
+}
+
+export default function middleThirteenTest() {
+ describe('ActsMiddleThirteenTest', () => {
+ beforeAll(() => {
+
+ })
+ beforeEach(() => {
+
+ })
+ afterEach(() => {
+
+ })
+ afterAll(() => {
+
+ })
+ /**
+ * 拉起应用
+ */
+ it(`Benchmark_StartAbility_001`, 0, async (done: Function) => {
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 begin');
+ try {
+ await abilityDelegatorRegistry.startAbility({
+ bundleName: 'cn.openharmony.benchmarksample',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (err) {
+ done();
+ }
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 end');
+ })
+
+
+ /**
+ * 点击首页Marquee
+ */
+ it(`MarqueeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Marquee');
+ //创建Marquee组件
+ await checkButtonAndClickWithID('MarqueeCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('MarqueeWidth');
+ await checkButtonAndClickWithID('MarqueeChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('MarqueeHeight');
+ await checkButtonAndClickWithID('MarqueeChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('MarqueePadding');
+ await checkButtonAndClickWithID('MarqueeChangePadding');
+ await pressBack();
+ // 改变Margin
+ await checkButtonAndClickWithID('MarqueeMargin');
+ await checkButtonAndClickWithID('MarqueeChangeMargin');
+ await pressBack();
+ // 改变Src
+ await checkButtonAndClickWithID('MarqueeSrc');
+ await checkButtonAndClickWithID('MarqueeChangeSrc');
+ await pressBack();
+ // 改变Step
+ await checkButtonAndClickWithID('MarqueeStep');
+ await checkButtonAndClickWithID('MarqueeChangeStep');
+ await pressBack();
+ // 改变FromStart
+ await checkButtonAndClickWithID('MarqueeFromStart');
+ await checkButtonAndClickWithID('MarqueeChangeFromStart');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页DataPanel
+ */
+ it(`DataPanelBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('DataPanel');
+ //创建DataPanel组件
+ await checkButtonAndClickWithID('DataPanelCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('DataPanelWidth');
+ await checkButtonAndClickWithID('DataPanelChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('DataPanelHeight');
+ await checkButtonAndClickWithID('DataPanelChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('DataPanelPadding');
+ await checkButtonAndClickWithID('DataPanelChangePadding');
+ await pressBack();
+ // 改变Margin
+ await checkButtonAndClickWithID('DataPanelMargin');
+ await checkButtonAndClickWithID('DataPanelChangeMargin');
+ await pressBack();
+ // 改变CloseEffect
+ await checkButtonAndClickWithID('DataPanelCloseEffect');
+ await checkButtonAndClickWithID('DataPanelChangeCloseEffect');
+ await pressBack();
+ // 改变StrokeWidth
+ await checkButtonAndClickWithID('DataPanelStrokeWidth');
+ await checkButtonAndClickWithID('DataPanelChangeStrokeWidth');
+ await pressBack();
+ // 改变Radius
+ await checkButtonAndClickWithID('DataPanelRadius');
+ await checkButtonAndClickWithID('DataPanelChangeRadius');
+ await pressBack();
+ // 改变OffsetX
+ await checkButtonAndClickWithID('DataPanelOffsetX');
+ await checkButtonAndClickWithID('DataPanelChangeOffsetX');
+ await pressBack();
+ // 改变OffsetY
+ await checkButtonAndClickWithID('DataPanelOffsetY');
+ await checkButtonAndClickWithID('DataPanelChangeOffsetY');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Rating
+ */
+ it(`RatingBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Rating');
+ //创建Rating组件
+ await checkButtonAndClickWithID('RatingCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('RatingWidth');
+ await checkButtonAndClickWithID('RatingChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('RatingHeight');
+ await checkButtonAndClickWithID('RatingChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('RatingPadding');
+ await checkButtonAndClickWithID('RatingChangePadding');
+ await pressBack();
+ // 改变Margin
+ await checkButtonAndClickWithID('RatingMargin');
+ await checkButtonAndClickWithID('RatingChangeMargin');
+ await pressBack();
+ // 改变Stars
+ await checkButtonAndClickWithID('RatingStars');
+ await checkButtonAndClickWithID('RatingChangeStars');
+ await pressBack();
+ // 改变StarStyle
+ await checkButtonAndClickWithID('RatingStarStyle');
+ await checkButtonAndClickWithID('RatingChangeStarStyle');
+ await pressBack();
+ // 改变OptionsRating
+ await checkButtonAndClickWithID('RatingOptionsRating');
+ await checkButtonAndClickWithID('RatingChangeOptionsRating');
+ await pressBack();
+ // Click
+ await checkButtonAndClickWithID('RatingClick');
+ await checkButtonAndClickWithID('RatingClickIndex6');
+ await pressBack();
+ // swip
+ await checkButtonAndClickWithID('RatingSwip');
+ await driver.swipe(50, 600, 500, 600);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页TextClock
+ */
+ it(`TextClockBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextClock');
+ await checkButtonAndClickWithID('TextClockCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockFormatSample');
+ await checkButtonAndClickWithID('change format');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Hyperlink
+ */
+ it(`HyperlinkBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Hyperlink');
+ await checkButtonAndClickWithID('HyperlinkCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页QRCode
+ */
+ it(`QRCodeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('QRCode');
+ await checkButtonAndClickWithID('QRCodeCreateSample');
+ await driver.delayMs(1000);
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodeWidthSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodeHeightSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodePaddingSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodeMarginSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Gauge
+ */
+ it(`GaugeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Gauge');
+ await checkButtonAndClickWithID('GaugeCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugePaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeStrokeWidthSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 10');
+ await pressBack();
+ // await checkButtonAndClickWithID('GaugeTrackShadowSample');
+ // await checkButtonAndClickWithID('change trackShadow');
+ // await pressBack();
+ await checkButtonAndClickWithID('GaugeAngleSample');
+ await checkButtonAndClickWithID('change angle');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Badge
+ */
+ it(`BadgeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Badge');
+ //创建Badge组件
+ await checkButtonAndClickWithID('BadgeCreate');
+ await pressBack();
+ //改变Size
+ await checkButtonAndClickWithID('BadgeSize');
+ await checkButtonAndClickWithID('BadgeChangeSize');
+ await pressBack();
+ //改变Color
+ await checkButtonAndClickWithID('BadgeColor');
+ await checkButtonAndClickWithID('BadgeChangeColor');
+ await pressBack();
+ //改变FontSize
+ await checkButtonAndClickWithID('BadgeFontSize');
+ await checkButtonAndClickWithID('BadgeChangeFontSize');
+ await pressBack();
+ //改变FontWeight
+ await checkButtonAndClickWithID('BadgeFontWeight');
+ await checkButtonAndClickWithID('BadgeChangeFontWeight');
+ await pressBack();
+ //改变BorderWidth
+ await checkButtonAndClickWithID('BadgeBorderWidth');
+ await checkButtonAndClickWithID('BadgeChangeBorderWidth');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页AlphabetIndexer
+ */
+ it(`AlphabetIndexerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('AlphabetIndexer');
+ //创建AlphabetIndexerCreate组件
+ await checkButtonAndClickWithID('AlphabetIndexerCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变SelectedColor
+ await checkButtonAndClickWithID('AlphabetIndexerSelectedColor');
+ await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedColor');
+ await pressBack();
+ //改变PopupColor
+ await checkButtonAndClickWithID('AlphabetIndexerPopupColor');
+ await checkButtonAndClickWithID('AlphabetIndexerChangePopupColor');
+ await pressBack();
+ //改变SelectedBackgroundColor
+ await checkButtonAndClickWithID('AlphabetIndexerSelectedBackgroundColor');
+ await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedBackgroundColor');
+ await pressBack();
+ // 改变PopupBackground
+ await checkButtonAndClickWithID('AlphabetIndexerPopupBackground');
+ await checkButtonAndClickWithID('AlphabetIndexerChangePopupBackground');
+ await pressBack();
+ //改变SelectedFont
+ await checkButtonAndClickWithID('AlphabetIndexerSelectedFont');
+ await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedFont');
+ await pressBack();
+ //改变popupFont
+ await checkButtonAndClickWithID('AlphabetIndexerPopupFont');
+ await checkButtonAndClickWithID('AlphabetIndexerChangePopupFont');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Menu
+ */
+ it(`MenuBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Menu');
+ //创建Menu组件
+ await checkButtonAndClickWithID('MenuCreate');
+ await pressBack();
+ //改变Font
+ await checkButtonAndClickWithID('MenuFont');
+ await checkButtonAndClickWithID('MenuChangeFont');
+ await pressBack();
+ //改变FontColor
+ await checkButtonAndClickWithID('MenuFontColor');
+ await checkButtonAndClickWithID('MenuChangeFontColor');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('MenuWidth');
+ await checkButtonAndClickWithID('MenuChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('MenuHeight');
+ await checkButtonAndClickWithID('MenuChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('MenuPadding');
+ await checkButtonAndClickWithID('MenuChangePadding');
+ await pressBack();
+ // 变Margin
+ await checkButtonAndClickWithID('MenuMargin');
+ await checkButtonAndClickWithID('MenuChangeMargin');
+ await pressBack();
+ // Menu展开菜单Expend
+ await checkButtonAndClickWithID('MenuFirstExpend');
+ await checkButtonAndClickWithID('MenuFirstChangeExpend');
+ await checkButtonAndClickWithID('MenuFirstChangeExpendSencond');
+ await checkButtonAndClickWithID('MenuFirstChangeExpendThird');
+ await pressBack();
+ await pressBack();
+ // Menu收起后再次展开菜单Expend
+ await checkButtonAndClickWithID('MenuSecondExpend');
+ await checkButtonAndClickWithID('MenuSecondChangeExpend');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendSencond');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendThird');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuSecondChangeExpend');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendSencond');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendThird');
+ await pressBack();
+ await pressBack();
+ // Menu收起后多次关闭
+ await checkButtonAndClickWithID('MenuMoreClose');
+ await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ await checkButtonAndClickWithID('MenuMoreCloseSencond');
+ await checkButtonAndClickWithID('MenuMoreCloseThird');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ await pressBack();
+ await pressBack();
+ // Group收起后再次展开
+ await checkButtonAndClickWithID('MenuGroupCloseExpand');
+ await checkButtonAndClickWithID('MenuChangeGroupCloseExpand');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuChangeGroupCloseExpand');
+ await pressBack();
+ await pressBack();
+ // Group多次关闭
+ await checkButtonAndClickWithID('MenuGroupMoreClose');
+ await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ await pressBack();
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页TextPicker
+ */
+ it(`TextPickerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextPicker');
+ //创建TextPicker组件
+ await checkButtonAndClickWithID('TextPickerCreate');
+ await pressBack();
+ //改变TextStyle
+ await checkButtonAndClickWithID('TextPickerTextStyle');
+ await checkButtonAndClickWithID('TextPickerChangeTextStyle');
+ await pressBack();
+ //改变SelectedTextStyle
+ await checkButtonAndClickWithID('TextPickerSelectedTextStyle');
+ await checkButtonAndClickWithID('TextPickerChangeSelectedTextStyle');
+ await pressBack();
+ //改变DisappearTextStyle
+ await checkButtonAndClickWithID('TextPickerDisappearTextStyle');
+ await checkButtonAndClickWithID('TextPickerChangeDisappearTextStyle');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('TextPickerWidth');
+ await checkButtonAndClickWithID('TextPickerChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('TextPickerHeight');
+ await checkButtonAndClickWithID('TextPickerChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('TextPickerPadding');
+ await checkButtonAndClickWithID('TextPickerChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('TextPickerMargin');
+ await checkButtonAndClickWithID('TextPickerChangeMargin');
+ await pressBack();
+ //手指滑动
+ await checkButtonAndClickWithID('TextPickerFingerSwip');
+ await driver.swipe(150, 300, 150, 150)
+ await pressBack();
+ //手指点击
+ await checkButtonAndClickWithID('TextPickerClick');
+ await driver.click(150, 150)
+ await driver.delayMs(1000);
+ await pressBack();
+ //鼠标滚轮MouseScroll
+ await checkButtonAndClickWithID('TextPickerMouseScroll');
+ await driver.mouseScroll({ x: 150, y: 200 }, true, 5);
+ await driver.delayMs(1000);
+ await pressBack();
+ //键盘Scroll
+ await checkButtonAndClickWithID('TextPickerKeyBoardScroll');
+ // await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN);
+ await driver.swipe(150, 300, 150, 150)
+ await driver.delayMs(1000);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Counter
+ */
+ it(`CounterBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Counter');
+ //创建Counter组件
+ await checkButtonAndClickWithID('CounterCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('CounterWidth');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangeWidth');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('CounterHeight');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangeHeight');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('CounterPadding');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangePadding');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('CounterMargin');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangeMargin');
+ await driver.delayMs(1000);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页XComponent
+ */
+ it(`XComponentBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('XComponent');
+ //创建XComponent组件
+ await checkButtonAndClickWithID('XComponentCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ })
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/PatternLockToScrollBar.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/PatternLockToScrollBar.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..de65a160acf32816b86c104f79a33b6363bb3267
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/PatternLockToScrollBar.test.ets
@@ -0,0 +1,596 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { Driver, ON } from '@ohos.UiTest';
+
+const driver = Driver.create();
+let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator();
+
+//通过id验证有没有这个组件 有的话点击一下
+async function checkButtonAndClickWithID(text: string, delayTime: number = 1000) {
+ let idName = text;
+ await driver.assertComponentExist(ON.id(idName));
+ let button = await driver.findComponent(ON.id(idName));
+ await button.click();
+ if (delayTime > 0) {
+ await driver.delayMs(delayTime);
+ }
+}
+
+async function pressBack() {
+ await driver.pressBack();
+ await driver.delayMs(1000);
+}
+
+export default function patternLockToScrollBarTest() {
+ describe('ActsPatternLockToScrollBarTest', () => {
+ beforeAll(() => {
+
+ })
+ beforeEach(() => {
+
+ })
+ afterEach(() => {
+
+ })
+ afterAll(() => {
+
+ })
+ /**
+ * 拉起应用
+ */
+ it(`Benchmark_StartAbility_001`, 0, async (done: Function) => {
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 begin');
+ try {
+ await abilityDelegatorRegistry.startAbility({
+ bundleName: 'cn.openharmony.benchmarksample',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (err) {
+ done();
+ }
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 end');
+ })
+
+ /**
+ * 点击首页PatternLock
+ */
+ it(`PatternLockBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('PatternLock');
+ //创建PatternLock组件
+ await checkButtonAndClickWithID('PatternLockCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变SideLength
+ await checkButtonAndClickWithID('PatternLockSideLength');
+ await checkButtonAndClickWithID('PatternLockChangeSideLength');
+ await pressBack();
+ //改变CircleRadius
+ await checkButtonAndClickWithID('PatternLockCircleRadius');
+ await checkButtonAndClickWithID('PatternLockChangeCircleRadius');
+ await pressBack();
+ //改变RegularColor
+ await checkButtonAndClickWithID('PatternLockRegularColor');
+ await checkButtonAndClickWithID('PatternLockChangeRegularColor');
+ await pressBack();
+ //改变SelectedColor
+ await checkButtonAndClickWithID('PatternLockSelectedColor');
+ await checkButtonAndClickWithID('PatternLockChangeSelectedColor');
+ await pressBack();
+ //改变ActiveColor
+ await checkButtonAndClickWithID('PatternLockActiveColor');
+ await checkButtonAndClickWithID('PatternLockChangeActiveColor');
+ await pressBack();
+ //改变PathColor
+ await checkButtonAndClickWithID('PatternLockPathColor');
+ await checkButtonAndClickWithID('PatternLockChangePathColor');
+ await pressBack();
+ //改变PathStrokeWidth
+ await checkButtonAndClickWithID('PatternLockPathStrokeWidth');
+ await checkButtonAndClickWithID('PatternLockChangePathStrokeWidth');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Shape
+ */
+ it(`ShapeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Shape');
+ //创建Shape组件
+ await checkButtonAndClickWithID('ShapeCreate');
+ await pressBack();
+ //改变Fill
+ await checkButtonAndClickWithID('ShapeFill');
+ await checkButtonAndClickWithID('ShapeChangeFill');
+ await pressBack();
+ //改变FillOpacity
+ await checkButtonAndClickWithID('ShapeFillOpacity');
+ await checkButtonAndClickWithID('ShapeChangeFillOpacity');
+ await pressBack();
+ //改变stroke
+ await checkButtonAndClickWithID('ShapeStroke');
+ await checkButtonAndClickWithID('ShapeChangeStroke');
+ await pressBack();
+ //改变StrokeDashArray
+ await checkButtonAndClickWithID('ShapeStrokeDashArray');
+ await checkButtonAndClickWithID('ShapeChangeStrokeDashArray');
+ await pressBack();
+ //改变StrokeDashOffset
+ await checkButtonAndClickWithID('ShapeStrokeDashOffset');
+ await checkButtonAndClickWithID('ShapeChangeStrokeDashOffset');
+ await pressBack();
+ //改变StrokeWidth
+ await checkButtonAndClickWithID('ShapeStrokeWidth');
+ await checkButtonAndClickWithID('ShapeChangeStrokeWidth');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('ShapeWidth');
+ await checkButtonAndClickWithID('ShapeChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('ShapeHeight');
+ await checkButtonAndClickWithID('ShapeChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('ShapePadding');
+ await checkButtonAndClickWithID('ShapeChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('ShapeMargin');
+ await checkButtonAndClickWithID('ShapeChangeMargin');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Path
+ */
+ it(`PathBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Path');
+ //创建Path组件
+ await checkButtonAndClickWithID('PathCreate');
+ await pressBack();
+ //改变Fill
+ await checkButtonAndClickWithID('PathFill');
+ await checkButtonAndClickWithID('PathChangeFill');
+ await pressBack();
+ // 改变FillOpacity
+ await checkButtonAndClickWithID('PathFillOpacity');
+ await checkButtonAndClickWithID('PathChangeFillOpacity');
+ await pressBack();
+ //改变Stroke
+ await checkButtonAndClickWithID('PathStroke');
+ await checkButtonAndClickWithID('PathChangeStroke');
+ await pressBack();
+ //改变StrokeDashArray
+ await checkButtonAndClickWithID('PathStrokeDashArray');
+ await checkButtonAndClickWithID('PathChangeStrokeDashArray');
+ await pressBack();
+ //改变StrokeDashOffset
+ await checkButtonAndClickWithID('PathStrokeDashOffset');
+ await checkButtonAndClickWithID('PathChangeStrokeDashOffset');
+ await pressBack();
+ //改变StrokeWidth
+ await checkButtonAndClickWithID('PathStrokeWidth');
+ await checkButtonAndClickWithID('PathChangeStrokeWidth');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('PathWidth');
+ await checkButtonAndClickWithID('PathChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('PathHeight');
+ await checkButtonAndClickWithID('PathChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('PathPadding');
+ await checkButtonAndClickWithID('PathChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('PathMargin');
+ await checkButtonAndClickWithID('PathChangeMargin');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Line
+ */
+ it(`LineBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Line');
+ //创建Line组件
+ await checkButtonAndClickWithID('LineCreate');
+ await pressBack();
+ //改变Fill
+ await checkButtonAndClickWithID('LineFill');
+ await checkButtonAndClickWithID('LineChangeFill');
+ await pressBack();
+ // 改变FillOpacity
+ await checkButtonAndClickWithID('LineFillOpacity');
+ await checkButtonAndClickWithID('LineChangeFillOpacity');
+ await pressBack();
+ //改变Stroke
+ await checkButtonAndClickWithID('LineStroke');
+ await checkButtonAndClickWithID('LineChangeStroke');
+ await pressBack();
+ //改变StrokeDashArray
+ await checkButtonAndClickWithID('LineStrokeDashArray');
+ await checkButtonAndClickWithID('LineChangeStrokeDashArray');
+ await pressBack();
+ //改变StrokeDashOffset
+ await checkButtonAndClickWithID('LineStrokeDashOffset');
+ await checkButtonAndClickWithID('LineChangeStrokeDashOffset');
+ await pressBack();
+ //改变StrokeWidth
+ await checkButtonAndClickWithID('LineStrokeWidth');
+ await checkButtonAndClickWithID('LineChangeStrokeWidth');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('LineWidth');
+ await checkButtonAndClickWithID('LineChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('LineHeight');
+ await checkButtonAndClickWithID('LineChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('LinePadding');
+ await checkButtonAndClickWithID('LineChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('LineMargin');
+ await checkButtonAndClickWithID('LineChangeMargin');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ /**
+ * 点击首页Circle
+ */
+ it(`CircleBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Circle');
+ await checkButtonAndClickWithID('CircleCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleFillSample');
+ await checkButtonAndClickWithID('change fill');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleFillOpacitySample');
+ await checkButtonAndClickWithID('change fillOpacity');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeSample');
+ await checkButtonAndClickWithID('change stroke');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeDashArraySample');
+ await checkButtonAndClickWithID('change strokeDashArray');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeDashOffsetSample');
+ await checkButtonAndClickWithID('change strokeDashOffset');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeWidthSample');
+ await checkButtonAndClickWithID('change strokeWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('CirclePaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Polyline
+ */
+ it(`PolylineBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Polyline');
+ await checkButtonAndClickWithID('PolylineCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineFillSample');
+ await checkButtonAndClickWithID('change fill');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineFillOpacitySample');
+ await checkButtonAndClickWithID('change fillOpacity');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeSample');
+ await checkButtonAndClickWithID('change stroke');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeDashArraySample');
+ await checkButtonAndClickWithID('change strokeDashArray');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeDashOffsetSample');
+ await checkButtonAndClickWithID('change strokeDashOffset');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeWidthSample');
+ await checkButtonAndClickWithID('change strokeWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylinePaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页SideBarContainer
+ */
+ it(`SideBarContainerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('SideBarContainer');
+ await checkButtonAndClickWithID('SideBarContainerCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerShowSideBarSample');
+ await checkButtonAndClickWithID('change showSideBar');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerControlButtonSample');
+ await checkButtonAndClickWithID('change controlButton');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerShowControlButtonSample');
+ await checkButtonAndClickWithID('change showControlButton');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerSideBarWidthSample');
+ await checkButtonAndClickWithID('change sideBarWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerAutoHideSample');
+ await checkButtonAndClickWithID('change autoHide');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerSideBarPositionSample');
+ await checkButtonAndClickWithID('change sideBarPosition');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerDividerSample');
+ await checkButtonAndClickWithID('change divider');
+ await pressBack();
+ await driver.swipe(540, 1000, 540, 500);
+ await checkButtonAndClickWithID('SideBarContainerMinContentWidthSample');
+ await checkButtonAndClickWithID('change minContentWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerMinSideBarWidthSample');
+ await checkButtonAndClickWithID('change minSideBarWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerMaxSideBarWidthSample');
+ await checkButtonAndClickWithID('change maxSideBarWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerDragSideBarSample');
+ await driver.delayMs(1000);
+ await driver.swipe(300, 500, 100, 500);
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerDragContentSample');
+ await driver.delayMs(1000);
+ await driver.drag(300, 500, 500, 500);
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页ImageAnimator
+ */
+ it(`ImageAnimatorBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ImageAnimator');
+ await checkButtonAndClickWithID('ImageAnimatorCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorImagesSample');
+ await checkButtonAndClickWithID('change images');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorStateSample');
+ await checkButtonAndClickWithID('change state');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorDurationSample');
+ await checkButtonAndClickWithID('change duration');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorReverseSample');
+ await checkButtonAndClickWithID('change reverse');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorFixedSizeSample');
+ await checkButtonAndClickWithID('change fixedSize');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorFillModeSample');
+ await checkButtonAndClickWithID('change fillMode');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorIterationsSample');
+ await checkButtonAndClickWithID('change iterations');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页LoadingProgress
+ */
+ it(`LoadingProgressBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('LoadingProgress');
+ await checkButtonAndClickWithID('LoadingProgressCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressEnableLoadingSample');
+ await checkButtonAndClickWithID('change enableLoading');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页TextTimer
+ */
+ it(`TextTimerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextTimer');
+ await checkButtonAndClickWithID('TextTimerCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerControllerSample');
+ await checkButtonAndClickWithID('change controller to start');
+ await checkButtonAndClickWithID('change controller to pause');
+ await checkButtonAndClickWithID('change controller to reset');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerFormatSample');
+ await checkButtonAndClickWithID('change format');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Blank
+ */
+ it(`BlankBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Blank');
+ await checkButtonAndClickWithID('BlankCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankMinSample');
+ await checkButtonAndClickWithID('change min 0 to 60');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页Radio
+ */
+ it(`RadioBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Radio');
+ await checkButtonAndClickWithID('RadioCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ /**
+ * 点击首页ScrollBar
+ */
+ it(`ScrollBarBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ScrollBar');
+ await checkButtonAndClickWithID('ScrollBarCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarDirectionSample');
+ await checkButtonAndClickWithID('change direction');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarStateSample');
+ await checkButtonAndClickWithID('change state to On');
+ await checkButtonAndClickWithID('change state to Auto');
+ await pressBack();
+ await pressBack();
+ })
+
+ })
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Three.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Three.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..122bde9fc07ec76f5f54d67b75eca707db1092a5
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Three.test.ets
@@ -0,0 +1,585 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { Driver, ON } from '@ohos.UiTest';
+
+const driver = Driver.create();
+let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator();
+
+//通过id验证有没有这个组件 有的话点击一下
+async function checkButtonAndClickWithID(text: string, delayTime: number = 1000) {
+ let idName = text;
+ await driver.assertComponentExist(ON.id(idName));
+ let button = await driver.findComponent(ON.id(idName));
+ await button.click();
+ if (delayTime > 0) {
+ await driver.delayMs(delayTime);
+ }
+}
+
+async function pressBack() {
+ await driver.pressBack();
+ await driver.delayMs(1000);
+}
+
+export default function threeTest() {
+ describe('ActsThreeTest', () => {
+ beforeAll(() => {
+
+ })
+ beforeEach(() => {
+
+ })
+ afterEach(() => {
+
+ })
+ afterAll(() => {
+
+ })
+ /**
+ * 拉起应用
+ */
+ it(`Benchmark_StartAbility_001`, 0, async (done: Function) => {
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 begin');
+ try {
+ await abilityDelegatorRegistry.startAbility({
+ bundleName: 'cn.openharmony.benchmarksample',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (err) {
+ done();
+ }
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 end');
+ })
+
+ //点击首页Counter
+ it(`CounterBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('Counter');
+ //创建Counter组件
+ await checkButtonAndClickWithID('CounterCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('CounterWidth');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangeWidth');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('CounterHeight');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangeHeight');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('CounterPadding');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangePadding');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('CounterMargin');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('CounterChangeMargin');
+ await driver.delayMs(1000);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页XComponent
+ it(`XComponentBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('XComponent');
+ //创建XComponent组件
+ await checkButtonAndClickWithID('XComponentCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页PatternLock
+ it(`PatternLockBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('PatternLock');
+ //创建PatternLock组件
+ await checkButtonAndClickWithID('PatternLockCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变SideLength
+ await checkButtonAndClickWithID('PatternLockSideLength');
+ await checkButtonAndClickWithID('PatternLockChangeSideLength');
+ await pressBack();
+ //改变CircleRadius
+ await checkButtonAndClickWithID('PatternLockCircleRadius');
+ await checkButtonAndClickWithID('PatternLockChangeCircleRadius');
+ await pressBack();
+ //改变RegularColor
+ await checkButtonAndClickWithID('PatternLockRegularColor');
+ await checkButtonAndClickWithID('PatternLockChangeRegularColor');
+ await pressBack();
+ //改变SelectedColor
+ await checkButtonAndClickWithID('PatternLockSelectedColor');
+ await checkButtonAndClickWithID('PatternLockChangeSelectedColor');
+ await pressBack();
+ //改变ActiveColor
+ await checkButtonAndClickWithID('PatternLockActiveColor');
+ await checkButtonAndClickWithID('PatternLockChangeActiveColor');
+ await pressBack();
+ //改变PathColor
+ await checkButtonAndClickWithID('PatternLockPathColor');
+ await checkButtonAndClickWithID('PatternLockChangePathColor');
+ await pressBack();
+ //改变PathStrokeWidth
+ await checkButtonAndClickWithID('PatternLockPathStrokeWidth');
+ await checkButtonAndClickWithID('PatternLockChangePathStrokeWidth');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Shape
+ it(`ShapeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Shape');
+ //创建Shape组件
+ await checkButtonAndClickWithID('ShapeCreate');
+ await pressBack();
+ //改变Fill
+ await checkButtonAndClickWithID('ShapeFill');
+ await checkButtonAndClickWithID('ShapeChangeFill');
+ await pressBack();
+ //改变FillOpacity
+ await checkButtonAndClickWithID('ShapeFillOpacity');
+ await checkButtonAndClickWithID('ShapeChangeFillOpacity');
+ await pressBack();
+ //改变stroke
+ await checkButtonAndClickWithID('ShapeStroke');
+ await checkButtonAndClickWithID('ShapeChangeStroke');
+ await pressBack();
+ //改变StrokeDashArray
+ await checkButtonAndClickWithID('ShapeStrokeDashArray');
+ await checkButtonAndClickWithID('ShapeChangeStrokeDashArray');
+ await pressBack();
+ //改变StrokeDashOffset
+ await checkButtonAndClickWithID('ShapeStrokeDashOffset');
+ await checkButtonAndClickWithID('ShapeChangeStrokeDashOffset');
+ await pressBack();
+ //改变StrokeWidth
+ await checkButtonAndClickWithID('ShapeStrokeWidth');
+ await checkButtonAndClickWithID('ShapeChangeStrokeWidth');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('ShapeWidth');
+ await checkButtonAndClickWithID('ShapeChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('ShapeHeight');
+ await checkButtonAndClickWithID('ShapeChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('ShapePadding');
+ await checkButtonAndClickWithID('ShapeChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('ShapeMargin');
+ await checkButtonAndClickWithID('ShapeChangeMargin');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Path
+ it(`PathBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Path');
+ //创建Path组件
+ await checkButtonAndClickWithID('PathCreate');
+ await pressBack();
+ //改变Fill
+ await checkButtonAndClickWithID('PathFill');
+ await checkButtonAndClickWithID('PathChangeFill');
+ await pressBack();
+ // 改变FillOpacity
+ await checkButtonAndClickWithID('PathFillOpacity');
+ await checkButtonAndClickWithID('PathChangeFillOpacity');
+ await pressBack();
+ //改变Stroke
+ await checkButtonAndClickWithID('PathStroke');
+ await checkButtonAndClickWithID('PathChangeStroke');
+ await pressBack();
+ //改变StrokeDashArray
+ await checkButtonAndClickWithID('PathStrokeDashArray');
+ await checkButtonAndClickWithID('PathChangeStrokeDashArray');
+ await pressBack();
+ //改变StrokeDashOffset
+ await checkButtonAndClickWithID('PathStrokeDashOffset');
+ await checkButtonAndClickWithID('PathChangeStrokeDashOffset');
+ await pressBack();
+ //改变StrokeWidth
+ await checkButtonAndClickWithID('PathStrokeWidth');
+ await checkButtonAndClickWithID('PathChangeStrokeWidth');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('PathWidth');
+ await checkButtonAndClickWithID('PathChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('PathHeight');
+ await checkButtonAndClickWithID('PathChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('PathPadding');
+ await checkButtonAndClickWithID('PathChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('PathMargin');
+ await checkButtonAndClickWithID('PathChangeMargin');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Line
+ it(`LineBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Line');
+ //创建Line组件
+ await checkButtonAndClickWithID('LineCreate');
+ await pressBack();
+ //改变Fill
+ await checkButtonAndClickWithID('LineFill');
+ await checkButtonAndClickWithID('LineChangeFill');
+ await pressBack();
+ // 改变FillOpacity
+ await checkButtonAndClickWithID('LineFillOpacity');
+ await checkButtonAndClickWithID('LineChangeFillOpacity');
+ await pressBack();
+ //改变Stroke
+ await checkButtonAndClickWithID('LineStroke');
+ await checkButtonAndClickWithID('LineChangeStroke');
+ await pressBack();
+ //改变StrokeDashArray
+ await checkButtonAndClickWithID('LineStrokeDashArray');
+ await checkButtonAndClickWithID('LineChangeStrokeDashArray');
+ await pressBack();
+ //改变StrokeDashOffset
+ await checkButtonAndClickWithID('LineStrokeDashOffset');
+ await checkButtonAndClickWithID('LineChangeStrokeDashOffset');
+ await pressBack();
+ //改变StrokeWidth
+ await checkButtonAndClickWithID('LineStrokeWidth');
+ await checkButtonAndClickWithID('LineChangeStrokeWidth');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('LineWidth');
+ await checkButtonAndClickWithID('LineChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('LineHeight');
+ await checkButtonAndClickWithID('LineChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('LinePadding');
+ await checkButtonAndClickWithID('LineChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('LineMargin');
+ await checkButtonAndClickWithID('LineChangeMargin');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Circle
+ it(`CircleBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Circle');
+ await checkButtonAndClickWithID('CircleCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleFillSample');
+ await checkButtonAndClickWithID('change fill');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleFillOpacitySample');
+ await checkButtonAndClickWithID('change fillOpacity');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeSample');
+ await checkButtonAndClickWithID('change stroke');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeDashArraySample');
+ await checkButtonAndClickWithID('change strokeDashArray');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeDashOffsetSample');
+ await checkButtonAndClickWithID('change strokeDashOffset');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleStrokeWidthSample');
+ await checkButtonAndClickWithID('change strokeWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('CirclePaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('CircleMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Polyline
+ it(`PolylineBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Polyline');
+ await checkButtonAndClickWithID('PolylineCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineFillSample');
+ await checkButtonAndClickWithID('change fill');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineFillOpacitySample');
+ await checkButtonAndClickWithID('change fillOpacity');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeSample');
+ await checkButtonAndClickWithID('change stroke');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeDashArraySample');
+ await checkButtonAndClickWithID('change strokeDashArray');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeDashOffsetSample');
+ await checkButtonAndClickWithID('change strokeDashOffset');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineStrokeWidthSample');
+ await checkButtonAndClickWithID('change strokeWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylinePaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('PolylineMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页SideBarContainer
+ it(`SideBarContainerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('SideBarContainer');
+ await checkButtonAndClickWithID('SideBarContainerCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerShowSideBarSample');
+ await checkButtonAndClickWithID('change showSideBar');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerShowControlButtonSample');
+ await checkButtonAndClickWithID('change showControlButton');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerSideBarWidthSample');
+ await checkButtonAndClickWithID('change sideBarWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerAutoHideSample');
+ await checkButtonAndClickWithID('change autoHide');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerSideBarPositionSample');
+ await checkButtonAndClickWithID('change sideBarPosition');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerDividerSample');
+ await checkButtonAndClickWithID('change divider');
+ await pressBack();
+ await driver.swipe(540, 1000, 540, 500);
+ await checkButtonAndClickWithID('SideBarContainerMinContentWidthSample');
+ await checkButtonAndClickWithID('change minContentWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerMinSideBarWidthSample');
+ await checkButtonAndClickWithID('change minSideBarWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerMaxSideBarWidthSample');
+ await checkButtonAndClickWithID('change maxSideBarWidth');
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerDragSideBarSample');
+ await driver.delayMs(1000);
+ await driver.swipe(300, 500, 100, 500);
+ await pressBack();
+ await checkButtonAndClickWithID('SideBarContainerDragContentSample');
+ await driver.delayMs(1000);
+ await driver.drag(300, 500, 500, 500);
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页ImageAnimator
+ it(`ImageAnimatorBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ImageAnimator');
+ await checkButtonAndClickWithID('ImageAnimatorCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorImagesSample');
+ await checkButtonAndClickWithID('change images');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorStateSample');
+ await checkButtonAndClickWithID('change state');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorDurationSample');
+ await checkButtonAndClickWithID('change duration');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorReverseSample');
+ await checkButtonAndClickWithID('change reverse');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorFixedSizeSample');
+ await checkButtonAndClickWithID('change fixedSize');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorFillModeSample');
+ await checkButtonAndClickWithID('change fillMode');
+ await pressBack();
+ await checkButtonAndClickWithID('ImageAnimatorIterationsSample');
+ await checkButtonAndClickWithID('change iterations');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页LoadingProgress
+ it(`LoadingProgressBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('LoadingProgress');
+ await checkButtonAndClickWithID('LoadingProgressCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('LoadingProgressEnableLoadingSample');
+ await checkButtonAndClickWithID('change enableLoading');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页TextTimer
+ it(`TextTimerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextTimer');
+ await checkButtonAndClickWithID('TextTimerCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerControllerSample');
+ await checkButtonAndClickWithID('change controller to start');
+ await checkButtonAndClickWithID('change controller to pause');
+ await checkButtonAndClickWithID('change controller to reset');
+ await pressBack();
+ await checkButtonAndClickWithID('TextTimerFormatSample');
+ await checkButtonAndClickWithID('change format');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Blank
+ it(`BlankBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Blank');
+ await checkButtonAndClickWithID('BlankCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('BlankMinSample');
+ await checkButtonAndClickWithID('change min 0 to 60');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Radio
+ it(`RadioBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Radio');
+ await checkButtonAndClickWithID('RadioCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('RadioMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ })
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Two.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Two.test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..d55cc4409cf99e27181b61ec90f0c5fe9eb26695
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Two.test.ets
@@ -0,0 +1,1234 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { Driver, ON } from '@ohos.UiTest';
+
+const driver = Driver.create();
+let abilityDelegatorRegistry = AbilityDelegatorRegistry.getAbilityDelegator();
+
+//通过id验证有没有这个组件 有的话点击一下
+async function checkButtonAndClickWithID(text: string, delayTime: number = 3000) {
+ let idName = text;
+ await driver.assertComponentExist(ON.id(idName));
+ let button = await driver.findComponent(ON.id(idName));
+ await button.click();
+ if (delayTime > 0) {
+ await driver.delayMs(delayTime);
+ }
+}
+
+async function pressBack() {
+ await driver.pressBack();
+ await driver.delayMs(3000);
+}
+
+export default function twoTest() {
+ describe('ActsTwoTest', () => {
+ beforeAll(() => {
+
+ })
+ beforeEach(() => {
+
+ })
+ afterEach(() => {
+
+ })
+ afterAll(() => {
+
+ })
+ /**
+ * 拉起应用
+ */
+ it(`Benchmark_StartAbility_001`, 0, async (done: Function) => {
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 begin');
+ try {
+ await abilityDelegatorRegistry.startAbility({
+ bundleName: 'cn.openharmony.benchmarksample',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (err) {
+ done();
+ }
+ hilog.info(0xF811, 'testTag', 'StartAbility_001 end');
+ })
+
+ //点击首页GridRow
+ it(`GridRowBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('GridRow');
+
+ await checkButtonAndClickWithID('GridRowCreate');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowWidth');
+ await checkButtonAndClickWithID('GridRowWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowHeight');
+ await checkButtonAndClickWithID('GridRowHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowPadding');
+ await checkButtonAndClickWithID('GridRowPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowMargin');
+ await checkButtonAndClickWithID('GridRowMargin');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowColumns');
+ await checkButtonAndClickWithID('GridRowColumns');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowGutter');
+ await checkButtonAndClickWithID('GridRowGutter');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowDirection');
+ await checkButtonAndClickWithID('GridRowDirection');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridRowBreakpoints');
+ await checkButtonAndClickWithID('GridRowBreakpoints');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页GridCol
+ it(`GridColBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('GridCol');
+
+ await checkButtonAndClickWithID('GridColCreate');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOptionSpan');
+ await checkButtonAndClickWithID('GridColOptionSpan');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOptionOffset');
+ await checkButtonAndClickWithID('GridColOptionOffset');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOptionOrder');
+ await checkButtonAndClickWithID('GridColOptionOrder');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColSpan');
+ await checkButtonAndClickWithID('GridColSpan');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOffset');
+ await checkButtonAndClickWithID('GridColOffset');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColOrder');
+ await checkButtonAndClickWithID('GridColOrder');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColWidth');
+ await checkButtonAndClickWithID('GridColWidth');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColHeight');
+ await checkButtonAndClickWithID('GridColHeight');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColPadding');
+ await checkButtonAndClickWithID('GridColPadding');
+ await pressBack();
+
+ await checkButtonAndClickWithID('GridColMargin');
+ await checkButtonAndClickWithID('GridColMargin');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Scroll
+ it(`ScrollBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Scroll');
+ //创建Scroll组件
+ await checkButtonAndClickWithID('ScrollCreate');
+ await pressBack();
+
+ //改变width
+ await checkButtonAndClickWithID('ScrollWidth');
+ await checkButtonAndClickWithID('ScrollWidth');
+ await pressBack();
+
+ //改变height
+ await checkButtonAndClickWithID('ScrollHeight');
+ await checkButtonAndClickWithID('ScrollHeight');
+ await pressBack();
+
+ //改变Padding
+ await checkButtonAndClickWithID('ScrollPadding');
+ await checkButtonAndClickWithID('ScrollPadding');
+ await pressBack();
+
+ //改变Margin
+ await checkButtonAndClickWithID('ScrollMargin');
+ await checkButtonAndClickWithID('ScrollMargin');
+ await pressBack();
+
+
+ //改变EnableScrollInteraction
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionTrueToFalse');
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionTrueToFalse');
+ await pressBack();
+
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionFalseToTrue');
+ await checkButtonAndClickWithID('ScrollEnableScrollInteractionFalseToTrue');
+ await pressBack();
+
+ //拖动场景下Scroll组件更新布局耗时
+ await checkButtonAndClickWithID('ScrollDrag');
+ await driver.fling({
+ x: 100, y: 1100
+ }, {
+ x: 100, y: 500
+ }, 100, 100)
+ await pressBack();
+
+ //抛滑场景下Scroll组件更新布局耗时
+ await checkButtonAndClickWithID('ScrollSlippage');
+ await driver.fling({
+ x: 100, y: 1100
+ }, {
+ x: 100, y: 500
+ }, 100, 600)
+ await pressBack();
+ //Scroll组件调用scrollTo触发页面跳转布局
+ await checkButtonAndClickWithID('ScrollScrollTo');
+ await checkButtonAndClickWithID('ScrollScrollTo');
+ await pressBack();
+ //Scroll组件调用scrollEdge触发页面跳转布局
+ await checkButtonAndClickWithID('ScrollScrollEdge');
+ await checkButtonAndClickWithID('ScrollScrollEdge');
+ await pressBack();
+ //Scroll组件edgeEffect属性更新布局耗时
+ await checkButtonAndClickWithID('ScrollEdgeEffectSpring');
+ await checkButtonAndClickWithID('ScrollEdgeEffectSpring');
+ await driver.swipe(100, 1100, 100, 500, 200)
+ await pressBack();
+
+
+ await checkButtonAndClickWithID('ScrollEdgeEffectFade');
+ await checkButtonAndClickWithID('ScrollEdgeEffectFade');
+ await driver.swipe(100, 1100, 100, 500, 200)
+ await pressBack();
+
+ await checkButtonAndClickWithID('ScrollEdgeEffectNone');
+ await checkButtonAndClickWithID('ScrollEdgeEffectNone');
+ await driver.swipe(100, 1100, 100, 500, 200)
+ await pressBack();
+
+ //Scroll组件调用scrollBy触发页面跳转布局
+ await checkButtonAndClickWithID('ScrollScrollBy');
+ await checkButtonAndClickWithID('ScrollScrollBy');
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Tab
+ it(`TabsBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('Tabs');
+ //创建Tab组件
+ await checkButtonAndClickWithID('TabsCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('TabsWidth');
+ await checkButtonAndClickWithID('TabChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('TabsHeight');
+ await checkButtonAndClickWithID('TabsChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('TabsPadding');
+ await checkButtonAndClickWithID('TabsChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('TabsMargin');
+ await checkButtonAndClickWithID('TabsChangeMargin');
+ await pressBack();
+ //改变Vertical
+ await checkButtonAndClickWithID('TabsVertical');
+ await checkButtonAndClickWithID('TabsChangeVertical');
+ await pressBack();
+ //改变TabsBarMode
+ await checkButtonAndClickWithID('TabsBarMode');
+ await checkButtonAndClickWithID('TabsChangeTabsBarMode');
+ await pressBack();
+ //改变Divider
+ await checkButtonAndClickWithID('TabsDivider');
+ await checkButtonAndClickWithID('TabsChangeDivider');
+ await pressBack();
+ //改变BarPosition
+ await checkButtonAndClickWithID('TabsBarPosition');
+ await checkButtonAndClickWithID('TabsChangeBarPosition');
+ await pressBack();
+ await driver.delayMs(1000);
+ //改变tabIndex
+ await checkButtonAndClickWithID('TabsIndex');
+ await driver.delayMs(2000);
+ await checkButtonAndClickWithID('TabsChangeIndex');
+ await pressBack();
+ //改变BarWidth
+ await checkButtonAndClickWithID('TabsBarWidth');
+ await checkButtonAndClickWithID('TabChangeBarWidth');
+ await pressBack();
+ //改变BarHeight
+ await checkButtonAndClickWithID('TabsBarHeight');
+ await checkButtonAndClickWithID('TabChangeBarHeight');
+ await pressBack();
+ //抛滑Fling
+ await checkButtonAndClickWithID('TabsFling');
+ await driver.fling({
+ x: 100, y: 500
+ }, {
+ x: 700, y: 500
+ }, 100, 100)
+ await pressBack();
+ //抛滑Drag
+ await checkButtonAndClickWithID('TabsDrag');
+ await driver.fling({
+ x: 700, y: 500
+ }, {
+ x: 100, y: 500
+ }, 100, 100)
+ await pressBack();
+ //点击页签ClickTab
+ await checkButtonAndClickWithID('TabsClickTab');
+ await checkButtonAndClickWithID('TabsChangeIndex');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Navigation
+ it(`NavigationBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Navigation');
+ await checkButtonAndClickWithID('NavigationCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationWidthSample');
+ await checkButtonAndClickWithID('change width 500 to 600');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationTitleModeSample');
+ await checkButtonAndClickWithID('change titleMode to Free');
+ await checkButtonAndClickWithID('change titleMode to Full');
+ await checkButtonAndClickWithID('change titleMode to Mini');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideToolBarSample');
+ await checkButtonAndClickWithID('change hideToolBar true to false');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideTitleBarSample');
+ await checkButtonAndClickWithID('change hideTitleBar true to false');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideBackButtonSample');
+ await checkButtonAndClickWithID('change hideBackButton true to false');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationNavBarWidthSample');
+ await checkButtonAndClickWithID('change navBarWidth 240 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationModeSample');
+ await checkButtonAndClickWithID('change navigationMode Stack to Split');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationNavBarPositionSample');
+ await checkButtonAndClickWithID('change navBarPosition Start to End');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationHideNavBarSample');
+ await checkButtonAndClickWithID('change hideNavBar Stack to Split');
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationStackJumpSample');
+ await checkButtonAndClickWithID('Stack jump to next page');
+ await pressBack();
+ await pressBack();
+ await checkButtonAndClickWithID('NavigationSplitJumpSample');
+ await checkButtonAndClickWithID('Split jump to next page');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Flex
+ it(`FlexBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Flex');
+ await checkButtonAndClickWithID('FlexCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexWidthSample');
+ await checkButtonAndClickWithID('change width 80% to 100%');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexHeightSample');
+ await checkButtonAndClickWithID('change height 300 to 400');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueDirectionSample');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.Row');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.RowReverse');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.Column');
+ await checkButtonAndClickWithID('change value direction to FlexDirection.ColumnReverse');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueWrapSample');
+ await checkButtonAndClickWithID('change value wrap to FlexWrap.NoWrap');
+ await checkButtonAndClickWithID('change value wrap to FlexWrap.Wrap');
+ await checkButtonAndClickWithID('change value wrap to FlexWrap.WrapReverse');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueJustifyContentSample');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.Start');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.Center');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.End');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceBetween');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceAround');
+ await checkButtonAndClickWithID('change value justifyContent to FlexAlign.SpaceEvenly');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueAlignItemsSample');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Auto');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Start');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Center');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.End');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Stretch');
+ await checkButtonAndClickWithID('change value alignItems to ItemAlign.Baseline');
+ await pressBack();
+ await checkButtonAndClickWithID('FlexValueAlignContentSample');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.Start');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.Center');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.End');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceBetween');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceAround');
+ await checkButtonAndClickWithID('change value alignContent to FlexAlign.SpaceEvenly');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Select
+ it(`SelectBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('Select');
+ //创建Select组件
+ await checkButtonAndClickWithID('SelectCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('SelectWidth');
+ await checkButtonAndClickWithID('SelectChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('SelectHeight');
+ await checkButtonAndClickWithID('SelectChangeHeight');
+ await pressBack();
+ //改变Size
+ await checkButtonAndClickWithID('SelectSize');
+ await checkButtonAndClickWithID('SelectChangeSize');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('SelectPadding');
+ await checkButtonAndClickWithID('SelectChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('SelectMargin');
+ await checkButtonAndClickWithID('SelectChangeMargin');
+ await pressBack();
+ //改变Space
+ await checkButtonAndClickWithID('SelectSpace');
+ await checkButtonAndClickWithID('SelectChangeSpace');
+ await pressBack();
+ //改变ArrowPosition
+ await checkButtonAndClickWithID('SelectArrowPosition');
+ await checkButtonAndClickWithID('SelectChangeArrowPosition');
+ await pressBack();
+ //首次展开
+ await checkButtonAndClickWithID('SelectFirstExpand');
+ await checkButtonAndClickWithID('SelectFirstExpand');
+ await pressBack();
+ await pressBack();
+ //再次展开
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await checkButtonAndClickWithID('SelectSecondExpand');
+ await pressBack();
+ await pressBack();
+ //首次展开后收起
+ await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ await checkButtonAndClickWithID('SelectFirstExpandCollapse');
+ await pressBack();
+ //多次展开后收起
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await checkButtonAndClickWithID('SelectSecondExpandCollapse');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Span
+ it(`SpanBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Span');
+ //Text内创建Span组件
+ await checkButtonAndClickWithID('SpanCreateInText');
+ await driver.delayMs(1000);
+ await pressBack();
+ //RichEditor内创建Span组件
+ await checkButtonAndClickWithID('SpanCreateInRichEditor');
+ await pressBack();
+ //Text内改变value
+ await checkButtonAndClickWithID('SpanValueInText');
+ await checkButtonAndClickWithID('SpanChangeValueInText');
+ await pressBack();
+ //RichEditor内改变value
+ await checkButtonAndClickWithID('SpanValueInRichEditor');
+ await checkButtonAndClickWithID('SpanChangeValueInRichEditor');
+ await pressBack();
+ //Text内改变LetterSpacing
+ await checkButtonAndClickWithID('SpanLetterSpacingInText');
+ await checkButtonAndClickWithID('SpanChangeLetterSpacingInText');
+ await pressBack();
+ //RichEditor内改变LetterSpacing
+ await checkButtonAndClickWithID('SpanLetterSpacingInRichEditor');
+ await checkButtonAndClickWithID('SpanChangeLetterSpacingInRichEditor');
+ await pressBack();
+ // Text内改变LetterSpacing
+ await checkButtonAndClickWithID('SpanTextCaseInText');
+ await checkButtonAndClickWithID('TextCase.Normal.Text');
+ await checkButtonAndClickWithID('TextCase.LowerCase.Text');
+ await checkButtonAndClickWithID('TextCase.UpperCase.Text');
+ await pressBack();
+ //RichEditor内改变LetterSpacing
+ await checkButtonAndClickWithID('SpanTextCaseInRichEditor');
+ await checkButtonAndClickWithID('TextCase.Normal.RichEditor');
+ await checkButtonAndClickWithID('TextCase.LowerCase.RichEditor');
+ await checkButtonAndClickWithID('TextCase.UpperCase.RichEditor');
+ await pressBack();
+ //Text内改变font
+ await checkButtonAndClickWithID('SpanFontInText');
+ await checkButtonAndClickWithID('SpanChangeFontInText');
+ await pressBack();
+ //RichEditor内改变Font
+ await checkButtonAndClickWithID('SpanFontInRichEditor');
+ await checkButtonAndClickWithID('SpanChangeFontInRichEditor');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Slider
+ it(`SliderBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Slider');
+ //创建Slider组件
+ await checkButtonAndClickWithID('SliderCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('SliderWidth');
+ await checkButtonAndClickWithID('SliderChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('SliderHeight');
+ await checkButtonAndClickWithID('SliderChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('SliderPadding');
+ await checkButtonAndClickWithID('SliderChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('SliderMargin');
+ await checkButtonAndClickWithID('SliderChangeMargin');
+ await pressBack();
+ //改变Step
+ await checkButtonAndClickWithID('SliderStep');
+ await checkButtonAndClickWithID('SliderChangeStep');
+ await pressBack();
+ //改变Direction
+ await checkButtonAndClickWithID('SliderDirection');
+ await checkButtonAndClickWithID('SliderChangeDirection');
+ await pressBack();
+ //改变reverse
+ await checkButtonAndClickWithID('SliderReverse');
+ await checkButtonAndClickWithID('SliderChangeReverse');
+ await pressBack();
+ //改变Style
+ await checkButtonAndClickWithID('SliderStyle');
+ await checkButtonAndClickWithID('SliderChangeStyle');
+ await pressBack();
+ //改变TrackThickness
+ await checkButtonAndClickWithID('SliderTrackThickness');
+ await checkButtonAndClickWithID('SliderChangeTrackThickness');
+ await pressBack();
+ //改变BlockSize
+ await checkButtonAndClickWithID('SliderBlockSize');
+ await checkButtonAndClickWithID('SliderChangeBlockSize');
+ await pressBack();
+ //手指滑动
+ await checkButtonAndClickWithID('SliderFingerSliding');
+ await driver.swipe(13, 296, 383, 296, 200);
+ await pressBack();
+ //手指点击滑轨
+ await checkButtonAndClickWithID('SliderClick');
+ await driver.click(383, 296);
+ await pressBack();
+ // 鼠标滚轮调节滑块位置
+ await checkButtonAndClickWithID('SliderMouseScroll');
+ await driver.mouseScroll({
+ x: 163, y: 339
+ }, true, 20);
+ await pressBack();
+ // 外接键盘调节滑块位置
+ await checkButtonAndClickWithID('SliderKeyboardScroll');
+ // await driver.triggerKey(KeyCode.KEYCODE_DPAD_RIGHT);
+ await driver.swipe(13, 296, 383, 296, 200);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Divider
+ it(`DividerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('Divider');
+ //创建Divider组件
+ await checkButtonAndClickWithID('DividerCreate');
+ await pressBack();
+ //更改StrokeWidth
+ await checkButtonAndClickWithID('DividerStrokeWidth');
+ await checkButtonAndClickWithID('DividerChangeStrokeWidth');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('DividerWidth');
+ await checkButtonAndClickWithID('DividerChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('DividerHeight');
+ await checkButtonAndClickWithID('DividerChangeHeight');
+ await pressBack();
+ //改变Size
+ await checkButtonAndClickWithID('DividerSize');
+ await checkButtonAndClickWithID('DividerChangeSize');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('DividerPadding');
+ await checkButtonAndClickWithID('DividerChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('DividerMargin');
+ await checkButtonAndClickWithID('DividerChangeMargin');
+ await pressBack();
+ //改变Color
+ await checkButtonAndClickWithID('DividerColor');
+ await checkButtonAndClickWithID('DividerChangeColor');
+ await pressBack();
+ //改变Vertical
+ await checkButtonAndClickWithID('DividerVertical');
+ await checkButtonAndClickWithID('DividerChangeVerticalTrue');
+ await checkButtonAndClickWithID('DividerChangeVerticalFalse');
+ await pressBack();
+ //改变LineCap
+ await checkButtonAndClickWithID('DividerLineCap');
+ await checkButtonAndClickWithID('DividerChangeLineCapButt');
+ await checkButtonAndClickWithID('DividerChangeLineCapRound');
+ await checkButtonAndClickWithID('DividerChangeLineCapSquare');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Refresh
+ it(`RefreshBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Refresh');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshCreateSample');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshWidthSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshHeightSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshSizeSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change size');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshPaddingSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshMarginSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await driver.delayMs(1000);
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshPullSample');
+ await driver.delayMs(1000);
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshOffsetSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change offset 20 to 30');
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshFrictionSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change friction 60 to 80');
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('RefreshOnStateChangeSample');
+ await driver.swipe(360, 200, 360, 500, 600)
+ await pressBack();
+ await driver.delayMs(1000);
+ await pressBack();
+ })
+
+ //点击首页Progress
+ it(`ProgressBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Progress');
+ await checkButtonAndClickWithID('ProgressCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressProgressTypeSample');
+ await checkButtonAndClickWithID('change progressType to Linear');
+ await checkButtonAndClickWithID('change progressType to Ring');
+ await checkButtonAndClickWithID('change progressType to Eclipse');
+ await checkButtonAndClickWithID('change progressType to ScaleRing');
+ await checkButtonAndClickWithID('change progressType to Capsule');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressProgressStyleSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressLinearSample');
+ await checkButtonAndClickWithID('change strokeWidth(4-20) add strokeRadius(0-10)');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressRingSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ await pressBack();
+ await checkButtonAndClickWithID('ProgressScaleRingSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 20');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Marquee
+ it(`MarqueeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('Marquee');
+ //创建Marquee组件
+ await checkButtonAndClickWithID('MarqueeCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('MarqueeWidth');
+ await checkButtonAndClickWithID('MarqueeChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('MarqueeHeight');
+ await checkButtonAndClickWithID('MarqueeChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('MarqueePadding');
+ await checkButtonAndClickWithID('MarqueeChangePadding');
+ await pressBack();
+ // 改变Margin
+ await checkButtonAndClickWithID('MarqueeMargin');
+ await checkButtonAndClickWithID('MarqueeChangeMargin');
+ await pressBack();
+ // 改变Src
+ await checkButtonAndClickWithID('MarqueeSrc');
+ await checkButtonAndClickWithID('MarqueeChangeSrc');
+ await pressBack();
+ // 改变Step
+ await checkButtonAndClickWithID('MarqueeStep');
+ await checkButtonAndClickWithID('MarqueeChangeStep');
+ await pressBack();
+ // 改变FromStart
+ await checkButtonAndClickWithID('MarqueeFromStart');
+ await checkButtonAndClickWithID('MarqueeChangeFromStart');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页DataPanel
+ it(`DataPanelBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('DataPanel');
+ //创建DataPanel组件
+ await checkButtonAndClickWithID('DataPanelCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('DataPanelWidth');
+ await checkButtonAndClickWithID('DataPanelChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('DataPanelHeight');
+ await checkButtonAndClickWithID('DataPanelChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('DataPanelPadding');
+ await checkButtonAndClickWithID('DataPanelChangePadding');
+ await pressBack();
+ // 改变Margin
+ await checkButtonAndClickWithID('DataPanelMargin');
+ await checkButtonAndClickWithID('DataPanelChangeMargin');
+ await pressBack();
+ // 改变CloseEffect
+ await checkButtonAndClickWithID('DataPanelCloseEffect');
+ await checkButtonAndClickWithID('DataPanelChangeCloseEffect');
+ await pressBack();
+ // 改变StrokeWidth
+ await checkButtonAndClickWithID('DataPanelStrokeWidth');
+ await checkButtonAndClickWithID('DataPanelChangeStrokeWidth');
+ await pressBack();
+ // 改变Radius
+ await checkButtonAndClickWithID('DataPanelRadius');
+ await checkButtonAndClickWithID('DataPanelChangeRadius');
+ await pressBack();
+ // 改变OffsetX
+ await checkButtonAndClickWithID('DataPanelOffsetX');
+ await checkButtonAndClickWithID('DataPanelChangeOffsetX');
+ await pressBack();
+ // 改变OffsetY
+ await checkButtonAndClickWithID('DataPanelOffsetY');
+ await checkButtonAndClickWithID('DataPanelChangeOffsetY');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Rating
+ it(`RatingBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Rating');
+ //创建Rating组件
+ await checkButtonAndClickWithID('RatingCreate');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('RatingWidth');
+ await checkButtonAndClickWithID('RatingChangeWidth');
+ await pressBack();
+ //改变height
+ await checkButtonAndClickWithID('RatingHeight');
+ await checkButtonAndClickWithID('RatingChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('RatingPadding');
+ await checkButtonAndClickWithID('RatingChangePadding');
+ await pressBack();
+ // 改变Margin
+ await checkButtonAndClickWithID('RatingMargin');
+ await checkButtonAndClickWithID('RatingChangeMargin');
+ await pressBack();
+ // 改变Stars
+ await checkButtonAndClickWithID('RatingStars');
+ await checkButtonAndClickWithID('RatingChangeStars');
+ await pressBack();
+ // 改变StarStyle
+ await checkButtonAndClickWithID('RatingStarStyle');
+ await checkButtonAndClickWithID('RatingChangeStarStyle');
+ await pressBack();
+ // 改变OptionsRating
+ await checkButtonAndClickWithID('RatingOptionsRating');
+ await checkButtonAndClickWithID('RatingChangeOptionsRating');
+ await pressBack();
+ // Click
+ await checkButtonAndClickWithID('RatingClick');
+ await checkButtonAndClickWithID('RatingClickIndex6');
+ await pressBack();
+ // swip
+ await checkButtonAndClickWithID('RatingSwip');
+ await driver.swipe(50, 600, 500, 600);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页TextClock
+ it(`TextClockBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('TextClock');
+ await checkButtonAndClickWithID('TextClockCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('TextClockFormatSample');
+ await checkButtonAndClickWithID('change format');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Hyperlink
+ it(`HyperlinkBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Hyperlink');
+ await checkButtonAndClickWithID('HyperlinkCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('HyperlinkMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页QRCode
+ it(`QRCodeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('QRCode');
+ await checkButtonAndClickWithID('QRCodeCreateSample');
+ await driver.delayMs(1000);
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodeWidthSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodeHeightSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodePaddingSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('QRCodeMarginSample');
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Gauge
+ it(`GaugeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('Gauge');
+ await checkButtonAndClickWithID('GaugeCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugePaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('GaugeStrokeWidthSample');
+ await checkButtonAndClickWithID('change strokeWidth 4 to 10');
+ await pressBack();
+ // await checkButtonAndClickWithID('GaugeTrackShadowSample');
+ // await checkButtonAndClickWithID('change trackShadow');
+ // await pressBack();
+ await checkButtonAndClickWithID('GaugeAngleSample');
+ await checkButtonAndClickWithID('change angle');
+ await pressBack();
+ await pressBack();
+ })
+
+ //点击首页Badge
+ it(`BadgeBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('Badge');
+ //创建Badge组件
+ await checkButtonAndClickWithID('BadgeCreate');
+ await pressBack();
+ //改变Size
+ await checkButtonAndClickWithID('BadgeSize');
+ await checkButtonAndClickWithID('BadgeChangeSize');
+ await pressBack();
+ //改变Color
+ await checkButtonAndClickWithID('BadgeColor');
+ await checkButtonAndClickWithID('BadgeChangeColor');
+ await pressBack();
+ //改变FontSize
+ await checkButtonAndClickWithID('BadgeFontSize');
+ await checkButtonAndClickWithID('BadgeChangeFontSize');
+ await pressBack();
+ //改变FontWeight
+ await checkButtonAndClickWithID('BadgeFontWeight');
+ await checkButtonAndClickWithID('BadgeChangeFontWeight');
+ await pressBack();
+ //改变BorderWidth
+ await checkButtonAndClickWithID('BadgeBorderWidth');
+ await checkButtonAndClickWithID('BadgeChangeBorderWidth');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页AlphabetIndexer
+ it(`AlphabetIndexerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('AlphabetIndexer');
+ //创建AlphabetIndexerCreate组件
+ await checkButtonAndClickWithID('AlphabetIndexerCreate');
+ await driver.delayMs(1000);
+ await pressBack();
+ //改变SelectedColor
+ await checkButtonAndClickWithID('AlphabetIndexerSelectedColor');
+ await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedColor');
+ await pressBack();
+ //改变PopupColor
+ await checkButtonAndClickWithID('AlphabetIndexerPopupColor');
+ await checkButtonAndClickWithID('AlphabetIndexerChangePopupColor');
+ await pressBack();
+ //改变SelectedBackgroundColor
+ await checkButtonAndClickWithID('AlphabetIndexerSelectedBackgroundColor');
+ await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedBackgroundColor');
+ await pressBack();
+ // 改变PopupBackground
+ await checkButtonAndClickWithID('AlphabetIndexerPopupBackground');
+ await checkButtonAndClickWithID('AlphabetIndexerChangePopupBackground');
+ await pressBack();
+ //改变SelectedFont
+ await checkButtonAndClickWithID('AlphabetIndexerSelectedFont');
+ await checkButtonAndClickWithID('AlphabetIndexerChangeSelectedFont');
+ await pressBack();
+ //改变popupFont
+ await checkButtonAndClickWithID('AlphabetIndexerPopupFont');
+ await checkButtonAndClickWithID('AlphabetIndexerChangePopupFont');
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页Menu
+ it(`MenuBenchMarkTest`, 0, async () => {
+ await driver.delayMs(3000);
+ await checkButtonAndClickWithID('Menu');
+ //创建Menu组件
+ await checkButtonAndClickWithID('MenuCreate');
+ await pressBack();
+ //改变Font
+ await checkButtonAndClickWithID('MenuFont');
+ await checkButtonAndClickWithID('MenuChangeFont');
+ await pressBack();
+ //改变FontColor
+ await checkButtonAndClickWithID('MenuFontColor');
+ await checkButtonAndClickWithID('MenuChangeFontColor');
+ await pressBack();
+ //改变Width
+ await checkButtonAndClickWithID('MenuWidth');
+ await checkButtonAndClickWithID('MenuChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('MenuHeight');
+ await checkButtonAndClickWithID('MenuChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('MenuPadding');
+ await checkButtonAndClickWithID('MenuChangePadding');
+ await pressBack();
+ // 变Margin
+ await checkButtonAndClickWithID('MenuMargin');
+ await checkButtonAndClickWithID('MenuChangeMargin');
+ await pressBack();
+ // Menu展开菜单Expend
+ await checkButtonAndClickWithID('MenuFirstExpend');
+ await checkButtonAndClickWithID('MenuFirstChangeExpend');
+ await checkButtonAndClickWithID('MenuFirstChangeExpendSencond');
+ await checkButtonAndClickWithID('MenuFirstChangeExpendThird');
+ await pressBack();
+ await pressBack();
+ // Menu收起后再次展开菜单Expend
+ await checkButtonAndClickWithID('MenuSecondExpend');
+ await checkButtonAndClickWithID('MenuSecondChangeExpend');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendSencond');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendThird');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuSecondChangeExpend');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendSencond');
+ await checkButtonAndClickWithID('MenuSecondChangeExpendThird');
+ await pressBack();
+ await pressBack();
+ // Menu收起后多次关闭
+ await checkButtonAndClickWithID('MenuMoreClose');
+ await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ await checkButtonAndClickWithID('MenuMoreCloseSencond');
+ await checkButtonAndClickWithID('MenuMoreCloseThird');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuMoreCloseFirst');
+ await pressBack();
+ await pressBack();
+ // Group收起后再次展开
+ await checkButtonAndClickWithID('MenuGroupCloseExpand');
+ await checkButtonAndClickWithID('MenuChangeGroupCloseExpand');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuChangeGroupCloseExpand');
+ await pressBack();
+ await pressBack();
+ // Group多次关闭
+ await checkButtonAndClickWithID('MenuGroupMoreClose');
+ await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ await pressBack();
+ await checkButtonAndClickWithID('MenuChangeGroupMoreClose');
+ await pressBack();
+ await pressBack();
+
+ await pressBack(); //返回首页
+ })
+
+ //点击首页TextPicker
+ it(`TextPickerBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('TextPicker');
+ //创建TextPicker组件
+ await checkButtonAndClickWithID('TextPickerCreate');
+ await pressBack();
+ //改变TextStyle
+ await checkButtonAndClickWithID('TextPickerTextStyle');
+ await checkButtonAndClickWithID('TextPickerChangeTextStyle');
+ await pressBack();
+ //改变SelectedTextStyle
+ await checkButtonAndClickWithID('TextPickerSelectedTextStyle');
+ await checkButtonAndClickWithID('TextPickerChangeSelectedTextStyle');
+ await pressBack();
+ //改变DisappearTextStyle
+ await checkButtonAndClickWithID('TextPickerDisappearTextStyle');
+ await checkButtonAndClickWithID('TextPickerChangeDisappearTextStyle');
+ await pressBack();
+ //改变width
+ await checkButtonAndClickWithID('TextPickerWidth');
+ await checkButtonAndClickWithID('TextPickerChangeWidth');
+ await pressBack();
+ //改变Height
+ await checkButtonAndClickWithID('TextPickerHeight');
+ await checkButtonAndClickWithID('TextPickerChangeHeight');
+ await pressBack();
+ //改变Padding
+ await checkButtonAndClickWithID('TextPickerPadding');
+ await checkButtonAndClickWithID('TextPickerChangePadding');
+ await pressBack();
+ //改变Margin
+ await checkButtonAndClickWithID('TextPickerMargin');
+ await checkButtonAndClickWithID('TextPickerChangeMargin');
+ await pressBack();
+ //手指滑动
+ await checkButtonAndClickWithID('TextPickerFingerSwip');
+ await driver.swipe(150, 300, 150, 150)
+ await pressBack();
+ //手指点击
+ await checkButtonAndClickWithID('TextPickerClick');
+ await driver.click(150, 150)
+ await driver.delayMs(1000);
+ await pressBack();
+ //鼠标滚轮MouseScroll
+ await checkButtonAndClickWithID('TextPickerMouseScroll');
+ await driver.mouseScroll({ x: 150, y: 200 }, true, 5);
+ await driver.delayMs(1000);
+ await pressBack();
+ //键盘Scroll
+ await checkButtonAndClickWithID('TextPickerKeyBoardScroll');
+ // await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN);
+ await driver.swipe(150, 300, 150, 150)
+ await driver.delayMs(1000);
+ await pressBack();
+ await pressBack(); //返回首页
+ })
+
+ //点击首页ScrollBar
+ it(`ScrollBarBenchMarkTest`, 0, async () => {
+ await driver.delayMs(1000);
+ await checkButtonAndClickWithID('ScrollBar');
+ await checkButtonAndClickWithID('ScrollBarCreateSample');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarWidthSample');
+ await checkButtonAndClickWithID('change width 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarHeightSample');
+ await checkButtonAndClickWithID('change height 100 to 200');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarPaddingSample');
+ await checkButtonAndClickWithID('change padding 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarMarginSample');
+ await checkButtonAndClickWithID('change margin 20 to 30');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarDirectionSample');
+ await checkButtonAndClickWithID('change direction');
+ await pressBack();
+ await checkButtonAndClickWithID('ScrollBarStateSample');
+ await checkButtonAndClickWithID('change state to On');
+ await checkButtonAndClickWithID('change state to Auto');
+ await pressBack();
+ await pressBack();
+ })
+
+
+ })
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testability/TestAbility.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testability/TestAbility.ets
new file mode 100644
index 0000000000000000000000000000000000000000..9060c277f531205dbe0a3b1f947081e1819e314a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testability/TestAbility.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import UIAbility from '@ohos.app.ability.UIAbility';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import hilog from '@ohos.hilog';
+import { Hypium } from '@ohos/hypium';
+import testsuite from '../test/List.test';
+import window from '@ohos.window';
+import Want from '@ohos.app.ability.Want';
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+
+export default class TestAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? '');
+ let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator;
+ abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs;
+ abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
+ hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
+ Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
+ }
+
+ onDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
+ windowStage.loadContent('testability/pages/Index', (err, data) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s',
+ JSON.stringify(data) ?? '');
+ });
+ }
+
+ onWindowStageDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
+ }
+
+ onForeground() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
+ }
+
+ onBackground() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testability/pages/Index.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testability/pages/Index.ets
new file mode 100644
index 0000000000000000000000000000000000000000..40f0a77aebde46e8c079bd9975134e37d373c1f7
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testability/pages/Index.ets
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+
+@Entry
+@Component
+struct Index {
+ aboutToAppear() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear');
+ }
+ @State message: string = 'Hello World'
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ Button() {
+ Text('next page')
+ .fontSize(20)
+ .fontWeight(FontWeight.Bold)
+ }.type(ButtonType.Capsule)
+ .margin({
+ top: 20
+ })
+ .backgroundColor('#0D9FFB')
+ .width('35%')
+ .height('5%')
+ .onClick(()=>{
+ })
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+ }
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d4b1c70c29a721ea887973e36c022346d9b3ca8a
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import TestRunner from '@ohos.application.testRunner';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+
+let abilityDelegator;
+let abilityDelegatorArguments;
+
+async function onAbilityCreateCallback() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
+}
+
+async function addAbilityMonitorCallback(err: any) {
+ hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
+}
+
+export default class OpenHarmonyTestRunner implements TestRunner {
+ constructor() {
+ }
+
+ onPrepare() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare ');
+ }
+
+ async onRun() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
+ abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments();
+ abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ const bundleName = abilityDelegatorArguments.bundleName;
+ const testAbilityName = 'TestAbility';
+ let lMonitor = {
+ abilityName: testAbilityName,
+ onAbilityCreate: onAbilityCreateCallback,
+ };
+ abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback);
+ const want = {
+ bundleName: bundleName,
+ abilityName: testAbilityName
+ };
+ abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ abilityDelegator.startAbility(want, (err : any, data : any) => {
+ hilog.info(0x0000, 'testTag', 'startAbility : err : %{public}s', JSON.stringify(err) ?? '');
+ hilog.info(0x0000, 'testTag', 'startAbility : data : %{public}s',JSON.stringify(data) ?? '');
+ })
+ hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end');
+ }
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/module.json5 b/performance/arkui/benchMark_Component/entry/src/ohosTest/module.json5
new file mode 100644
index 0000000000000000000000000000000000000000..e6a499c49efe53f1a5bab25638ce6b00f612a7d8
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/module.json5
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry_test",
+ "type": "feature",
+ "description": "$string:module_test_desc",
+ "mainElement": "TestAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:test_pages",
+ "abilities": [
+ {
+ "name": "TestAbility",
+ "srcEntry": "./ets/testability/TestAbility.ets",
+ "description": "$string:TestAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:TestAbility_label",
+ "exported": true,
+ "startWindowIcon": "$media:icon",
+ "startWindowBackground": "$color:start_window_background",
+ "skills": [
+ {
+ "actions": [
+ "action.system.home"
+ ],
+ "entities": [
+ "entity.system.home"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/element/color.json b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/element/string.json b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..65d8fa5a7cf54aa3943dcd0214f58d1771bc1f6c
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_test_desc",
+ "value": "test ability description"
+ },
+ {
+ "name": "TestAbility_desc",
+ "value": "the test ability"
+ },
+ {
+ "name": "TestAbility_label",
+ "value": "test label"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/media/icon.png b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/media/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/media/icon.png differ
diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/profile/test_pages.json b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/profile/test_pages.json
new file mode 100644
index 0000000000000000000000000000000000000000..b7e7343cacb32ce982a45e76daad86e435e054fe
--- /dev/null
+++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/resources/base/profile/test_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "testability/pages/Index"
+ ]
+}
diff --git a/performance/arkui/benchMark_Component/hvigor/hvigor-config.json5 b/performance/arkui/benchMark_Component/hvigor/hvigor-config.json5
new file mode 100644
index 0000000000000000000000000000000000000000..cd27561af7bdd1d159f8bfac1ff4f333234be279
--- /dev/null
+++ b/performance/arkui/benchMark_Component/hvigor/hvigor-config.json5
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "hvigorVersion": "3.0.2",
+ "dependencies": {
+ "@ohos/hvigor-ohos-plugin": "3.0.2"
+ },
+ "execution": {
+ // "daemon": true, /* Enable daemon compilation. Default: true */
+ // "incremental": true, /* Enable incremental compilation. Default: true */
+ // "parallel": true, /* Enable parallel compilation. Default: true */
+ // "typeCheck": false, /* Enable typeCheck. Default: false */
+ },
+ "logging": {
+ // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
+ },
+ "debugging": {
+ // "stacktrace": false /* Disable stacktrace compilation. Default: false */
+ }
+}
diff --git a/performance/arkui/benchMark_Component/hvigor/hvigor-wrapper.js b/performance/arkui/benchMark_Component/hvigor/hvigor-wrapper.js
new file mode 100644
index 0000000000000000000000000000000000000000..01ec0de8a0ca4a0a8de10607ce3c4f09a14f5625
--- /dev/null
+++ b/performance/arkui/benchMark_Component/hvigor/hvigor-wrapper.js
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("child_process"),r=require("crypto"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={},g={},m={};Object.defineProperty(m,"__esModule",{value:!0}),m.Unicode=void 0;class R{}m.Unicode=R,R.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,R.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,R.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(g,"__esModule",{value:!0}),g.JudgeUtil=void 0;const y=m;g.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&y.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||y.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||""===u||""===u||y.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var I=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(v,"__esModule",{value:!0}),v.parseJsonText=v.parseJsonFile=void 0;const N=I(e),b=I(D),S=I(u),w=g;var H;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(H||(H={}));let x,M,T,V,G,j,J="start",U=[],W=0,L=1,$=0,k=!1,K="default",z="'",q=1;function Z(u,D=!1){M=String(u),J="start",U=[],W=0,L=1,$=0,V=void 0,k=D;do{x=X(),ru[J]()}while("eof"!==x.type);return V}function X(){for(K="default",G="",z="'",q=1;;){j=Q();const u=uu[K]();if(u)return u}}function Q(){if(M[W])return String.fromCodePoint(M.codePointAt(W))}function Y(){const u=Q();return"\n"===u?(L++,$=0):u?$+=u.length:$++,u&&(W+=u.length),u}v.parseJsonFile=function(u,D=!1,e="utf-8"){const t=N.default.readFileSync(S.default.resolve(u),{encoding:e});try{return Z(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${b.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},v.parseJsonText=Z;const uu={default(){switch(j){case"/":return Y(),void(K="comment");case void 0:return Y(),Du("eof")}if(!w.JudgeUtil.isIgnoreChar(j)&&!w.JudgeUtil.isSpaceSeparator(j))return uu[J]();Y()},start(){K="value"},beforePropertyName(){switch(j){case"$":case"_":return G=Y(),void(K="identifierName");case"\\":return Y(),void(K="identifierNameStartEscape");case"}":return Du("punctuator",Y());case'"':case"'":return z=j,Y(),void(K="string")}if(w.JudgeUtil.isIdStartChar(j))return G+=Y(),void(K="identifierName");throw Fu(H.Char,Y())},afterPropertyName(){if(":"===j)return Du("punctuator",Y());throw Fu(H.Char,Y())},beforePropertyValue(){K="value"},afterPropertyValue(){switch(j){case",":case"}":return Du("punctuator",Y())}throw Fu(H.Char,Y())},beforeArrayValue(){if("]"===j)return Du("punctuator",Y());K="value"},afterArrayValue(){switch(j){case",":case"]":return Du("punctuator",Y())}throw Fu(H.Char,Y())},end(){throw Fu(H.Char,Y())},comment(){switch(j){case"*":return Y(),void(K="multiLineComment");case"/":return Y(),void(K="singleLineComment")}throw Fu(H.Char,Y())},multiLineComment(){switch(j){case"*":return Y(),void(K="multiLineCommentAsterisk");case void 0:throw Fu(H.Char,Y())}Y()},multiLineCommentAsterisk(){switch(j){case"*":return void Y();case"/":return Y(),void(K="default");case void 0:throw Fu(H.Char,Y())}Y(),K="multiLineComment"},singleLineComment(){switch(j){case"\n":case"\r":case"\u2028":case"\u2029":return Y(),void(K="default");case void 0:return Y(),Du("eof")}Y()},value(){switch(j){case"{":case"[":return Du("punctuator",Y());case"n":return Y(),eu("ull"),Du("null",null);case"t":return Y(),eu("rue"),Du("boolean",!0);case"f":return Y(),eu("alse"),Du("boolean",!1);case"-":case"+":return"-"===Y()&&(q=-1),void(K="numerical");case".":case"0":case"I":case"N":return void(K="numerical");case'"':case"'":return z=j,Y(),G="",void(K="string")}if(void 0===j||!w.JudgeUtil.isDigitWithoutZero(j))throw Fu(H.Char,Y());K="numerical"},numerical(){switch(j){case".":return G=Y(),void(K="decimalPointLeading");case"0":return G=Y(),void(K="zero");case"I":return Y(),eu("nfinity"),Du("numeric",q*(1/0));case"N":return Y(),eu("aN"),Du("numeric",NaN)}if(void 0!==j&&w.JudgeUtil.isDigitWithoutZero(j))return G=Y(),void(K="decimalInteger");throw Fu(H.Char,Y())},zero(){switch(j){case".":case"e":case"E":return void(K="decimal");case"x":case"X":return G+=Y(),void(K="hexadecimal")}return Du("numeric",0)},decimalInteger(){switch(j){case".":case"e":case"E":return void(K="decimal")}if(!w.JudgeUtil.isDigit(j))return Du("numeric",q*Number(G));G+=Y()},decimal(){switch(j){case".":G+=Y(),K="decimalFraction";break;case"e":case"E":G+=Y(),K="decimalExponent"}},decimalPointLeading(){if(w.JudgeUtil.isDigit(j))return G+=Y(),void(K="decimalFraction");throw Fu(H.Char,Y())},decimalFraction(){switch(j){case"e":case"E":return G+=Y(),void(K="decimalExponent")}if(!w.JudgeUtil.isDigit(j))return Du("numeric",q*Number(G));G+=Y()},decimalExponent(){switch(j){case"+":case"-":return G+=Y(),void(K="decimalExponentSign")}if(w.JudgeUtil.isDigit(j))return G+=Y(),void(K="decimalExponentInteger");throw Fu(H.Char,Y())},decimalExponentSign(){if(w.JudgeUtil.isDigit(j))return G+=Y(),void(K="decimalExponentInteger");throw Fu(H.Char,Y())},decimalExponentInteger(){if(!w.JudgeUtil.isDigit(j))return Du("numeric",q*Number(G));G+=Y()},hexadecimal(){if(w.JudgeUtil.isHexDigit(j))return G+=Y(),void(K="hexadecimalInteger");throw Fu(H.Char,Y())},hexadecimalInteger(){if(!w.JudgeUtil.isHexDigit(j))return Du("numeric",q*Number(G));G+=Y()},identifierNameStartEscape(){if("u"!==j)throw Fu(H.Char,Y());Y();const u=tu();switch(u){case"$":case"_":break;default:if(!w.JudgeUtil.isIdStartChar(u))throw Fu(H.Identifier)}G+=u,K="identifierName"},identifierName(){switch(j){case"$":case"_":case"":case"":return void(G+=Y());case"\\":return Y(),void(K="identifierNameEscape")}if(!w.JudgeUtil.isIdContinueChar(j))return Du("identifier",G);G+=Y()},identifierNameEscape(){if("u"!==j)throw Fu(H.Char,Y());Y();const u=tu();switch(u){case"$":case"_":case"":case"":break;default:if(!w.JudgeUtil.isIdContinueChar(u))throw Fu(H.Identifier)}G+=u,K="identifierName"},string(){switch(j){case"\\":return Y(),void(G+=function(){const u=Q(),D=function(){switch(Q()){case"b":return Y(),"\b";case"f":return Y(),"\f";case"n":return Y(),"\n";case"r":return Y(),"\r";case"t":return Y(),"\t";case"v":return Y(),"\v"}return}();if(D)return D;switch(u){case"0":if(Y(),w.JudgeUtil.isDigit(Q()))throw Fu(H.Char,Y());return"\0";case"x":return Y(),function(){let u="",D=Q();if(!w.JudgeUtil.isHexDigit(D))throw Fu(H.Char,Y());if(u+=Y(),D=Q(),!w.JudgeUtil.isHexDigit(D))throw Fu(H.Char,Y());return u+=Y(),String.fromCodePoint(parseInt(u,16))}();case"u":return Y(),tu();case"\n":case"\u2028":case"\u2029":return Y(),"";case"\r":return Y(),"\n"===Q()&&Y(),""}if(void 0===u||w.JudgeUtil.isDigitWithoutZero(u))throw Fu(H.Char,Y());return Y()}());case'"':case"'":if(j===z){const u=Du("string",G);return Y(),u}return void(G+=Y());case"\n":case"\r":case void 0:throw Fu(H.Char,Y());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Cu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(j)}G+=Y()}};function Du(u,D){return{type:u,value:D,line:L,column:$}}function eu(u){for(const D of u){if(Q()!==D)throw Fu(H.Char,Y());Y()}}function tu(){let u="",D=4;for(;D-- >0;){const D=Q();if(!w.JudgeUtil.isHexDigit(D))throw Fu(H.Char,Y());u+=Y()}return String.fromCodePoint(parseInt(u,16))}const ru={start(){if("eof"===x.type)throw Fu(H.EOF);nu()},beforePropertyName(){switch(x.type){case"identifier":case"string":return T=x.value,void(J="afterPropertyName");case"punctuator":return void iu();case"eof":throw Fu(H.EOF)}},afterPropertyName(){if("eof"===x.type)throw Fu(H.EOF);J="beforePropertyValue"},beforePropertyValue(){if("eof"===x.type)throw Fu(H.EOF);nu()},afterPropertyValue(){if("eof"===x.type)throw Fu(H.EOF);switch(x.value){case",":return void(J="beforePropertyName");case"}":iu()}},beforeArrayValue(){if("eof"===x.type)throw Fu(H.EOF);"punctuator"!==x.type||"]"!==x.value?nu():iu()},afterArrayValue(){if("eof"===x.type)throw Fu(H.EOF);switch(x.value){case",":return void(J="beforeArrayValue");case"]":iu()}},end(){}};function nu(){const u=function(){let u;switch(x.type){case"punctuator":switch(x.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=x.value}return u}();if(k&&"object"==typeof u&&(u._line=L,u._column=$),void 0===V)V=u;else{const D=U[U.length-1];Array.isArray(D)?k&&"object"!=typeof u?D.push({value:u,_line:L,_column:$}):D.push(u):D[T]=k&&"object"!=typeof u?{value:u,_line:L,_column:$}:u}!function(u){if(u&&"object"==typeof u)U.push(u),J=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];J=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function iu(){U.pop();const u=U[U.length-1];J=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Cu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Fu(u,D){let e="";switch(u){case H.Char:e=void 0===D?`JSON5: invalid end of input at ${L}:${$}`:`JSON5: invalid character '${Cu(D)}' at ${L}:${$}`;break;case H.EOF:e=`JSON5: invalid end of input at ${L}:${$}`;break;case H.Identifier:$-=5,e=`JSON5: invalid identifier character at ${L}:${$}`}const t=new Eu(e);return t.lineNumber=L,t.columnNumber=$,t}class Eu extends SyntaxError{}var Au={},ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),au=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),cu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&ou(D,u,e);return au(D,u),D},su=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Au,"__esModule",{value:!0}),Au.isFileExists=Au.offlinePluginConversion=Au.executeCommand=Au.getNpmPath=Au.hasNpmPackInPaths=void 0;const lu=t,Bu=su(e),du=cu(u),fu=i,_u=l;Au.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},Au.getNpmPath=function(){const u=process.execPath;return du.join(du.dirname(u),fu.NPM_TOOL)},Au.executeCommand=function(u,D,e){0!==(0,lu.spawnSync)(u,D,e).status&&(0,_u.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},Au.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?du.resolve(u,fu.HVIGOR,D.replace("file:","")):D},Au.isFileExists=function(u){return Bu.default.existsSync(u)&&Bu.default.statSync(u).isFile()};var pu={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const t=D(r),i=D(e);u.createHash=(u="MD5")=>t.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(pu);var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=Pu(u),yu=i,Iu=v,Nu=l,bu=Au,Su=vu(D),wu=pu;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===Ru.normalize(e.dependencies[u])}function Vu(){const u=Ru.join(Mu,yu.WORK_SPACE);if((0,Nu.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=Ru.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,bu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(Ru.resolve(u,D),{recursive:!0})}))}catch(D){(0,Nu.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=Ru.resolve(yu.HVIGOR_PROJECT_WRAPPER_HOME,yu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Nu.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,Iu.parseJsonFile)(u)}(),Mu=function(u){let D,e=u.hvigorVersion;e.endsWith(".tgz")&&(e=function(u){let D=Ru.normalize(u);const e=D.lastIndexOf(Ru.sep);-1!==e&&(D=D.substring(e+1));D=D.replace(".tgz","");let t=0;for(let u=0;u="0"&&D.charAt(u)<="9"){t=u;break}return D=D.substring(t),D}(e));D=e>"2.5.0"?function(u){let D=`${yu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,wu.hash)(D)}(u):(0,wu.hash)(process.cwd());return Ru.resolve(Su.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=Ru.resolve(Mu,yu.WORK_SPACE,yu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,Iu.parseJsonFile)(u):{dependencies:{}}}(),!(0,bu.hasNpmPackInPaths)(yu.HVIGOR_ENGINE_PACKAGE_NAME,[Ru.join(Mu,yu.WORK_SPACE)])||(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[yu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,bu.hasNpmPackInPaths)(u,[Ru.join(Mu,yu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Nu.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[yu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=Ru.join(Mu,yu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=Ru.resolve(D,yu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Nu.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",yu.HVIGOR_PNPM_STORE_PATH],D={cwd:Ru.join(Mu,yu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,bu.executeCommand)(yu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:Ru.join(Mu,yu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,bu.executeCommand)(yu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Nu.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(r){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(r,"__esModule",{value:!0}),r.executeInstallPnpm=r.isPnpmInstalled=r.environmentHandler=r.checkNpmConifg=r.PNPM_VERSION=void 0;const o=t,a=E(e),c=A(D),s=E(u),B=i,d=l,f=Au;r.PNPM_VERSION="7.30.0",r.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},r.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},r.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},r.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${r.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=r.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}();
\ No newline at end of file
diff --git a/performance/arkui/benchMark_Component/hvigorfile.ts b/performance/arkui/benchMark_Component/hvigorfile.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2a4a8343e9944f8f8148d7c1be20d593f26e9ff3
--- /dev/null
+++ b/performance/arkui/benchMark_Component/hvigorfile.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { appTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/performance/arkui/benchMark_Component/hvigorw b/performance/arkui/benchMark_Component/hvigorw
new file mode 100644
index 0000000000000000000000000000000000000000..784f4fbff9ce5e3eb257298ab6b54d3fb2178486
--- /dev/null
+++ b/performance/arkui/benchMark_Component/hvigorw
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+# ----------------------------------------------------------------------------
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Hvigor startup script, version 1.0.0
+#
+# Required ENV vars:
+# ------------------
+# NODE_HOME - location of a Node home dir
+# or
+# Add /usr/local/nodejs/bin to the PATH environment variable
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Hvigor startup script, version 1.0.0
+#
+# Required ENV vars:
+# ------------------
+# NODE_HOME - location of a Node home dir
+# or
+# Add /usr/local/nodejs/bin to the PATH environment variable
+# ----------------------------------------------------------------------------
+
+HVIGOR_APP_HOME="`pwd -P`"
+HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
+warn() {
+ echo ""
+ echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
+}
+
+error() {
+ echo ""
+ echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
+}
+
+fail() {
+ error "$@"
+ exit 1
+}
+
+# Determine node to start hvigor wrapper script
+if [ -n "${NODE_HOME}" ];then
+ EXECUTABLE_NODE="${NODE_HOME}/bin/node"
+ if [ ! -x "$EXECUTABLE_NODE" ];then
+ fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
+ fi
+else
+ EXECUTABLE_NODE="node"
+ which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path"
+fi
+
+# Check hvigor wrapper script
+if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then
+ fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
+fi
+
+# start hvigor-wrapper script
+exec "${EXECUTABLE_NODE}" \
+ "${HVIGOR_WRAPPER_SCRIPT}" "$@"
diff --git a/performance/arkui/benchMark_Component/hvigorw.bat b/performance/arkui/benchMark_Component/hvigorw.bat
new file mode 100644
index 0000000000000000000000000000000000000000..3c6a9de8a572a6808818cad4b4bb38b9cf129826
--- /dev/null
+++ b/performance/arkui/benchMark_Component/hvigorw.bat
@@ -0,0 +1,77 @@
+:: Copyright (c) 2023 Huawei Device Co., Ltd.
+:: Licensed under the Apache License, Version 2.0 (the "License");
+:: you may not use this file except in compliance with the License.
+:: You may obtain a copy of the License at
+::
+:: http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Hvigor startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
+set NODE_EXE=node.exe
+
+goto start
+
+:start
+@rem Find node.exe
+if defined NODE_HOME goto findNodeFromNodeHome
+
+%NODE_EXE% --version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
+echo.
+echo Please set the NODE_HOME variable in your environment to match the
+echo location of your NodeJs installation.
+
+goto fail
+
+:findNodeFromNodeHome
+set NODE_HOME=%NODE_HOME:"=%
+set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
+
+if exist "%NODE_EXE_PATH%" goto execute
+echo.
+echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
+echo.
+echo Please set the NODE_HOME variable in your environment to match the
+echo location of your NodeJs installation.
+
+goto fail
+
+:execute
+@rem Execute hvigor
+"%NODE_EXE%" "%WRAPPER_MODULE_PATH%" %*
+
+if "%ERRORLEVEL%" == "0" goto hvigorwEnd
+
+:fail
+exit /b 1
+
+:hvigorwEnd
+if "%OS%" == "Windows_NT" endlocal
+
+:end
diff --git a/performance/arkui/benchMark_Component/oh-package.json5 b/performance/arkui/benchMark_Component/oh-package.json5
new file mode 100644
index 0000000000000000000000000000000000000000..8b458c0e4374bb6c15550795550a5b8060085ef2
--- /dev/null
+++ b/performance/arkui/benchMark_Component/oh-package.json5
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "license": "",
+ "devDependencies": {
+ "@ohos/hypium": "1.0.6"
+ },
+ "author": "",
+ "name": "benchmarksample",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "version": "1.0.0",
+ "dependencies": {}
+}