summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-13 00:24:27 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-13 09:32:21 +0200
commitb1fd9a93b957f40670fb386c5c9ca4ea352fd342 (patch)
tree393f581cb224a8119ebe7392c0ad3d2f612b68e8 /tests
parent4b73950cc83ffdd116b23902e2cd8233d907a224 (diff)
Speed up tst_QGraphicsView::mapToScene test
This test is doing a brute-force mapping. Coupled with changes to QCOMPARE last year, this now allocates and deallocates a lot of memory per iteration. On my Sandybridge, it takes two minutes to run: 111136.781153 task-clock # 0.999 CPUs utilized 371,692,633,238 cycles # 3.344 GHz 182,641,818,708 stalled-cycles-frontend # 49.14% frontend cycles idle 57,951,552,830 stalled-cycles-backend # 15.59% backend cycles idle 477,216,332,971 instructions # 1.28 insns per cycle # 0.38 stalled cycles per insn 86,959,637,669 branches # 782.456 M/sec 309,185,237 branch-misses # 0.36% of all branches 111.264868818 seconds time elapsed Changing the iteration step from 1 to 5 reduces the runtime to about 5 seconds. Change-Id: I9cad6f85f535f472319da7cd6c4aa28e12ddf1b7 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index a27e14bcef..e5a5786748 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -1720,7 +1720,7 @@ void tst_QGraphicsView::mapToScene()
#ifdef Q_PROCESSOR_ARM
const int step = 20;
#else
- const int step = 1;
+ const int step = 5;
#endif
for (int x = 0; x < view.width(); x += step) {