#include <FwdState.h>

Collaboration diagram for PeeringActivityTimer:

Public Member Functions

 PeeringActivityTimer (const HttpRequestPointer &)
 resumes timer More...
 
 ~PeeringActivityTimer ()
 pauses timer if stop() has not been called More...
 
void stop ()
 pauses timer if stop() has not been called More...
 

Private Member Functions

Stopwatchtimer ()
 managed Stopwatch object within HierarchyLogEntry More...
 

Private Attributes

HttpRequestPointer request
 the owner of managed HierarchyLogEntry More...
 
bool stopped = false
 Whether the task is done participating in the managed activity. More...
 

Detailed Description

Eliminates excessive Stopwatch pause() calls in a task with multiple code locations that pause a stopwatch. Ideally, there would be just one such location (e.g., a task class destructor), but current code idiosyncrasies necessitate this state. For simplicity sake, this class currently manages a Stopwatch at a hard-coded location: HttpRequest::hier.totalPeeringTime.

Definition at line 57 of file FwdState.h.

Constructor & Destructor Documentation

◆ PeeringActivityTimer()

PeeringActivityTimer::PeeringActivityTimer ( const HttpRequestPointer r)

Definition at line 1585 of file FwdState.cc.

References Assure, request, Stopwatch::resume(), and timer().

◆ ~PeeringActivityTimer()

PeeringActivityTimer::~PeeringActivityTimer ( )

Definition at line 1591 of file FwdState.cc.

References stop().

Member Function Documentation

◆ stop()

void PeeringActivityTimer::stop ( )
inline

◆ timer()

Stopwatch & PeeringActivityTimer::timer ( )
private

Definition at line 1597 of file FwdState.cc.

References HttpRequest::hier, request, and HierarchyLogEntry::totalPeeringTime.

Referenced by PeeringActivityTimer(), and stop().

Member Data Documentation

◆ request

HttpRequestPointer PeeringActivityTimer::request
private

Definition at line 77 of file FwdState.h.

Referenced by PeeringActivityTimer(), and timer().

◆ stopped

bool PeeringActivityTimer::stopped = false
private

Definition at line 83 of file FwdState.h.

Referenced by stop().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors