aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qml
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-16 16:43:55 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-17 16:20:09 +0000
commit1b96186d1418adcba85fdbfd794da2d2f6ea122d (patch)
treed5dae59a42956fd3cc79b5854abd3f1bb8f643c6 /tests/benchmarks/qml
parent020f6b8a9c86c3b02bd77d4dea455f60540d4267 (diff)
Create new engine for each benchmark run
Otherwise we end up with too many mmap'ed blocks as they appear not to be deallocated until the engine is destroyed. Change-Id: I88b8dd6d570423a492ddc6c7f105d0db97caa72d Task-number: QTBUG-60590 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/benchmarks/qml')
-rw-r--r--tests/benchmarks/qml/holistic/tst_holistic.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/benchmarks/qml/holistic/tst_holistic.cpp b/tests/benchmarks/qml/holistic/tst_holistic.cpp
index 791ae6812b..d7e71297f2 100644
--- a/tests/benchmarks/qml/holistic/tst_holistic.cpp
+++ b/tests/benchmarks/qml/holistic/tst_holistic.cpp
@@ -108,8 +108,6 @@ private slots:
void typeResolution_data();
void typeResolution();
-private:
- QQmlEngine engine;
};
tst_holistic::tst_holistic()
@@ -242,6 +240,7 @@ void tst_holistic::compilation_data()
void tst_holistic::compilation()
{
+ QQmlEngine engine;
// This function benchmarks the cost of loading and compiling specified QML files.
// If "repetitions" is non-zero, each file from "files" will be compiled "repetitions"
// times, without clearing the engine's component cache between compilations.
@@ -263,6 +262,7 @@ void tst_holistic::compilation()
void tst_holistic::instantiation()
{
+ QQmlEngine engine;
// This function benchmarks the cost of instantiating components compiled from specified QML files.
// If "repetitions" is non-zero, each component compiled from "files" will be instantiated "repetitions"
// times, without clearing the component's instantiation cache between instantiations.
@@ -297,6 +297,7 @@ void tst_holistic::instantiation()
void tst_holistic::creation()
{
+ QQmlEngine engine;
// This function benchmarks the cost of loading, compiling and instantiating specified QML files.
// If "repetitions" is non-zero, each file from "files" will be created "repetitions"
// times, without clearing the engine's component cache between component creation.
@@ -359,6 +360,7 @@ void tst_holistic::dynamicity_data()
void tst_holistic::dynamicity()
{
+ QQmlEngine engine;
// This function benchmarks the cost of "continued operation" - signal invocation,
// updating bindings, etc. Note that we take two different writeValues in order
// to force updates to occur, and we read to force lazy evaluation to occur.
@@ -472,6 +474,7 @@ void tst_holistic::cppToJsDirect_data()
void tst_holistic::cppToJsDirect()
{
+ QQmlEngine engine;
// This function benchmarks the cost of calling from CPP scope to JS scope
// (and possibly vice versa, if the invoked js method then calls to cpp).
@@ -491,6 +494,7 @@ void tst_holistic::cppToJsDirect()
void tst_holistic::cppToJsIndirect()
{
+ QQmlEngine engine;
// This function benchmarks the cost of binding scarce resources
// to properties of a QML component. The engine should automatically release such
// resources when they are no longer used.
@@ -544,6 +548,7 @@ void tst_holistic::typeResolution_data()
void tst_holistic::typeResolution()
{
+ QQmlEngine engine;
// This function benchmarks the cost of "continued operation" (signal invocation,
// updating bindings, etc) where the component has lots of nested items with
// lots of resolving required. Note that we take two different writeValues in order