diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-08-31 18:04:47 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-09-10 15:56:35 +0000 |
commit | de2f5d2bc11a71fe12fcc4c08fff9bf59571db36 (patch) | |
tree | 7e67a981ab3d8e7c2670478e6e13900ce6baad6b /src/qmldebug/qqmlpreviewclient.cpp | |
parent | bf07bdcdf97473f1239ff965c7de795ec6caca42 (diff) |
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 <thomas.hartmann@qt.io>
Diffstat (limited to 'src/qmldebug/qqmlpreviewclient.cpp')
-rw-r--r-- | src/qmldebug/qqmlpreviewclient.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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: |