aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qmlbench/creation/delegates_popup.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-01-04 11:02:38 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-01-05 09:41:01 +0000
commit55522df46edd295a65edd32e0ca7d32408ab6de4 (patch)
tree3279e91b72267328bc5e7ef322ac272cab4ba211 /tests/benchmarks/qmlbench/creation/delegates_popup.qml
parentaa9308d1d172a51a3e4356b8831b9f28fc68086e (diff)
Add creation benchmarks for qmlbench
The qmlbench repo has benchmarks only for a subset of controls. They are part of a larger collection of benchmarks that are run periodically, for which the results are collected to Grafana. We have limited resources there, so we don't want to overload it with benchmarks for every single control type. However, for our own benchmarking purposes it is useful to be able to easily benchmark all of them. Change-Id: I920e4c07bce8356e5d9f41d4c1d6ae43e37bb13e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/benchmarks/qmlbench/creation/delegates_popup.qml')
-rw-r--r--tests/benchmarks/qmlbench/creation/delegates_popup.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/benchmarks/qmlbench/creation/delegates_popup.qml b/tests/benchmarks/qmlbench/creation/delegates_popup.qml
new file mode 100644
index 00000000..acb4ce25
--- /dev/null
+++ b/tests/benchmarks/qmlbench/creation/delegates_popup.qml
@@ -0,0 +1,26 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Controls 2.0
+
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 500
+ delegate: Item {
+ x: QmlBench.getRandom() * root.width - width
+ y: QmlBench.getRandom() * root.height - height
+ width: popup.width
+ height: popup.height
+ Popup {
+ id: popup
+ visible: true
+ modal: (index % 100) === 0
+ width: parent.width
+ height: parent.height
+ Item {
+ implicitWidth: 100
+ implicitHeight: 100
+ }
+ }
+ }
+}