History.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_ADAPTATION_ICAP_HISTORY_H
10 #define SQUID_SRC_ADAPTATION_ICAP_HISTORY_H
11 
12 #include "base/RefCount.h"
13 #include "enums.h"
14 #include "LogTags.h"
15 #include "SquidString.h"
16 
17 namespace Adaptation
18 {
19 namespace Icap
20 {
21 
23 class History: public RefCountable
24 {
25 public:
27 
28  History();
29 
31  void start(const char *context);
33  void stop(const char *context);
34 
37  void processingTime(struct timeval &total) const;
38 
39 #if USE_OPENSSL
41 #endif
43 
45  size_t req_sz;
46 
47 private:
48  void currentTime(struct timeval &) const;
49 
50  timeval currentStart;
51  struct timeval pastTime;
53 };
54 
55 } // namespace Icap
56 } // namespace Adaptation
57 
58 #endif /* SQUID_SRC_ADAPTATION_ICAP_HISTORY_H */
59 
void stop(const char *context)
note the end of an ICAP processing interval
Definition: History.cc:32
String log_uri
the request uri
Definition: History.h:44
LogTags logType
the squid request status (TCP_MISS etc)
Definition: History.h:42
size_t req_sz
the request size
Definition: History.h:45
timeval currentStart
when the current processing interval started
Definition: History.h:50
void currentTime(struct timeval &) const
time since current start or zero
Definition: History.cc:57
void processingTime(struct timeval &total) const
Definition: History.cc:49
void start(const char *context)
record the start of an ICAP processing interval
Definition: History.cc:23
collects information about ICAP processing related to an HTTP transaction
Definition: History.h:23
RefCount< History > Pointer
Definition: History.h:26
String ssluser
the username from SSL
Definition: History.h:40
struct timeval pastTime
sum of closed processing interval durations
Definition: History.h:51
int concurrencyLevel
number of concurrent processing threads
Definition: History.h:52

 

Introduction

Documentation

Support

Miscellaneous