]> git.ipfire.org Git - thirdparty/squid.git/blame - src/HierarchyLogEntry.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / HierarchyLogEntry.h
CommitLineData
b24880fe 1/*
b24880fe 2 *
3 * SQUID Web Proxy Cache http://www.squid-cache.org/
4 * ----------------------------------------------------------
5 *
6 * Squid is the result of efforts by numerous individuals from
7 * the Internet community; see the CONTRIBUTORS file for full
8 * details. Many organizations have provided support for Squid's
9 * development; see the SPONSORS file for full details. Squid is
10 * Copyrighted (C) 2001 by the Regents of the University of
11 * California; see the COPYRIGHT file for full details. Squid
12 * incorporates software developed and/or copyrighted by other
13 * sources; see the CREDITS file for full details.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
26ac0430 19 *
b24880fe 20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
26ac0430 24 *
b24880fe 25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
28 *
29 * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
30 */
31
32#ifndef SQUID_HTTPHIERARCHYLOGENTRY_H
33#define SQUID_HTTPHIERARCHYLOGENTRY_H
34
a14f38d0 35#include "comm/Connection.h"
955394ce 36#include "enums.h"
bbaf2685 37#include "hier_code.h"
955394ce 38#include "http/StatusCode.h"
4b981814 39#include "lookup_t.h"
b24880fe 40#include "PingData.h"
602d9612 41#include "rfc2181.h"
b24880fe 42
43class HierarchyLogEntry
44{
45
46public:
47 HierarchyLogEntry();
a14f38d0
AJ
48 ~HierarchyLogEntry() { tcpServer = NULL; };
49
50 /// Record details from a new server connection.
51 /// call this whenever the destination server changes.
52 void note(const Comm::ConnectionPointer &server, const char *requestedHost);
53
54public:
b24880fe 55 hier_code code;
56 char host[SQUIDHOSTNAMELEN];
57 ping_data ping;
58 char cd_host[SQUIDHOSTNAMELEN]; /* the host of selected by cd peer */
59 lookup_t cd_lookup; /* cd prediction: none, miss, hit */
60 int n_choices; /* #peers we selected from (cd only) */
61 int n_ichoices; /* #peers with known rtt we selected from (cd only) */
62
63 struct timeval peer_select_start;
64
65 struct timeval store_complete_stop;
e1381638 66
955394ce 67 Http::StatusCode peer_reply_status; ///< last HTTP status code received
3ff65596
AR
68 timeval peer_http_request_sent; ///< last peer finished writing req
69 int64_t peer_response_time; ///< last peer response delay
70 timeval first_conn_start; ///< first connection use among all peers
71 int64_t total_response_time; ///< cumulative for all peers
a14f38d0 72 Comm::ConnectionPointer tcpServer; ///< TCP/IP level details of the last server-side connection
bae917ac 73 int64_t bodyBytesRead; ///< number of body bytes received from the next hop or -1
b24880fe 74};
75
b24880fe 76#endif /* SQUID_HTTPHIERARCHYLOGENTRY_H */