HierarchyLogEntry.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 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_HTTPHIERARCHYLOGENTRY_H
10 #define SQUID_HTTPHIERARCHYLOGENTRY_H
11 
12 #include "comm/Connection.h"
13 #include "enums.h"
14 #include "hier_code.h"
15 #include "http/StatusCode.h"
16 #include "lookup_t.h"
17 #include "PingData.h"
18 #include "rfc2181.h"
19 
23 {
24 
25 public:
27 
30  void resetPeerNotes(const Comm::ConnectionPointer &server, const char *requestedHost);
31 
34  void notePeerRead();
35 
38  void notePeerWrite();
39 
41  void startPeerClock();
46  void stopPeerClock(const bool force);
47 
50  bool peerResponseTime(struct timeval &responseTime);
51 
54  bool totalResponseTime(struct timeval &responseTime);
55 
56 public:
60  char cd_host[SQUIDHOSTNAMELEN]; /* the host of selected by cd peer */
61  lookup_t cd_lookup; /* cd prediction: none, miss, hit */
62  int n_choices; /* #peers we selected from (cd only) */
63  int n_ichoices; /* #peers with known rtt we selected from (cd only) */
64 
65  struct timeval peer_select_start;
66 
67  struct timeval store_complete_stop;
68 
71  int64_t bodyBytesRead;
72 
73 private:
74  void clearPeerNotes();
75 
76  timeval firstConnStart_;
77  struct timeval peer_last_read_;
78  struct timeval peer_last_write_;
79  struct timeval totalResponseTime_;
80 };
81 
82 #endif /* SQUID_HTTPHIERARCHYLOGENTRY_H */
83 
void startPeerClock()
Start recording total time spent communicating with peers.
Definition: access_log.cc:296
Comm::ConnectionPointer tcpServer
TCP/IP level details of the last peer/server connection.
bool totalResponseTime(struct timeval &responseTime)
Definition: access_log.cc:344
struct timeval peer_select_start
char host[SQUIDHOSTNAMELEN]
int64_t bodyBytesRead
number of body bytes received from the next hop or -1
StatusCode
Definition: StatusCode.h:20
struct timeval peer_last_write_
time of the last write to the last peer
struct timeval totalResponseTime_
cumulative for all peers
void clearPeerNotes()
forget previous notePeerRead() and notePeerWrite() calls (if any)
Definition: access_log.cc:272
void resetPeerNotes(const Comm::ConnectionPointer &server, const char *requestedHost)
Definition: access_log.cc:250
void stopPeerClock(const bool force)
Definition: access_log.cc:303
char cd_host[SQUIDHOSTNAMELEN]
struct timeval store_complete_stop
hier_code
Definition: hier_code.h:12
timeval firstConnStart_
first connection use among all peers
static char server[MAXLINE]
#define SQUIDHOSTNAMELEN
Definition: rfc2181.h:30
bool peerResponseTime(struct timeval &responseTime)
Definition: access_log.cc:317
lookup_t
Definition: lookup_t.h:12
Http::StatusCode peer_reply_status
last HTTP status code received
struct timeval peer_last_read_
time of the last read from the last peer

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors