| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Member Functions | Protected Member Functions | Private Attributes

# Google::CPUProfiler Class Reference

Auditor using the Google CPU Profiler. More...

`#include <GoogleAuditor.cpp>`

Inheritance diagram for Google::CPUProfiler:
[legend]
Collaboration diagram for Google::CPUProfiler:
[legend]

List of all members.

## Public Member Functions
| CPUProfiler (const std::string &name, ISvcLocator *pSvcLocator)
## Protected Member Functions
void | google_before (const std::string &s)
| Start the google tool.
void | google_after (const std::string &)
| stop the google tool
bool | alreadyRunning ()
| check if we are already running the tool
## Private Attributes
bool | m_running

## Detailed Description

Auditor using the Google CPU Profiler.

See

http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html

For more details on usage.

Author:
  Chris Jones

Date:
  18/04/2011

Definition at line 473 of file GoogleAuditor.cpp.

## Constructor & Destructor Documentation

Google::CPUProfiler::CPUProfiler | ( | const std::string & | name,
|  | ISvcLocator * | pSvcLocator
| ) |  | `[inline]`

Definition at line 478 of file GoogleAuditor.cpp.

          : AuditorBase ( name, pSvcLocator ),
            m_running   ( false )
        { }

## Member Function Documentation

bool Google::CPUProfiler::alreadyRunning | ( | ) | `[inline, protected, virtual]`

check if we are already running the tool

Implements Google::AuditorBase.

Definition at line 503 of file GoogleAuditor.cpp.

    { return m_running; }

void Google::CPUProfiler::google_after | ( | const std::string & | s ) | `[inline, protected, virtual]`

stop the google tool

Implements Google::AuditorBase.

Definition at line 494 of file GoogleAuditor.cpp.

        {
          if ( m_running )
          {
            ProfilerStop();
            m_running = false;
          }
        }

void Google::CPUProfiler::google_before | ( | const std::string & | s ) | `[inline, protected, virtual]`

Start the google tool.

Implements Google::AuditorBase.

Definition at line 485 of file GoogleAuditor.cpp.

        {
          if ( !m_running )
          {
            m_running = true;
            ProfilerStart((s+".prof").c_str());
          }
        }

## Member Data Documentation

bool Google::CPUProfiler::m_running`[private]`

Definition at line 507 of file GoogleAuditor.cpp.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiProfiling/src/component/google/GoogleAuditor.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines