|
Squid Web Cache v8/master
|
#include <HierarchyLogEntry.h>
Public Member Functions | |
| HierarchyLogEntry () | |
| void | resetPeerNotes (const Comm::ConnectionPointer &server, const char *requestedHost) |
| void | notePeerRead () |
| void | notePeerWrite () |
| bool | peerResponseTime (struct timeval &responseTime) |
Public Attributes | |
| hier_code | code |
| char | host [SQUIDHOSTNAMELEN] |
| ping_data | ping |
| char | cd_host [SQUIDHOSTNAMELEN] |
| lookup_t | cd_lookup |
| int | n_choices |
| int | n_ichoices |
| struct timeval | peer_select_start |
| struct timeval | store_complete_stop |
| Http::StatusCode | peer_reply_status |
| last HTTP status code received | |
| Comm::ConnectionPointer | tcpServer |
| TCP/IP level details of the last peer/server connection. | |
| int64_t | bodyBytesRead |
| number of body bytes received from the next hop or -1 | |
| Stopwatch | totalPeeringTime |
| cumulative time spent (so far) communicating with all peers (see %<tt) | |
Private Member Functions | |
| void | clearPeerNotes () |
| forget previous notePeerRead() and notePeerWrite() calls (if any) | |
Private Attributes | |
| struct timeval | peer_last_read_ |
| time of the last read from the last peer | |
| struct timeval | peer_last_write_ |
| time of the last write to the last peer | |
Maintains peer selection details and peer I/O stats. Here, "peer" is an origin server or CachePeer.
Definition at line 23 of file HierarchyLogEntry.h.
| HierarchyLogEntry::HierarchyLogEntry | ( | ) |
Definition at line 171 of file access_log.cc.
References cd_host, clearPeerNotes(), host, peer_select_start, SQUIDHOSTNAMELEN, and store_complete_stop.
|
private |
Definition at line 215 of file access_log.cc.
References bodyBytesRead, peer_last_read_, and peer_last_write_.
Referenced by HierarchyLogEntry(), and resetPeerNotes().
| void HierarchyLogEntry::notePeerRead | ( | ) |
Account for a TCP peer read. Maintains peer response time stats (%<pt). Call this after each successful peer socket read(2).
Definition at line 227 of file access_log.cc.
References current_time, and peer_last_read_.
Referenced by HttpStateData::readReply(), and TunnelStateData::readServer().
| void HierarchyLogEntry::notePeerWrite | ( | ) |
Account for a TCP peer write. Maintains peer response time stats (%<pt). Call this after each peer socket write(2), including failed ones.
Definition at line 233 of file access_log.cc.
References current_time, and peer_last_write_.
Referenced by Client::sentRequestBody(), TunnelStateData::writeServerDone(), and HttpStateData::wroteLast().
| bool HierarchyLogEntry::peerResponseTime | ( | struct timeval & | responseTime | ) |
Estimates response generation and sending delay at the last peer.
responseTime) is available. Definition at line 239 of file access_log.cc.
References peer_last_read_, peer_last_write_, and tvSub().
Referenced by Format::Format::assemble(), and StoreEntry::timestampsSet().
| void HierarchyLogEntry::resetPeerNotes | ( | const Comm::ConnectionPointer & | server, |
| const char * | requestedHost | ||
| ) |
Start recording new origin server or cache peer connection details. Call this when trying to connect to a peer.
Definition at line 193 of file access_log.cc.
References clearPeerNotes(), code, Comm::Connection::getPeer(), HIER_NONE, host, CachePeer::name, Comm::Connection::peerType, server, tcpServer, and xstrncpy().
Referenced by switchToTunnel(), FwdState::syncHierNote(), and TunnelStateData::syncHierNote().
| int64_t HierarchyLogEntry::bodyBytesRead |
Definition at line 60 of file HierarchyLogEntry.h.
Referenced by Client::adjustBodyBytesRead(), Format::Format::assemble(), and clearPeerNotes().
| char HierarchyLogEntry::cd_host[SQUIDHOSTNAMELEN] |
Definition at line 49 of file HierarchyLogEntry.h.
Referenced by HierarchyLogEntry(), and peerNoteDigestLookup().
| lookup_t HierarchyLogEntry::cd_lookup |
Definition at line 50 of file HierarchyLogEntry.h.
Referenced by peerNoteDigestLookup().
| hier_code HierarchyLogEntry::code |
Definition at line 46 of file HierarchyLogEntry.h.
Referenced by ClientHttpRequest::~ClientHttpRequest(), Format::Format::assemble(), clientUpdateHierCounters(), Log::Format::HttpdCombined(), Log::Format::HttpdCommon(), resetPeerNotes(), clientReplyContext::sendMoreData(), and Log::Format::SquidNative().
| char HierarchyLogEntry::host[SQUIDHOSTNAMELEN] |
Definition at line 47 of file HierarchyLogEntry.h.
Referenced by HierarchyLogEntry(), accessLogLogTo(), Format::Format::assemble(), ErrorState::compileLegacyCode(), ErrorState::Dump(), and resetPeerNotes().
| int HierarchyLogEntry::n_choices |
Definition at line 51 of file HierarchyLogEntry.h.
Referenced by neighborsDigestSelect().
| int HierarchyLogEntry::n_ichoices |
Definition at line 52 of file HierarchyLogEntry.h.
Referenced by neighborsDigestSelect().
|
private |
Definition at line 68 of file HierarchyLogEntry.h.
Referenced by clearPeerNotes(), notePeerRead(), and peerResponseTime().
|
private |
Definition at line 69 of file HierarchyLogEntry.h.
Referenced by clearPeerNotes(), notePeerWrite(), and peerResponseTime().
| Http::StatusCode HierarchyLogEntry::peer_reply_status |
Definition at line 58 of file HierarchyLogEntry.h.
Referenced by Format::Format::assemble(), TunnelStateData::checkRetry(), HttpStateData::processReplyHeader(), and TunnelStateData::startConnecting().
| struct timeval HierarchyLogEntry::peer_select_start |
Definition at line 54 of file HierarchyLogEntry.h.
Referenced by HierarchyLogEntry(), and peerSelect().
| ping_data HierarchyLogEntry::ping |
Definition at line 48 of file HierarchyLogEntry.h.
Referenced by Format::Format::assemble(), clientUpdateHierCounters(), PeerSelector::handlePath(), PeerSelector::resolveSelected(), and Log::Format::SquidNative().
| struct timeval HierarchyLogEntry::store_complete_stop |
Definition at line 56 of file HierarchyLogEntry.h.
Referenced by HierarchyLogEntry(), and StoreEntry::complete().
| Comm::ConnectionPointer HierarchyLogEntry::tcpServer |
Definition at line 59 of file HierarchyLogEntry.h.
Referenced by Format::Format::assemble(), ErrorState::compileLegacyCode(), resetPeerNotes(), and Log::Format::SquidNative().
| Stopwatch HierarchyLogEntry::totalPeeringTime |
Definition at line 63 of file HierarchyLogEntry.h.
Referenced by Format::Format::assemble(), and PeeringActivityTimer::timer().