QmlProfiler: Expose flush interval to user

Flushing data while the application is running can distort the results
because the flushing itself takes time. However, not flushing leads to
longer load times in the end and higher memory usage. The best strategy
depends on the application being analyzed and the users should decide
if they want to flush or not.

The settings infrastructure also paves the way for preserviing the
layout of the timeline and statistics views as well as the category
filters across sessions.

Change-Id: I2cdc37c7fc7eb9b05b6870955ddffaa712d6c956
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-08-28 12:50:46 +02:00
parent bd9b487584
commit f1ede40500
21 changed files with 691 additions and 3 deletions

View File

@@ -30,7 +30,7 @@
#include "qmlprofilerplugin.h"
#include "qmlprofilerruncontrolfactory.h"
#include "qmlprofileroptionspage.h"
#include "qmlprofilertool.h"
#include "qmlprofilertimelinemodel.h"
@@ -44,6 +44,8 @@ using namespace Analyzer;
namespace QmlProfiler {
namespace Internal {
Q_GLOBAL_STATIC(QmlProfilerSettings, qmlProfilerGlobalSettings)
bool QmlProfilerPlugin::debugOutput = false;
QmlProfilerPlugin *QmlProfilerPlugin::instance = 0;
@@ -91,6 +93,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
AnalyzerManager::addAction(action);
addAutoReleasedObject(new QmlProfilerRunControlFactory());
addAutoReleasedObject(new Internal::QmlProfilerOptionsPage());
QmlProfilerPlugin::instance = this;
return true;
@@ -117,5 +120,10 @@ QList<QmlProfilerTimelineModel *> QmlProfilerPlugin::getModels(QmlProfilerModelM
return QList<QmlProfilerTimelineModel *>();
}
QmlProfilerSettings *QmlProfilerPlugin::globalSettings()
{
return qmlProfilerGlobalSettings();
}
} // namespace Internal
} // namespace QmlProfiler