mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: rename Profiling -> profiling
This commit is contained in:
@ -59,7 +59,7 @@ Description
|
|||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
#include "decompositionModel.H"
|
#include "decompositionModel.H"
|
||||||
#include "fvMeshTools.H"
|
#include "fvMeshTools.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -929,7 +929,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// for the impatient who want to see some output files:
|
// for the impatient who want to see some output files:
|
||||||
Profiling::writeNow();
|
profiling::writeNow();
|
||||||
|
|
||||||
// Read geometry
|
// Read geometry
|
||||||
// ~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~
|
||||||
@ -1006,7 +1006,7 @@ int main(int argc, char *argv[])
|
|||||||
initialCellSize/defaultCellSize
|
initialCellSize/defaultCellSize
|
||||||
);
|
);
|
||||||
|
|
||||||
Profiling::writeNow();
|
profiling::writeNow();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1542,7 +1542,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Mesh refined in = "
|
Info<< "Mesh refined in = "
|
||||||
<< timer.cpuTimeIncrement() << " s." << endl;
|
<< timer.cpuTimeIncrement() << " s." << endl;
|
||||||
|
|
||||||
Profiling::writeNow();
|
profiling::writeNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wantSnap)
|
if (wantSnap)
|
||||||
@ -1592,7 +1592,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Mesh snapped in = "
|
Info<< "Mesh snapped in = "
|
||||||
<< timer.cpuTimeIncrement() << " s." << endl;
|
<< timer.cpuTimeIncrement() << " s." << endl;
|
||||||
|
|
||||||
Profiling::writeNow();
|
profiling::writeNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wantLayers)
|
if (wantLayers)
|
||||||
@ -1650,7 +1650,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Layers added in = "
|
Info<< "Layers added in = "
|
||||||
<< timer.cpuTimeIncrement() << " s." << endl;
|
<< timer.cpuTimeIncrement() << " s." << endl;
|
||||||
|
|
||||||
Profiling::writeNow();
|
profiling::writeNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1679,7 +1679,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Finished meshing without any errors" << endl;
|
Info<< "Finished meshing without any errors" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Profiling::writeNow();
|
profiling::writeNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1744,7 +1744,7 @@ int main(int argc, char *argv[])
|
|||||||
cellCentres.write();
|
cellCentres.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Profiling::writeNow();
|
profiling::writeNow();
|
||||||
|
|
||||||
Info<< "Finished meshing in = "
|
Info<< "Finished meshing in = "
|
||||||
<< runTime.elapsedCpuTime() << " s." << endl;
|
<< runTime.elapsedCpuTime() << " s." << endl;
|
||||||
|
|||||||
@ -3,8 +3,8 @@ global/global.Cver
|
|||||||
/* global/constants/dimensionedConstants.C in global.Cver */
|
/* global/constants/dimensionedConstants.C in global.Cver */
|
||||||
global/argList/argList.C
|
global/argList/argList.C
|
||||||
global/clock/clock.C
|
global/clock/clock.C
|
||||||
global/profiling/Profiling.C
|
global/profiling/profiling.C
|
||||||
global/profiling/ProfilingSysInfo.C
|
global/profiling/profilingSysInfo.C
|
||||||
|
|
||||||
bools = primitives/bools
|
bools = primitives/bools
|
||||||
$(bools)/bool/bool.C
|
$(bools)/bool/bool.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "PstreamReduceOps.H"
|
#include "PstreamReduceOps.H"
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ void Foam::Time::setMonitoring(bool forceProfiling)
|
|||||||
&& profilingDict->lookupOrDefault<Switch>("active", true)
|
&& profilingDict->lookupOrDefault<Switch>("active", true)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Profiling::initialize
|
profiling::initialize
|
||||||
(
|
(
|
||||||
*profilingDict,
|
*profilingDict,
|
||||||
IOobject
|
IOobject
|
||||||
@ -687,7 +687,7 @@ Foam::Time::~Time()
|
|||||||
functionObjects_.clear();
|
functionObjects_.clear();
|
||||||
|
|
||||||
// cleanup profiling
|
// cleanup profiling
|
||||||
Profiling::stop(*this);
|
profiling::stop(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "Pstream.H"
|
#include "Pstream.H"
|
||||||
#include "simpleObjectRegistry.H"
|
#include "simpleObjectRegistry.H"
|
||||||
#include "dimensionedConstants.H"
|
#include "dimensionedConstants.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
#include "functionObjectList.H"
|
#include "functionObjectList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
#include "ProfilingSysInfo.H"
|
#include "profilingSysInfo.H"
|
||||||
#include "cpuInfo.H"
|
#include "cpuInfo.H"
|
||||||
#include "memInfo.H"
|
#include "memInfo.H"
|
||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
@ -34,9 +34,9 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Profiling* Foam::Profiling::pool_(0);
|
Foam::profiling* Foam::profiling::pool_(0);
|
||||||
|
|
||||||
Foam::label Foam::Profiling::Information::nextId_(0);
|
Foam::label Foam::profiling::Information::nextId_(0);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||||
@ -52,13 +52,13 @@ inline static void writeEntry
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::Profiling::Information::getNextId()
|
Foam::label Foam::profiling::Information::getNextId()
|
||||||
{
|
{
|
||||||
return nextId_++;
|
return nextId_++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::Information::raiseID(label maxVal)
|
void Foam::profiling::Information::raiseID(label maxVal)
|
||||||
{
|
{
|
||||||
if (nextId_ < maxVal)
|
if (nextId_ < maxVal)
|
||||||
{
|
{
|
||||||
@ -67,17 +67,17 @@ void Foam::Profiling::Information::raiseID(label maxVal)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::Profiling::active()
|
bool Foam::profiling::active()
|
||||||
{
|
{
|
||||||
return pool_;
|
return pool_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::Profiling::writeNow()
|
bool Foam::profiling::writeNow()
|
||||||
{
|
{
|
||||||
if (pool_)
|
if (pool_)
|
||||||
{
|
{
|
||||||
Info<<"Profiling::writeNow() at time = "
|
Info<<"profiling::writeNow() at time = "
|
||||||
<< pool_->owner().timeName() << endl;
|
<< pool_->owner().timeName() << endl;
|
||||||
return pool_->write();
|
return pool_->write();
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ bool Foam::Profiling::writeNow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::initialize
|
void Foam::profiling::initialize
|
||||||
(
|
(
|
||||||
const IOobject& ioObj,
|
const IOobject& ioObj,
|
||||||
const Time& owner
|
const Time& owner
|
||||||
@ -101,7 +101,7 @@ void Foam::Profiling::initialize
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pool_ = new Profiling(ioObj, owner);
|
pool_ = new profiling(ioObj, owner);
|
||||||
|
|
||||||
Information *info = pool_->store
|
Information *info = pool_->store
|
||||||
(
|
(
|
||||||
@ -109,12 +109,12 @@ void Foam::Profiling::initialize
|
|||||||
);
|
);
|
||||||
|
|
||||||
pool_->push(info, pool_->clockTime_);
|
pool_->push(info, pool_->clockTime_);
|
||||||
Info<< "Profiling initialized" << nl;
|
Info<< "profiling initialized" << nl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::initialize
|
void Foam::profiling::initialize
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const IOobject& ioObj,
|
const IOobject& ioObj,
|
||||||
@ -128,7 +128,7 @@ void Foam::Profiling::initialize
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pool_ = new Profiling(dict, ioObj, owner);
|
pool_ = new profiling(dict, ioObj, owner);
|
||||||
|
|
||||||
Information *info = pool_->store
|
Information *info = pool_->store
|
||||||
(
|
(
|
||||||
@ -136,12 +136,12 @@ void Foam::Profiling::initialize
|
|||||||
);
|
);
|
||||||
|
|
||||||
pool_->push(info, pool_->clockTime_);
|
pool_->push(info, pool_->clockTime_);
|
||||||
Info<< "Profiling initialized" << nl;
|
Info<< "profiling initialized" << nl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::stop(const Time& owner)
|
void Foam::profiling::stop(const Time& owner)
|
||||||
{
|
{
|
||||||
if (pool_ && &owner == &(pool_->owner_))
|
if (pool_ && &owner == &(pool_->owner_))
|
||||||
{
|
{
|
||||||
@ -151,7 +151,7 @@ void Foam::Profiling::stop(const Time& owner)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Information* Foam::Profiling::New
|
Foam::profiling::Information* Foam::profiling::New
|
||||||
(
|
(
|
||||||
const string& name,
|
const string& name,
|
||||||
clockTime& timer
|
clockTime& timer
|
||||||
@ -177,7 +177,7 @@ Foam::Profiling::Information* Foam::Profiling::New
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::unstack(const Information *info)
|
void Foam::profiling::unstack(const Information *info)
|
||||||
{
|
{
|
||||||
if (pool_ && info)
|
if (pool_ && info)
|
||||||
{
|
{
|
||||||
@ -200,7 +200,7 @@ void Foam::Profiling::unstack(const Information *info)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Profiling::Profiling
|
Foam::profiling::profiling
|
||||||
(
|
(
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const Time& owner
|
const Time& owner
|
||||||
@ -218,7 +218,7 @@ Foam::Profiling::Profiling
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Profiling
|
Foam::profiling::profiling
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
@ -249,7 +249,7 @@ Foam::Profiling::Profiling
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Information::Information()
|
Foam::profiling::Information::Information()
|
||||||
:
|
:
|
||||||
id_(getNextId()),
|
id_(getNextId()),
|
||||||
description_("application::main"),
|
description_("application::main"),
|
||||||
@ -257,11 +257,12 @@ Foam::Profiling::Information::Information()
|
|||||||
calls_(0),
|
calls_(0),
|
||||||
totalTime_(0),
|
totalTime_(0),
|
||||||
childTime_(0),
|
childTime_(0),
|
||||||
|
maxMem_(0),
|
||||||
onStack_(false)
|
onStack_(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Information::Information
|
Foam::profiling::Information::Information
|
||||||
(
|
(
|
||||||
Information *parent,
|
Information *parent,
|
||||||
const string& descr
|
const string& descr
|
||||||
@ -277,23 +278,23 @@ Foam::Profiling::Information::Information
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Trigger::Trigger(const char* name)
|
Foam::profiling::Trigger::Trigger(const char* name)
|
||||||
:
|
:
|
||||||
clock_(),
|
clock_(),
|
||||||
ptr_(Profiling::New(name, clock_))
|
ptr_(profiling::New(name, clock_))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Trigger::Trigger(const string& name)
|
Foam::profiling::Trigger::Trigger(const string& name)
|
||||||
:
|
:
|
||||||
clock_(),
|
clock_(),
|
||||||
ptr_(Profiling::New(name, clock_))
|
ptr_(profiling::New(name, clock_))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Profiling::~Profiling()
|
Foam::profiling::~profiling()
|
||||||
{
|
{
|
||||||
deleteDemandDrivenData(sysInfo_);
|
deleteDemandDrivenData(sysInfo_);
|
||||||
deleteDemandDrivenData(cpuInfo_);
|
deleteDemandDrivenData(cpuInfo_);
|
||||||
@ -307,11 +308,11 @@ Foam::Profiling::~Profiling()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Information::~Information()
|
Foam::profiling::Information::~Information()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Trigger::~Trigger()
|
Foam::profiling::Trigger::~Trigger()
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
@ -319,25 +320,25 @@ Foam::Profiling::Trigger::~Trigger()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::Time& Foam::Profiling::owner() const
|
const Foam::Time& Foam::profiling::owner() const
|
||||||
{
|
{
|
||||||
return owner_;
|
return owner_;
|
||||||
}
|
}
|
||||||
|
|
||||||
Foam::label Foam::Profiling::size() const
|
Foam::label Foam::profiling::size() const
|
||||||
{
|
{
|
||||||
return stack_.size();
|
return stack_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Information* Foam::Profiling::find(const string& name)
|
Foam::profiling::Information* Foam::profiling::find(const string& name)
|
||||||
{
|
{
|
||||||
StorageContainer::iterator iter = hash_.find(name);
|
StorageContainer::iterator iter = hash_.find(name);
|
||||||
return (iter != hash_.end() ? iter() : 0);
|
return (iter != hash_.end() ? iter() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::Information::update(const scalar& elapsed)
|
void Foam::profiling::Information::update(const scalar& elapsed)
|
||||||
{
|
{
|
||||||
++calls_;
|
++calls_;
|
||||||
totalTime_ += elapsed;
|
totalTime_ += elapsed;
|
||||||
@ -349,7 +350,7 @@ void Foam::Profiling::Information::update(const scalar& elapsed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::Profiling::writeData(Ostream& os) const
|
bool Foam::profiling::writeData(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << indent << "profiling" << nl
|
os << indent << "profiling" << nl
|
||||||
<< indent << token::BEGIN_LIST << incrIndent << nl;
|
<< indent << token::BEGIN_LIST << incrIndent << nl;
|
||||||
@ -429,14 +430,14 @@ bool Foam::Profiling::writeData(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Profiling::Information* Foam::Profiling::store(Information *info)
|
Foam::profiling::Information* Foam::profiling::store(Information *info)
|
||||||
{
|
{
|
||||||
hash_.insert(info->description(), info);
|
hash_.insert(info->description(), info);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::push(Information *info, clockTime& timer)
|
void Foam::profiling::push(Information *info, clockTime& timer)
|
||||||
{
|
{
|
||||||
stack_.push(info);
|
stack_.push(info);
|
||||||
timers_.set(info->id(), &timer);
|
timers_.set(info->id(), &timer);
|
||||||
@ -444,7 +445,7 @@ void Foam::Profiling::push(Information *info, clockTime& timer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Profiling::Information* Foam::Profiling::pop()
|
Foam::profiling::Information* Foam::profiling::pop()
|
||||||
{
|
{
|
||||||
Information *info = stack_.pop();
|
Information *info = stack_.pop();
|
||||||
timers_.erase(info->id());
|
timers_.erase(info->id());
|
||||||
@ -454,37 +455,37 @@ Foam::Profiling::Information* Foam::Profiling::pop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::Profiling::Trigger::running() const
|
bool Foam::profiling::Trigger::running() const
|
||||||
{
|
{
|
||||||
return ptr_;
|
return ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::Trigger::stop()
|
void Foam::profiling::Trigger::stop()
|
||||||
{
|
{
|
||||||
if (ptr_)
|
if (ptr_)
|
||||||
{
|
{
|
||||||
ptr_->update(clock_.elapsedTime());
|
ptr_->update(clock_.elapsedTime());
|
||||||
Profiling::unstack(ptr_);
|
profiling::unstack(ptr_);
|
||||||
// pointer is managed by pool storage -> thus no delete here
|
// pointer is managed by pool storage -> thus no delete here
|
||||||
}
|
}
|
||||||
ptr_ = 0;
|
ptr_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::Information::push() const
|
void Foam::profiling::Information::push() const
|
||||||
{
|
{
|
||||||
onStack_ = true;
|
onStack_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Profiling::Information::pop() const
|
void Foam::profiling::Information::pop() const
|
||||||
{
|
{
|
||||||
onStack_ = false;
|
onStack_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Ostream& Foam::Profiling::Information::write
|
Foam::Ostream& Foam::profiling::Information::write
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const bool offset,
|
const bool offset,
|
||||||
@ -521,7 +522,7 @@ Foam::Ostream& Foam::Profiling::Information::write
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const Profiling::Information& info
|
const profiling::Information& info
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return info.write(os);
|
return info.write(os);
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::Profiling
|
Foam::profiling
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Code profiling.
|
Code profiling.
|
||||||
@ -44,12 +44,12 @@ Description
|
|||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
Profiling.C
|
profiling.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef Profiling_H
|
#ifndef profiling_H
|
||||||
#define Profiling_H
|
#define profiling_H
|
||||||
|
|
||||||
#include "HashPtrTable.H"
|
#include "HashPtrTable.H"
|
||||||
#include "LIFOStack.H"
|
#include "LIFOStack.H"
|
||||||
@ -69,10 +69,10 @@ class cpuInfo;
|
|||||||
class memInfo;
|
class memInfo;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Profiling Declaration
|
Class profiling Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class Profiling
|
class profiling
|
||||||
:
|
:
|
||||||
public regIOobject
|
public regIOobject
|
||||||
{
|
{
|
||||||
@ -89,7 +89,7 @@ private:
|
|||||||
// Private Static Data Members
|
// Private Static Data Members
|
||||||
|
|
||||||
//- Only one global pool object is possible
|
//- Only one global pool object is possible
|
||||||
static Profiling *pool_;
|
static profiling *pool_;
|
||||||
|
|
||||||
|
|
||||||
// Private Data Members
|
// Private Data Members
|
||||||
@ -126,10 +126,10 @@ private:
|
|||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
Profiling(const Profiling&) = delete;
|
profiling(const profiling&) = delete;
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const Profiling&) = delete;
|
void operator=(const profiling&) = delete;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -142,14 +142,14 @@ protected:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct IO object, everything enabled
|
//- Construct IO object, everything enabled
|
||||||
Profiling(const IOobject&, const Time&);
|
profiling(const IOobject&, const Time&);
|
||||||
|
|
||||||
//- Construct IO object with finer control over behaviour
|
//- Construct IO object with finer control over behaviour
|
||||||
Profiling(const dictionary&, const IOobject&, const Time&);
|
profiling(const dictionary&, const IOobject&, const Time&);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~Profiling();
|
~profiling();
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
@ -210,10 +210,10 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Profiling::Information Declaration
|
Class profiling::Information Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class Profiling::Information
|
class profiling::Information
|
||||||
{
|
{
|
||||||
// Private Static Data Members
|
// Private Static Data Members
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ protected:
|
|||||||
|
|
||||||
// Friendship
|
// Friendship
|
||||||
|
|
||||||
friend class Profiling;
|
friend class profiling;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -365,10 +365,10 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Profiling::Trigger Declaration
|
Class profiling::Trigger Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class Profiling::Trigger
|
class profiling::Trigger
|
||||||
{
|
{
|
||||||
// Private Data Members
|
// Private Data Members
|
||||||
|
|
||||||
@ -431,19 +431,18 @@ public:
|
|||||||
|
|
||||||
// Macros
|
// Macros
|
||||||
|
|
||||||
//- Define profiling with specified name and description correspond to the name
|
|
||||||
// \sa addProfiling
|
|
||||||
// \sa endProfiling
|
|
||||||
#define addProfiling0(name) \
|
|
||||||
Foam::Profiling::Trigger profilingTriggerFor##name(#name)
|
|
||||||
|
|
||||||
|
|
||||||
//- Define profiling with specified name and description string
|
//- Define profiling with specified name and description string
|
||||||
// This is required if the description contains space, colons etc.
|
// This is required if the description contains space, colons etc.
|
||||||
// \sa addProfiling0
|
// \sa addProfiling0
|
||||||
// \sa endProfiling
|
// \sa endProfiling
|
||||||
#define addProfiling(name,descr) \
|
#define addProfiling(name,descr) \
|
||||||
Foam::Profiling::Trigger profilingTriggerFor##name(descr)
|
::Foam::profiling::Trigger profilingTriggerFor##name(descr)
|
||||||
|
|
||||||
|
//- Define profiling with specified name and description correspond to the name
|
||||||
|
// \sa addProfiling
|
||||||
|
// \sa endProfiling
|
||||||
|
#define addProfiling0(name) \
|
||||||
|
::Foam::Profiling::Trigger profilingTriggerFor##name(#name)
|
||||||
|
|
||||||
|
|
||||||
//- Remove profiling with specified name
|
//- Remove profiling with specified name
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "ProfilingSysInfo.H"
|
#include "profilingSysInfo.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
#include "foamVersion.H"
|
#include "foamVersion.H"
|
||||||
|
|
||||||
@ -56,20 +56,20 @@ inline static void printEnv
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Profiling::sysInfo::sysInfo()
|
Foam::profiling::sysInfo::sysInfo()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Profiling::sysInfo::~sysInfo()
|
Foam::profiling::sysInfo::~sysInfo()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Ostream& Foam::Profiling::sysInfo::write
|
Foam::Ostream& Foam::profiling::sysInfo::write
|
||||||
(
|
(
|
||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
@ -22,20 +22,20 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::Profiling::SysInfo
|
Foam::profiling::sysInfo
|
||||||
|
|
||||||
Description
|
Description
|
||||||
General system information
|
General system information
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
ProfilingSysInfo.C
|
profilingSysInfo.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef ProfilingSysInfo_H
|
#ifndef profilingSysInfo_H
|
||||||
#define ProfilingSysInfo_H
|
#define profilingSysInfo_H
|
||||||
|
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -46,10 +46,10 @@ namespace Foam
|
|||||||
class Ostream;
|
class Ostream;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Profiling::sysInfo Declaration
|
Class profiling::sysInfo Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class Profiling::sysInfo
|
class profiling::sysInfo
|
||||||
{
|
{
|
||||||
// Private Static Data Members
|
// Private Static Data Members
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ protected:
|
|||||||
|
|
||||||
// Friendship
|
// Friendship
|
||||||
|
|
||||||
friend class Profiling;
|
friend class profiling;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -98,8 +98,7 @@ public:
|
|||||||
//- Update it with a new timing information
|
//- Update it with a new timing information
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
//- Write the profiling times, optionally with additional values
|
//- Write the profiling sys-info, use dictionary format.
|
||||||
// Use dictionary format.
|
|
||||||
Ostream& write(Ostream& os) const;
|
Ostream& write(Ostream& os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ SourceFiles
|
|||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
#include "solverPerformance.H"
|
#include "solverPerformance.H"
|
||||||
#include "InfoProxy.H"
|
#include "InfoProxy.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ public:
|
|||||||
//- Convergence tolerance relative to the initial
|
//- Convergence tolerance relative to the initial
|
||||||
scalar relTol_;
|
scalar relTol_;
|
||||||
|
|
||||||
Profiling::Trigger profiling_;
|
profiling::Trigger profiling_;
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "smoothSolver.H"
|
#include "smoothSolver.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
|
|
||||||
#include "LduMatrix.H"
|
#include "LduMatrix.H"
|
||||||
#include "diagTensorField.H"
|
#include "diagTensorField.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
|
|
||||||
#include "fvScalarMatrix.H"
|
#include "fvScalarMatrix.H"
|
||||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "IMULES.H"
|
#include "IMULES.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ License
|
|||||||
#include "fvmDdt.H"
|
#include "fvmDdt.H"
|
||||||
#include "fvmSup.H"
|
#include "fvmSup.H"
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "MULES.H"
|
#include "MULES.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ License
|
|||||||
#include "PatchInteractionModel.H"
|
#include "PatchInteractionModel.H"
|
||||||
#include "StochasticCollisionModel.H"
|
#include "StochasticCollisionModel.H"
|
||||||
#include "SurfaceFilmModel.H"
|
#include "SurfaceFilmModel.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ Description
|
|||||||
#include "localPointRegion.H"
|
#include "localPointRegion.H"
|
||||||
#include "externalDisplacementMeshMover.H"
|
#include "externalDisplacementMeshMover.H"
|
||||||
#include "scalarIOField.H"
|
#include "scalarIOField.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ License
|
|||||||
#include "localPointRegion.H"
|
#include "localPointRegion.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
#include "labelVector.H"
|
#include "labelVector.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ Description
|
|||||||
#include "localPointRegion.H"
|
#include "localPointRegion.H"
|
||||||
#include "PatchTools.H"
|
#include "PatchTools.H"
|
||||||
#include "refinementFeatures.H"
|
#include "refinementFeatures.H"
|
||||||
#include "Profiling.H"
|
#include "profiling.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user