mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add possibility to enable/disable profiling globally (issue #441)
- use InfoSwitch to disable, or via static method. - respect the state of the argList banner when deciding to emit initialization information. Can otherwise end up with unwanted output rubbish on things like foamDictionary and foamListTimes.
This commit is contained in:
@ -112,6 +112,7 @@ Usage
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "profiling.H"
|
||||
#include "Time.H"
|
||||
#include "IFstream.H"
|
||||
#include "OFstream.H"
|
||||
@ -289,6 +290,7 @@ int main(int argc, char *argv[])
|
||||
"disableFunctionEntries",
|
||||
"Disable expansion of dictionary directives - #include, #codeStream etc"
|
||||
);
|
||||
profiling::disable(); // Disable profiling (and its output)
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ Usage
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "profiling.H"
|
||||
#include "timeSelector.H"
|
||||
#include "Time.H"
|
||||
|
||||
@ -70,6 +71,8 @@ int main(int argc, char *argv[])
|
||||
"rm",
|
||||
"remove selected time directories"
|
||||
);
|
||||
profiling::disable(); // Disable profiling (and its output)
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
label nProcs = 0;
|
||||
|
||||
@ -62,6 +62,7 @@ Note
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "profiling.H"
|
||||
#include "Time.H"
|
||||
|
||||
#include "UnsortedMeshedSurfaces.H"
|
||||
@ -98,6 +99,7 @@ int main(int argc, char *argv[])
|
||||
"xml",
|
||||
"write output in XML format"
|
||||
);
|
||||
profiling::disable(); // Disable profiling (and its output)
|
||||
|
||||
argList args(argc, argv);
|
||||
Time runTime(args.rootPath(), args.caseName());
|
||||
|
||||
Reference in New Issue
Block a user