ENH: improvements in profiling (issue #648)

- include amount of free system memory in profiling, which can give an
  indication of when swapping is about to start

- profilingSummary utility to collect profiling from parallel
  calculations. Collects profiling information from processor
  directories and summarize the time spent and number of calls as (max
  avg min) values.
This commit is contained in:
Mark Olesen
2017-12-01 15:44:20 +01:00
parent e83a9db2ea
commit 8fc6bd17c9
15 changed files with 573 additions and 141 deletions

View File

@ -40,6 +40,7 @@ int Foam::profiling::allowed
Foam::profiling* Foam::profiling::pool_(nullptr);
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
Foam::profilingInformation* Foam::profiling::find
@ -98,10 +99,8 @@ bool Foam::profiling::print(Ostream& os)
{
return pool_->writeData(os);
}
else
{
return false;
}
return false;
}
@ -109,12 +108,10 @@ bool Foam::profiling::writeNow()
{
if (active())
{
return pool_->write();
}
else
{
return false;
return pool_->regIOobject::write();
}
return false;
}
@ -189,7 +186,7 @@ Foam::profilingInformation* Foam::profiling::New
clockTime& timer
)
{
profilingInformation *info = 0;
profilingInformation *info = nullptr;
if (active())
{
@ -246,7 +243,7 @@ Foam::profiling::profiling
const Time& owner
)
:
regIOobject(io),
IOdictionary(io),
owner_(owner),
clockTime_(),
hash_(),
@ -265,7 +262,7 @@ Foam::profiling::profiling
const Time& owner
)
:
regIOobject(io),
IOdictionary(io),
owner_(owner),
clockTime_(),
hash_(),