#include <FwdState.h>

| 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 | |
| Stopwatch & | timer () | 
| 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()
| 
 | inline | 
Definition at line 64 of file FwdState.h.
References Stopwatch::pause(), stopped, and timer().
Referenced by TunnelStateData::retryOrBail(), TunnelStateData::sendError(), TunnelStateData::serverClosed(), FwdState::stopAndDestroy(), and ~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
| 
 | private | 
Definition at line 77 of file FwdState.h.
Referenced by PeeringActivityTimer(), and timer().
◆ stopped
| 
 | private | 
Definition at line 83 of file FwdState.h.
Referenced by stop().
The documentation for this class was generated from the following files:
- src/FwdState.h
- src/FwdState.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
