MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / beginProfilingImpl

Method beginProfilingImpl

launcher/tools/JProfiler.cpp:43–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void JProfiler::beginProfilingImpl(shared_qobject_ptr<LaunchTask> process)
44{
45 listeningPort = globalSettings->get("JProfilerPort").toInt();
46 QProcess* profiler = new QProcess(this);
47 QStringList profilerArgs = { "-d", QString::number(process->pid()), "--gui", "-p", QString::number(listeningPort) };
48 auto basePath = globalSettings->get("JProfilerPath").toString();
49
50#ifdef Q_OS_WIN
51 QString profilerProgram = QDir(basePath).absoluteFilePath("bin/jpenable.exe");
52#else
53 QString profilerProgram = QDir(basePath).absoluteFilePath("bin/jpenable");
54#endif
55
56 profiler->setArguments(profilerArgs);
57 profiler->setProgram(profilerProgram);
58
59 connect(profiler, &QProcess::started, this, &JProfiler::profilerStarted);
60 connect(profiler, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &JProfiler::profilerFinished);
61
62 m_profilerProcess = profiler;
63 profiler->start();
64}
65
66void JProfilerFactory::registerSettings(SettingsObjectPtr settings)
67{

Callers

nothing calls this directly

Calls 5

pidMethod · 0.80
QDirClass · 0.50
getMethod · 0.45
toStringMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected