profilingInformation Class Reference

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 stringdescription () const
 
profilingInformationparent () 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...
 
Ostreamwrite (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...
 

Detailed Description

Code profiling information in terms of time spent, number of calls etc.

Source files

Definition at line 56 of file profilingInformation.H.

Constructor & Destructor Documentation

◆ profilingInformation() [1/3]

profilingInformation ( )
protected

Default construct - only the master-element.

Definition at line 35 of file profilingInformation.C.

◆ profilingInformation() [2/3]

profilingInformation ( const profilingInformation )
protecteddelete

No copy construct.

◆ profilingInformation() [3/3]

profilingInformation ( profilingInformation parent,
const string descr,
const label  id 
)

Construct from components.

Definition at line 49 of file profilingInformation.C.

◆ ~profilingInformation()

~profilingInformation ( )
default

Destructor.

Member Function Documentation

◆ setActive()

void setActive ( bool  state) const
protected

Mark as being active or passive)

Definition at line 82 of file profilingInformation.C.

Referenced by profiling::beginTimer(), and profiling::endTimer().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const profilingInformation )
protecteddelete

No copy assignment.

◆ id()

label id ( ) const
inline

Definition at line 132 of file profilingInformation.H.

Referenced by profiling::create(), and profiling::unstack().

Here is the caller graph for this function:

◆ description()

const string& description ( ) const
inline

Definition at line 137 of file profilingInformation.H.

Referenced by profiling::unstack().

Here is the caller graph for this function:

◆ parent()

profilingInformation& parent ( ) const
inline

Definition at line 142 of file profilingInformation.H.

◆ calls()

label calls ( ) const
inline

Definition at line 147 of file profilingInformation.H.

◆ totalTime()

scalar totalTime ( ) const
inline

Definition at line 152 of file profilingInformation.H.

◆ childTime()

scalar childTime ( ) const
inline

Definition at line 157 of file profilingInformation.H.

◆ maxMem()

int maxMem ( ) const
inline

Definition at line 162 of file profilingInformation.H.

◆ active()

bool active ( ) const
inline

Definition at line 167 of file profilingInformation.H.

◆ update()

void update ( const scalar  elapsedTime)

Update it with a new timing information.

Definition at line 68 of file profilingInformation.C.

Referenced by profiling::endTimer().

Here is the caller graph for this function:

◆ write()

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 89 of file profilingInformation.C.

References Ostream::beginBlock(), Ostream::endBlock(), Foam::name(), Switch::name(), os(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().

Referenced by Foam::operator<<().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ profiling

friend class profiling
friend

Allow creation of master-element, setActive etc.

Definition at line 91 of file profilingInformation.H.


The documentation for this class was generated from the following files: