Commit 27776b09 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: support default profiling settings from etc/controlDict (issue #441)

- patch from Bernhard Gschaider
parent befb49af
......@@ -78,6 +78,15 @@ OptimisationSwitches
stopAtWriteNowSignal -1;
}
/* Can specify fallback profiling settings
profiling
{
active true;
cpuInfo true;
memInfo false;
sysInfo true;
}
*/
DebugSwitches
{
......
......@@ -324,6 +324,11 @@ void Foam::Time::setControls()
void Foam::Time::setMonitoring(const bool forceProfiling)
{
const dictionary* profilingDict = controlDict_.subDictPtr("profiling");
if (!profilingDict)
{
// ... or from etc/controlDict
profilingDict = debug::controlDict().subDictPtr("profiling");
}
// initialize profiling on request
// otherwise rely on profiling entry within controlDict
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment