From de2f5d2bc11a71fe12fcc4c08fff9bf59571db36 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 31 Aug 2018 18:04:47 +0200 Subject: Qml Preview: Record more detailed frame statistics Just the number of frames per second doesn't tell us the reason for any low frame rates. The problem could either be GPU-bound, and rendering could take very long, or the problem could be CPU-bound, with synchronizing or the gap between frames being very long. Reporting the rendering and synchronization times in more detail gives the client an idea of what is actually going on. Change-Id: Ib2840a9e1aa9b9738e967730c668769946659be2 Reviewed-by: Thomas Hartmann --- src/qmldebug/qqmlpreviewclient.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/qmldebug/qqmlpreviewclient.cpp') diff --git a/src/qmldebug/qqmlpreviewclient.cpp b/src/qmldebug/qqmlpreviewclient.cpp index ba27457765..60937b9cfd 100644 --- a/src/qmldebug/qqmlpreviewclient.cpp +++ b/src/qmldebug/qqmlpreviewclient.cpp @@ -75,9 +75,10 @@ void QQmlPreviewClient::messageReceived(const QByteArray &message) break; } case Fps: { - quint16 frames; - packet >> frames; - emit fps(frames); + FpsInfo info; + packet >> info.numSyncs >> info.minSync >> info.maxSync >> info.totalSync + >> info.numRenders >> info.minRender >> info.maxRender >> info.totalRender; + emit fps(info); break; } default: -- cgit v1.2.3