forked from qt-creator/qt-creator
Add -profile option that dumps plugin load/initialization times.
Reviewed-by: con
This commit is contained in:
@@ -34,9 +34,10 @@
|
||||
using namespace ExtensionSystem;
|
||||
using namespace ExtensionSystem::Internal;
|
||||
|
||||
static const char *END_OF_OPTIONS = "--";
|
||||
static const char END_OF_OPTIONS[] = "--";
|
||||
const char *OptionsParser::NO_LOAD_OPTION = "-noload";
|
||||
const char *OptionsParser::TEST_OPTION = "-test";
|
||||
const char *OptionsParser::PROFILE_OPTION = "-profile";
|
||||
|
||||
OptionsParser::OptionsParser(const QStringList &args,
|
||||
const QMap<QString, bool> &appOptions,
|
||||
@@ -69,6 +70,8 @@ bool OptionsParser::parse()
|
||||
break;
|
||||
if (checkForNoLoadOption())
|
||||
continue;
|
||||
if (checkForProfilingOption())
|
||||
continue;
|
||||
if (checkForTestOption())
|
||||
continue;
|
||||
if (checkForAppOption())
|
||||
@@ -148,6 +151,14 @@ bool OptionsParser::checkForAppOption()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OptionsParser::checkForProfilingOption()
|
||||
{
|
||||
if (m_currentArg != QLatin1String(PROFILE_OPTION))
|
||||
return false;
|
||||
m_pmPrivate->initProfiling();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OptionsParser::checkForPluginOption()
|
||||
{
|
||||
bool requiresParameter;
|
||||
|
||||
Reference in New Issue
Block a user