mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: profiling dictionary could be binary/compressed (fixed #157)
BUG: memInfo not activated by -profiling option (fixed #157)
This commit is contained in:
@ -336,16 +336,28 @@ void Foam::Time::setControls()
|
|||||||
|
|
||||||
void Foam::Time::setMonitoring(bool forceProfiling)
|
void Foam::Time::setMonitoring(bool forceProfiling)
|
||||||
{
|
{
|
||||||
// initialize profiling on request
|
const dictionary* profilingDict = controlDict_.subDictPtr("profiling");
|
||||||
// skip if 'active' keyword is explicitly set to false
|
|
||||||
const dictionary* profilingDict =
|
|
||||||
(
|
|
||||||
forceProfiling
|
|
||||||
? &dictionary::null
|
|
||||||
: controlDict_.subDictPtr("profiling")
|
|
||||||
);
|
|
||||||
|
|
||||||
if
|
// initialize profiling on request
|
||||||
|
// otherwise rely on profiling entry within controlDict
|
||||||
|
// and skip if 'active' keyword is explicitly set to false
|
||||||
|
if (forceProfiling)
|
||||||
|
{
|
||||||
|
profiling::initialize
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"profiling",
|
||||||
|
timeName(),
|
||||||
|
"uniform",
|
||||||
|
*this,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
*this
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if
|
||||||
(
|
(
|
||||||
profilingDict
|
profilingDict
|
||||||
&& profilingDict->lookupOrDefault<Switch>("active", true)
|
&& profilingDict->lookupOrDefault<Switch>("active", true)
|
||||||
|
|||||||
@ -438,6 +438,22 @@ bool Foam::profiling::writeData(Ostream& os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::profiling::writeObject
|
||||||
|
(
|
||||||
|
IOstream::streamFormat,
|
||||||
|
IOstream::versionNumber ver,
|
||||||
|
IOstream::compressionType
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return regIOobject::writeObject
|
||||||
|
(
|
||||||
|
IOstream::ASCII,
|
||||||
|
ver,
|
||||||
|
IOstream::UNCOMPRESSED
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::profiling::Information* Foam::profiling::store(Information *info)
|
Foam::profiling::Information* Foam::profiling::store(Information *info)
|
||||||
|
|||||||
@ -207,6 +207,14 @@ public:
|
|||||||
//- writeData member function required by regIOobject
|
//- writeData member function required by regIOobject
|
||||||
virtual bool writeData(Ostream&) const;
|
virtual bool writeData(Ostream&) const;
|
||||||
|
|
||||||
|
//- Write as uncompressed ASCII, using given format
|
||||||
|
virtual bool writeObject
|
||||||
|
(
|
||||||
|
IOstream::streamFormat ignoreAlwaysASCII,
|
||||||
|
IOstream::versionNumber ver,
|
||||||
|
IOstream::compressionType ignoreAlwaysUncompressed
|
||||||
|
) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user