diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-11-23 10:05:30 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-11-23 14:48:13 +0000 |
commit | d53b07ee19ee940672b1bcd8e692a488f3b6eb4e (patch) | |
tree | 093a4659a3953fadf8351c6b2ea254d5eaf06897 /tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | |
parent | 9e77d75a6286951783bab3f9c5fb98fd52f315b8 (diff) |
Re-enable QML memory profiling
Task-number: QTBUG-64674
Change-Id: I48ed1a51f66ef8d55cc026f140d270baaca04fbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp')
-rw-r--r-- | tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index b8e1f1f21d..bc6c51707a 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -312,6 +312,7 @@ private slots: void signalSourceLocation(); void javascript(); void flushInterval(); + void memory(); }; #define VERIFY(type, position, expected, checks) QVERIFY(verify(type, position, expected, checks)) @@ -756,6 +757,26 @@ void tst_QQmlProfilerService::flushInterval() checkJsHeap(); } +void tst_QQmlProfilerService::memory() +{ + connect(true, "memory.qml"); + if (QTest::currentTestFailed() || QTestResult::skipCurrentTest()) + return; + + m_client->sendRecordingStatus(true); + + checkTraceReceived(); + checkJsHeap(); + + int smallItems = 0; + for (auto message : m_client->jsHeapMessages) { + if (message.detailType == QV4::Profiling::SmallItem) + ++smallItems; + } + + QVERIFY(smallItems > 5); +} + QTEST_MAIN(tst_QQmlProfilerService) #include "tst_qqmlprofilerservice.moc" |