Ultimately we want this as jobs for the progress manager, but let's
get the logic right before. The state widget should not estimate
profiling times and it doesn't have to keep local copies of all the
state the model and state managers already have. Also, we need an
additional indication for "waiting for application to send data", as
that can take significant time.
Change-Id: I3677dea4b0561bc83a7bc3c196ce0854c5624f12
Task-number: QTCREATORBUG-12958
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This way we can have a central filter menu to hide and show features
in any connected views.
Change-Id: I8142da0062a23f8166555016de6c7cb38060f725
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
It's not clear what they're supposed to tell us.
Change-Id: I62f4fb1265396b8d61df0ce6e3409f0eda677170
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This detour existed to ensure that the V8 model and the events model are
done processing before we call complete.
Change-Id: I89b3ec7935e63e8cbcdeaff74d407064456c07be
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
The only thing they did was trigger some QML code that set the zoom to
10% of the available range. 10% is somewhat arbitrary, so we shouldn't
have it in the general purpose timeline. Also, we don't really have to
pass the signal through several connections just to do that in QML.
The clearChildren() didn't have any effect there as dataAvailable()
should only happen if the view is already cleared.
Change-Id: I1813ed37a82fc3fd5c3b7fc02b2afb1dcbcadcfb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Move the main part of the loading work into a background thread
and show the standard progress indicator for the "reading file"
part of the load operation.
The load operation can be canceled now.
Change-Id: I4cb3b762072ab4a0665dcf9d4a39d6d6630d22e8
Task-number: QTCREATORBUG-11822
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Trace data is saved in the background, progress is emitted, and
the save operation can be canceled. While data is being saved
the views are disabled and a semitransparent layer is put on top
of the trace view.
Task-number: QTCREATORBUG-11822
Change-Id: I94ec93147fb1788fc85939ddc591961d058050b5
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
The ones we'll refactor into the timeline library should be called
timeline* and the others should be called qmlprofiler*.
Change-Id: I6ecccbe4ef523681ca0baeef140368e2c1839964
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Avoid keeping multiple, potentially diverging copies of the same time
information and make sure all the times are consistent with each other.
Stating the times as properties allows us to use bindings in more
places, too.
Change-Id: I9cdd4f561ac22ad795939594ba340b1fbc070e9a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This allows us to reduce the amount of data we need to handle
if the user isn't interested in certain categories.
Task-number: QTBUG-41118
Change-Id: Ieaac12fb1dec29d6035642f433bc1a1d49e545c2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
At the end of QmlProfilerFileReader::load() we have a perfectly valid
set of types and events which we can just pass on to the model as-is.
Change-Id: I6981663f409c4647f4d5ae8a73b5d14cc701017b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
With EngineControl multiple QQuickViews can be profiled in one
profiler if they're all running in the same thread. As the QML
engines are never run in parallel then this results in useful
data.
Change-Id: I83a34fb81fd466c5cac838b096c1b1f322ded882
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Using strings to identify equal events is terribly inefficient. By
keeping a global list of event types we can assign each event a
numerical type index and use that to compare them.
We can also avoid excessive string copying and data duplication by
referring to the global type list where event type information is
needed.
Task-number: QTCREATORBUG-11823
Change-Id: I837bd5d0f5395b0003002ef8dd278fb27679c65d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We never have multi-string event data and dragging around the list
everywhere just adds noise.
Change-Id: I4c73543464abea01d342e3f0a296ed1b05ee2a88
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Generally save both the Message and RangeType attributes so that we
avoid clashes between those types. Also keep all the types in one
place and make their names follow qtdeclarative's conventions.
Change-Id: I811bfcc4b72aaa2a0142babc92d96968ed2d4007
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
If start and end times are initialized by clear() the change signals
may or may not be sent.
Change-Id: Ib50a2bbecf58791c5f93348e7450f4c0324f9d90
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This window is dynamically sized so that no integer overflows can occur
when using it in the timeline view instead of the whole trace time.
Task-number: QTCREATORBUG-11879
Change-Id: Id86faaf614b5f833e47ce26bb859b63eb09e7547
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
That is what the code in the main view expects of an empty trace and
it's also logically more coherent.
Task-number: QTCREATORBUG-11833
Change-Id: I78b90ca5332bfb004cabbb32c4eb3e7e83fd7187
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
There is no real reason for the existence of a QmlProfilerSimpleModel.
Change-Id: I6419973cfad5564913bf92f17fdcf7e529af4b01
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
They should both look up the source details when loading data
and they shouldn't do that again on gotoSourceLocation.
Change-Id: I433a4ff36a314822dff320ba4c8f398a6e3eaee3
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Without this you get lines like this on the console:
SOFT ASSERT: "m_state == Done || m_state == Empty" in file
[...]/qmlprofilermodelmanager.cpp, line 62
Change-Id: Ia3fb98cd5e9fb683e3265d0fd3ed1ca99784270d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We don't want to emit a signal for each event being added. That's
expensive and doesn't serve any purpose. We also don't have to save
the availability of data in QML as it isn't used anywhere.
Change-Id: I32db06a1955a7cfd6b569f50b81bf5278333b622
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Allow adding a weight to certain tasks so that the movement of the bar
gets smoother and update the progress from more places.
Change-Id: Ifb8331dc77116cc0464b3970cd6344fbbeacec41
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The model manager should only set its state to 'Done' if all models are
actually done. When that is the case it can safely emit dataAvailable,
too, freeing us of the need to apply a heuristic to the progress
percentage. In order to have a unified interface to the completion of
model processing an abstract base class for QML and V8 models is
introduced.
Task-number: QTCREATORBUG-11466
Change-Id: Id89c7ef5e24004baab7f37ee5486b69e7611aee0
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This allows us to steer the timeline models in a more fine grained
way and avoid duplicate processing of the same data. We don't need
to rebuild everything on stateChanged of the model manager then.
Task-number: QTCREATORBUG-10950
Change-Id: I2aa9a96a33c602f062fc3b644ac06280ba7cd45a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>