aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-11 10:17:10 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-05-19 12:57:40 +0000
commit0f68ffdd206487bec3bf675e673a0b817a9a3951 (patch)
tree4c8638b060bab142b5b833e0037463968ce9504c
parentab8960b1b4e11dd166e490adb41d7bc64775172d (diff)
Add creation benchmarks for Qt Quick Controls 2
Change-Id: I07e675ff8acf7741e8a299b28f170624fccbdf13 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_busyindicator.qml15
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_button.qml (renamed from benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml)9
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml16
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_combobox.qml16
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_dial.qml15
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_itemdelegate.qml16
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_label.qml (renamed from benchmarks/auto/creation/controls/delegates_labelcontrol2.qml)6
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_menuitem.qml18
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_progressbar.qml15
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml17
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_scrollbar.qml18
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml24
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_slider.qml15
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml15
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_switch.qml16
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_tabbar.qml24
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_textarea.qml15
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_textfield.qml15
-rw-r--r--benchmarks/auto/creation/quick.controls2/delegates_tumbler.qml16
19 files changed, 294 insertions, 7 deletions
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_busyindicator.qml b/benchmarks/auto/creation/quick.controls2/delegates_busyindicator.qml
new file mode 100644
index 0000000..a554255
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_busyindicator.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's BusyIndicator type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: BusyIndicator {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ running: index % 2
+ }
+}
diff --git a/benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml b/benchmarks/auto/creation/quick.controls2/delegates_button.qml
index c1c5f71..de4bbba 100644
--- a/benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml
+++ b/benchmarks/auto/creation/quick.controls2/delegates_button.qml
@@ -4,12 +4,13 @@ import QtQuick.Controls 2.0
// Tests the creation of QQC2's Button type.
CreationBenchmark {
- id: root;
- count: 20;
- staticCount: 1000;
+ id: root
+ count: 20
+ staticCount: 1000
delegate: Button {
x: Math.random() * root.width - width
y: Math.random() * root.height - height
- text: "Item #" + index;
+ text: "Button"
+ down: index % 2
}
}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml b/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml
new file mode 100644
index 0000000..e5474d6
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's CheckBox type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: CheckBox {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "CheckBox"
+ checked: index % 2
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_combobox.qml b/benchmarks/auto/creation/quick.controls2/delegates_combobox.qml
new file mode 100644
index 0000000..2d39e78
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_combobox.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's ComboBox type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 250
+ delegate: ComboBox {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ model: 5
+ currentIndex: index % count
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_dial.qml b/benchmarks/auto/creation/quick.controls2/delegates_dial.qml
new file mode 100644
index 0000000..1699c32
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_dial.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's Dial type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 500
+ delegate: Dial {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ value: index / root.staticCount
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_itemdelegate.qml b/benchmarks/auto/creation/quick.controls2/delegates_itemdelegate.qml
new file mode 100644
index 0000000..ccd89ab
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_itemdelegate.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's ItemDelegate type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: ItemDelegate {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "ItemDelegate"
+ down: index % 2
+ }
+}
diff --git a/benchmarks/auto/creation/controls/delegates_labelcontrol2.qml b/benchmarks/auto/creation/quick.controls2/delegates_label.qml
index befd4f1..84a4b05 100644
--- a/benchmarks/auto/creation/controls/delegates_labelcontrol2.qml
+++ b/benchmarks/auto/creation/quick.controls2/delegates_label.qml
@@ -4,9 +4,9 @@ import QtQuick.Controls 2.0
// Tests the creation of QQC2's Label type.
CreationBenchmark {
- id: root;
- count: 20;
- staticCount: 1000;
+ id: root
+ count: 20
+ staticCount: 1000
delegate: Label {
x: Math.random() * root.width - width
y: Math.random() * root.height - height
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_menuitem.qml b/benchmarks/auto/creation/quick.controls2/delegates_menuitem.qml
new file mode 100644
index 0000000..30ea4d7
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_menuitem.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's MenuItem type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: MenuItem {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "MenuItem"
+ checkable: index % 2
+ checked: index % 2
+ down: index % 3
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_progressbar.qml b/benchmarks/auto/creation/quick.controls2/delegates_progressbar.qml
new file mode 100644
index 0000000..6b87685
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_progressbar.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's ProgressBar type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: ProgressBar {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ value: index / root.staticCount
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml b/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml
new file mode 100644
index 0000000..6efe020
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml
@@ -0,0 +1,17 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's RadioButton type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: RadioButton {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "CheckBox"
+ autoExclusive: false
+ checked: index % 2
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_scrollbar.qml b/benchmarks/auto/creation/quick.controls2/delegates_scrollbar.qml
new file mode 100644
index 0000000..a2c9858
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_scrollbar.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's ScrollBar type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: ScrollBar {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ height: 100
+ size: index / root.staticCount
+ pressed: index % 2
+ active: true
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml b/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml
new file mode 100644
index 0000000..b80066b
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_scrollview.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.2
+
+// Tests the creation of QQC2's ScrollView type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 250
+ delegate: ScrollView {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ width: 100
+ height: 100
+ Item {
+ implicitWidth: 200
+ implicitHeight: 200
+ }
+ ScrollBar.vertical.active: true
+ ScrollBar.vertical.pressed: index % 3 === 1
+ ScrollBar.horizontal.active: true
+ ScrollBar.horizontal.pressed: index % 3 === 2
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_slider.qml b/benchmarks/auto/creation/quick.controls2/delegates_slider.qml
new file mode 100644
index 0000000..70c1485
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_slider.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's Slider type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: Slider {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ value: index / root.staticCount
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml b/benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml
new file mode 100644
index 0000000..3f197e8
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's SpinBox type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 250
+ delegate: SpinBox {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ value: index / root.staticCount * to
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_switch.qml b/benchmarks/auto/creation/quick.controls2/delegates_switch.qml
new file mode 100644
index 0000000..059e932
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_switch.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's Switch type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: Switch {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "Switch"
+ checked: index % 2
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_tabbar.qml b/benchmarks/auto/creation/quick.controls2/delegates_tabbar.qml
new file mode 100644
index 0000000..ecfd80c
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_tabbar.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's TabBar type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 250
+ delegate: TabBar {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ currentIndex: index / root.staticCount * count
+ TabButton {
+ text: "Tab1"
+ }
+ TabButton {
+ text: "Tab2"
+ }
+ TabButton {
+ text: "Tab3"
+ }
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_textarea.qml b/benchmarks/auto/creation/quick.controls2/delegates_textarea.qml
new file mode 100644
index 0000000..09ade83
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_textarea.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's TextArea type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 500
+ delegate: TextArea {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "Text\nArea"
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_textfield.qml b/benchmarks/auto/creation/quick.controls2/delegates_textfield.qml
new file mode 100644
index 0000000..2b688c1
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_textfield.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's TextField type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: TextField {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ text: "TextField"
+ }
+}
diff --git a/benchmarks/auto/creation/quick.controls2/delegates_tumbler.qml b/benchmarks/auto/creation/quick.controls2/delegates_tumbler.qml
new file mode 100644
index 0000000..4ca3595
--- /dev/null
+++ b/benchmarks/auto/creation/quick.controls2/delegates_tumbler.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+// Tests the creation of QQC2's Tumbler type.
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 250
+ delegate: Tumbler {
+ x: Math.random() * root.width - width
+ y: Math.random() * root.height - height
+ model: 5
+ currentIndex: index % count
+ }
+}