summaryrefslogtreecommitdiff
path: root/tests/benchmarks/qmlbench/creation/delegates_delaybutton.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-01-19 15:57:55 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-01-22 13:29:59 +0000
commit054b943e678728cf66e4c5c6d71a9650acb7432f (patch)
treeaf23daa3394ac0fd931f794495e5961cec444364 /tests/benchmarks/qmlbench/creation/delegates_delaybutton.qml
parent69f71318db48616d51c8f81715e794b483c1fbfa (diff)
downloadqtquickcontrols-054b943e678728cf66e4c5c6d71a9650acb7432f.tar.gz
Add creation benchmarks for qmlbench
The qmlbench repo has benchmarks only for a subset of QQC2. 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 many QQC1 types. However, for our own benchmarking purposes it is useful to be able to easily benchmark these types. Change-Id: I9124791a93f07346dc80f1f08aedd655ed0cfa02 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/benchmarks/qmlbench/creation/delegates_delaybutton.qml')
-rw-r--r--tests/benchmarks/qmlbench/creation/delegates_delaybutton.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/benchmarks/qmlbench/creation/delegates_delaybutton.qml b/tests/benchmarks/qmlbench/creation/delegates_delaybutton.qml
new file mode 100644
index 00000000..2110a055
--- /dev/null
+++ b/tests/benchmarks/qmlbench/creation/delegates_delaybutton.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QmlBench 1.0
+import QtQuick.Extras 1.4
+
+CreationBenchmark {
+ id: root
+ count: 20
+ staticCount: 1000
+ delegate: DelayButton {
+ x: QmlBench.getRandom() * root.width - width
+ y: QmlBench.getRandom() * root.height - height
+ text: "DelayButton"
+ __effectivePressed: index % 2
+ }
+}