Loading...
Searching...
No Matches
profilingInformation Class Reference

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

#include <profilingInformation.H>

Public Member Functions

 profilingInformation (profilingInformation *parent, const std::string &descr, const label id)
 Construct from components.
 ~profilingInformation ()=default
 Destructor.
label id () const noexcept
const std::string & description () const noexcept
profilingInformationparent () const noexcept
label calls () const noexcept
scalar totalTime () const noexcept
scalar childTime () const noexcept
int maxMem () const noexcept
bool active () const noexcept
void update (const scalar elapsedTime)
 Update it with a new timing information.
Ostreamwrite (Ostream &os, const bool offset=false, const scalar elapsedTime=0, const scalar childTime=0) const
 Write the profiling times, optionally with additional values.

Protected Member Functions

 profilingInformation ()
 Default construct - only the master-element.
 profilingInformation (const profilingInformation &)=delete
 No copy construct.
void operator= (const profilingInformation &)=delete
 No copy assignment.
void setActive (bool state) const
 Mark as being active or passive.

Friends

class profiling
 Allow creation of master-element, setActive etc.

Detailed Description

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

Source files

Definition at line 52 of file profilingInformation.H.

Constructor & Destructor Documentation

◆ profilingInformation() [1/3]

profilingInformation ( )
protected

Default construct - only the master-element.

Definition at line 28 of file profilingInformation.C.

Referenced by operator=(), parent(), profilingInformation(), and profilingInformation().

Here is the caller graph for this function:

◆ profilingInformation() [2/3]

profilingInformation ( const profilingInformation & )
protecteddelete

No copy construct.

References profilingInformation().

Here is the call graph for this function:

◆ profilingInformation() [3/3]

profilingInformation ( profilingInformation * parent,
const std::string & descr,
const label id )

Construct from components.

Definition at line 41 of file profilingInformation.C.

References id(), parent(), and profilingInformation().

Here is the call graph for this function:

◆ ~profilingInformation()

~profilingInformation ( )
default

Destructor.

Member Function Documentation

◆ operator=()

void operator= ( const profilingInformation & )
protecteddelete

No copy assignment.

References parent(), and profilingInformation().

Here is the call graph for this function:

◆ setActive()

void setActive ( bool state) const
protected

Mark as being active or passive.

Definition at line 75 of file profilingInformation.C.

◆ id()

label id ( ) const
inlinenoexcept

Definition at line 159 of file profilingInformation.H.

References Foam::noexcept.

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

Here is the caller graph for this function:

◆ description()

const std::string & description ( ) const
inlinenoexcept

Definition at line 161 of file profilingInformation.H.

References Foam::noexcept.

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

Here is the caller graph for this function:

◆ parent()

profilingInformation & parent ( ) const
inlinenoexcept

Definition at line 163 of file profilingInformation.H.

References Foam::noexcept, and profilingInformation().

Referenced by operator=(), profilingInformation(), and write().

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

◆ calls()

label calls ( ) const
inlinenoexcept

Definition at line 165 of file profilingInformation.H.

References Foam::noexcept.

Referenced by write().

Here is the caller graph for this function:

◆ totalTime()

scalar totalTime ( ) const
inlinenoexcept

Definition at line 167 of file profilingInformation.H.

References Foam::noexcept.

Referenced by write().

Here is the caller graph for this function:

◆ childTime()

scalar childTime ( ) const
inlinenoexcept

Definition at line 169 of file profilingInformation.H.

References Foam::noexcept.

Referenced by write().

Here is the caller graph for this function:

◆ maxMem()

int maxMem ( ) const
inlinenoexcept

Definition at line 171 of file profilingInformation.H.

References Foam::noexcept.

◆ active()

bool active ( ) const
inlinenoexcept

Definition at line 173 of file profilingInformation.H.

References Foam::noexcept.

Referenced by write().

Here is the caller graph for this function:

◆ update()

void update ( const scalar elapsedTime)

Update it with a new timing information.

Definition at line 61 of file profilingInformation.C.

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

References active(), calls(), childTime(), description(), Foam::name(), Switch::name(), os(), parent(), and totalTime().

Referenced by Foam::operator<<().

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

◆ profiling

friend class profiling
friend

Allow creation of master-element, setActive etc.

Definition at line 106 of file profilingInformation.H.

References profiling.

Referenced by profiling.


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