aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/auto/js/date_getYear.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/auto/js/date_getYear.qml')
-rw-r--r--src/benchmarks/auto/js/date_getYear.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/benchmarks/auto/js/date_getYear.qml b/src/benchmarks/auto/js/date_getYear.qml
new file mode 100644
index 0000000..2e2639a
--- /dev/null
+++ b/src/benchmarks/auto/js/date_getYear.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Tests the performance of getting the year out of a Date object
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 1500;
+ property date dt: new Date()
+ delegate: Item {
+ property int year: root.dt.getYear()
+ }
+}