1 #ifndef SQUID_ICAPHISTORY_H
2 #define SQUID_ICAPHISTORY_H
5 #include "HttpHeader.h"
13 /// collects information about ICAP processing related to an HTTP transaction
14 class History
: public RefCountable
17 typedef RefCount
<History
> Pointer
;
20 History(const History
& ih
);
24 History
& operator=(const History
& ih
);
26 ///store the last reply header from ICAP server
27 void setIcapLastHeader(const HttpHeader
* lih
);
28 ///merge new header and stored one
29 void mergeIcapHeaders(const HttpHeader
* lih
);
31 /// record the start of an ICAP processing interval
32 void start(const char *context
);
33 /// note the end of an ICAP processing interval
34 void stop(const char *context
);
36 /// returns the total time of all ICAP processing intervals
37 int processingTime() const;
39 HttpHeader mergeOfIcapHeaders
; ///< Merge of REQMOD and RESPMOD responses. If both responses contain the header, the one from the last response will be used
40 HttpHeader lastIcapHeader
; ///< Last received reply from ICAP server
41 String rfc931
; ///< the username from ident
43 String ssluser
; ///< the username from SSL
45 log_type logType
; ///< the squid request status (TCP_MISS etc)
47 String log_uri
; ///< the request uri
48 size_t req_sz
; ///< the request size
51 void assign(const History
&);
53 int currentTime() const; ///< time since current start or zero
55 timeval currentStart
; ///< when the current processing interval started
56 int pastTime
; ///< sum of closed processing interval durations
57 int concurrencyLevel
; ///< number of concurrent processing threads
61 } // namespace Adaptation
63 #endif /*SQUID_HISTORY_H*/