Commit 8587f2a1 authored by mark's avatar mark
Browse files

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

- patch from Bernhard Gschaider
parent aa73f2e3
...@@ -78,6 +78,15 @@ OptimisationSwitches ...@@ -78,6 +78,15 @@ OptimisationSwitches
stopAtWriteNowSignal -1; stopAtWriteNowSignal -1;
} }
/* Can specify fallback profiling settings
profiling
{
active true;
cpuInfo true;
memInfo false;
sysInfo true;
}
*/
DebugSwitches DebugSwitches
{ {
......
...@@ -324,6 +324,11 @@ void Foam::Time::setControls() ...@@ -324,6 +324,11 @@ void Foam::Time::setControls()
void Foam::Time::setMonitoring(const bool forceProfiling) void Foam::Time::setMonitoring(const bool forceProfiling)
{ {
const dictionary* profilingDict = controlDict_.subDictPtr("profiling"); const dictionary* profilingDict = controlDict_.subDictPtr("profiling");
if (!profilingDict)
{
// ... or from etc/controlDict
profilingDict = debug::controlDict().subDictPtr("profiling");
}
// initialize profiling on request // initialize profiling on request
// otherwise rely on profiling entry within controlDict // 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