Code profiling information in terms of time spent, number of calls etc. More...
Public Member Functions | |
profilingInformation (profilingInformation *parent, const string &descr, const label id) | |
Construct from components. More... | |
~profilingInformation ()=default | |
Destructor. More... | |
label | id () const |
const string & | description () const |
profilingInformation & | parent () const |
label | calls () const |
scalar | totalTime () const |
scalar | childTime () const |
int | maxMem () const |
bool | active () const |
void | update (const scalar elapsedTime) |
Update it with a new timing information. More... | |
Ostream & | write (Ostream &os, const bool offset=false, const scalar elapsedTime=0, const scalar childTime=0) const |
Write the profiling times, optionally with additional values. More... | |
Protected Member Functions | |
profilingInformation () | |
Default construct - only the master-element. More... | |
void | setActive (bool state) const |
Mark as being active or passive) More... | |
profilingInformation (const profilingInformation &)=delete | |
No copy construct. More... | |
void | operator= (const profilingInformation &)=delete |
No copy assignment. More... | |
Friends | |
class | profiling |
Allow creation of master-element, setActive etc. More... | |
Code profiling information in terms of time spent, number of calls etc.
Definition at line 52 of file profilingInformation.H.
|
protected |
Default construct - only the master-element.
Definition at line 28 of file profilingInformation.C.
|
protecteddelete |
No copy construct.
profilingInformation | ( | profilingInformation * | parent, |
const string & | descr, | ||
const label | id | ||
) |
Construct from components.
Definition at line 42 of file profilingInformation.C.
|
default |
Destructor.
|
protected |
Mark as being active or passive)
Definition at line 75 of file profilingInformation.C.
Referenced by profiling::beginTimer(), and profiling::endTimer().
|
protecteddelete |
No copy assignment.
|
inline |
Definition at line 159 of file profilingInformation.H.
Referenced by profiling::create(), and profiling::unstack().
|
inline |
Definition at line 164 of file profilingInformation.H.
Referenced by profiling::unstack().
|
inline |
Definition at line 169 of file profilingInformation.H.
|
inline |
Definition at line 174 of file profilingInformation.H.
|
inline |
Definition at line 179 of file profilingInformation.H.
|
inline |
Definition at line 184 of file profilingInformation.H.
|
inline |
Definition at line 189 of file profilingInformation.H.
|
inline |
Definition at line 194 of file profilingInformation.H.
void update | ( | const scalar | elapsedTime | ) |
Update it with a new timing information.
Definition at line 61 of file profilingInformation.C.
Referenced by profiling::endTimer().
Foam::Ostream & write | ( | Ostream & | os, |
const bool | offset = false , |
||
const scalar | elapsedTime = 0 , |
||
const scalar | childTime = 0 |
||
) | const |
Write the profiling times, optionally with additional values.
Uses dictionary format.
Definition at line 82 of file profilingInformation.C.
References Ostream::beginBlock(), Ostream::endBlock(), Foam::name(), Switch::name(), os(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().
Referenced by Foam::operator<<().
|
friend |
Allow creation of master-element, setActive etc.
Definition at line 106 of file profilingInformation.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.