|
Squid Web Cache master
|
#include <FwdState.h>
Public Member Functions | |
| PeeringActivityTimer (const HttpRequestPointer &) | |
| resumes timer | |
| ~PeeringActivityTimer () | |
| pauses timer if stop() has not been called | |
| void | stop () |
| pauses timer if stop() has not been called | |
Private Member Functions | |
| Stopwatch & | timer () |
| managed Stopwatch object within HierarchyLogEntry | |
Private Attributes | |
| HttpRequestPointer | request |
| the owner of managed HierarchyLogEntry | |
| bool | stopped = false |
| Whether the task is done participating in the managed activity. | |
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.
| PeeringActivityTimer::PeeringActivityTimer | ( | const HttpRequestPointer & | r | ) |
Definition at line 1585 of file FwdState.cc.
References Assure, request, Stopwatch::resume(), and timer().
| PeeringActivityTimer::~PeeringActivityTimer | ( | ) |
Definition at line 1591 of file FwdState.cc.
References stop().
|
inline |
Definition at line 64 of file FwdState.h.
References Stopwatch::pause(), stopped, and timer().
Referenced by ~PeeringActivityTimer(), TunnelStateData::retryOrBail(), TunnelStateData::sendError(), TunnelStateData::serverClosed(), and FwdState::stopAndDestroy().
|
private |
Definition at line 1597 of file FwdState.cc.
References HttpRequest::hier, request, and HierarchyLogEntry::totalPeeringTime.
Referenced by PeeringActivityTimer(), and stop().
|
private |
Definition at line 77 of file FwdState.h.
Referenced by PeeringActivityTimer(), and timer().
|
private |
Definition at line 83 of file FwdState.h.
Referenced by stop().