HierarchyLogEntry.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_SRC_HIERARCHYLOGENTRY_H
10 #define SQUID_SRC_HIERARCHYLOGENTRY_H
11 
12 #include "base/Stopwatch.h"
13 #include "comm/Connection.h"
14 #include "enums.h"
15 #include "hier_code.h"
16 #include "http/StatusCode.h"
17 #include "lookup_t.h"
18 #include "PingData.h"
19 #include "rfc2181.h"
20 
24 {
25 
26 public:
28 
31  void resetPeerNotes(const Comm::ConnectionPointer &server, const char *requestedHost);
32 
35  void notePeerRead();
36 
39  void notePeerWrite();
40 
43  bool peerResponseTime(struct timeval &responseTime);
44 
45 public:
49  char cd_host[SQUIDHOSTNAMELEN]; /* the host of selected by cd peer */
50  lookup_t cd_lookup; /* cd prediction: none, miss, hit */
51  int n_choices; /* #peers we selected from (cd only) */
52  int n_ichoices; /* #peers with known rtt we selected from (cd only) */
53 
54  struct timeval peer_select_start;
55 
56  struct timeval store_complete_stop;
57 
60  int64_t bodyBytesRead;
61 
64 
65 private:
66  void clearPeerNotes();
67 
68  struct timeval peer_last_read_;
69  struct timeval peer_last_write_;
70 };
71 
72 #endif /* SQUID_SRC_HIERARCHYLOGENTRY_H */
73 
struct timeval peer_last_write_
time of the last write to the last peer
Http::StatusCode peer_reply_status
last HTTP status code received
StatusCode
Definition: StatusCode.h:20
void clearPeerNotes()
forget previous notePeerRead() and notePeerWrite() calls (if any)
Definition: access_log.cc:215
char cd_host[SQUIDHOSTNAMELEN]
struct timeval store_complete_stop
ICP probing of cache_peers during peer selection.
Definition: PingData.h:25
struct timeval peer_select_start
struct timeval peer_last_read_
time of the last read from the last peer
bool peerResponseTime(struct timeval &responseTime)
Definition: access_log.cc:239
lookup_t
Definition: lookup_t.h:12
int64_t bodyBytesRead
number of body bytes received from the next hop or -1
Comm::ConnectionPointer tcpServer
TCP/IP level details of the last peer/server connection.
static char server[MAXLINE]
hier_code
Definition: hier_code.h:12
void resetPeerNotes(const Comm::ConnectionPointer &server, const char *requestedHost)
Definition: access_log.cc:193
char host[SQUIDHOSTNAMELEN]
Stopwatch totalPeeringTime
cumulative time spent (so far) communicating with all peers (see %<tt)
#define SQUIDHOSTNAMELEN
Definition: rfc2181.h:30

 

Introduction

Documentation

Support

Miscellaneous