]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/icap/History.h
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_ADAPTATION_ICAP_HISTORY_H
10 #define SQUID_SRC_ADAPTATION_ICAP_HISTORY_H
12 #include "base/RefCount.h"
15 #include "SquidString.h"
22 /// collects information about ICAP processing related to an HTTP transaction
23 class History
: public RefCountable
26 typedef RefCount
<History
> Pointer
;
30 /// record the start of an ICAP processing interval
31 void start(const char *context
);
32 /// note the end of an ICAP processing interval
33 void stop(const char *context
);
35 /// the total time of all ICAP processing intervals
36 /// \param[out] total time taken for all ICAP processing
37 void processingTime(struct timeval
&total
) const;
40 String ssluser
; ///< the username from SSL
42 LogTags logType
; ///< the squid request status (TCP_MISS etc)
44 String log_uri
; ///< the request uri
45 size_t req_sz
; ///< the request size
48 void currentTime(struct timeval
&) const; ///< time since current start or zero
50 timeval currentStart
; ///< when the current processing interval started
51 struct timeval pastTime
; ///< sum of closed processing interval durations
52 int concurrencyLevel
; ///< number of concurrent processing threads
56 } // namespace Adaptation
58 #endif /* SQUID_SRC_ADAPTATION_ICAP_HISTORY_H */