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...
 

Protected Member Functions

 profilingInformation ()
 Construct null - only the master-element. More...
 
void setActive (bool state) const
 Mark as being active or passive) 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...
 

Friends

class profiling
 
Ostreamoperator<< (Ostream &os, const profilingInformation &info)
 

Detailed Description

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

Source files

Definition at line 60 of file profilingInformation.H.

Constructor & Destructor Documentation

◆ profilingInformation() [1/2]

profilingInformation ( )
protected

Construct null - only the master-element.

Definition at line 35 of file profilingInformation.C.

◆ profilingInformation() [2/2]

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:

◆ write()

Foam::Ostream & write ( Ostream os,
const bool  offset = false,
const scalar  elapsedTime = 0,
const scalar  childTime = 0 
) const
protected

Write the profiling times, optionally with additional values.

Use dictionary format.

Definition at line 89 of file profilingInformation.C.

References Ostream::beginBlock(), Ostream::endBlock(), Foam::name(), 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:

◆ id()

label id ( ) const
inline

Definition at line 149 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 155 of file profilingInformation.H.

Referenced by profiling::unstack().

Here is the caller graph for this function:

◆ parent()

profilingInformation& parent ( ) const
inline

Definition at line 161 of file profilingInformation.H.

◆ calls()

label calls ( ) const
inline

Definition at line 167 of file profilingInformation.H.

◆ totalTime()

scalar totalTime ( ) const
inline

Definition at line 173 of file profilingInformation.H.

◆ childTime()

scalar childTime ( ) const
inline

Definition at line 179 of file profilingInformation.H.

◆ maxMem()

int maxMem ( ) const
inline

Definition at line 185 of file profilingInformation.H.

◆ active()

bool active ( ) const
inline

Definition at line 191 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:

Friends And Related Function Documentation

◆ profiling

friend class profiling
friend

Definition at line 103 of file profilingInformation.H.

◆ operator<<

Ostream& operator<< ( Ostream os,
const profilingInformation info 
)
friend

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