]> git.ipfire.org Git - thirdparty/squid.git/blame - src/HttpHeaderStat.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / HttpHeaderStat.h
CommitLineData
bbc27441 1/*
bde978a6 2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
bbc27441
AJ
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
e1656dc4
FC
9#ifndef HTTPHEADERSTAT_H_
10#define HTTPHEADERSTAT_H_
11
e1656dc4 12#include "StatHist.h"
3407edc1 13
26735116 14/// HTTP per header statistics
75fbab53
A
15class HttpHeaderStat
16{
e1656dc4 17public:
26735116 18 HttpHeaderStat() :
45c2a738
SM
19 label(NULL),
20 owner_mask(NULL),
21 parsedCount(0),
22 ccParsedCount(0),
23 scParsedCount(0),
24 destroyedCount(0),
25 busyDestroyedCount(0)
26735116
AJ
26 {
27 hdrUCountDistr.enumInit(32); /* not a real enum */
28 fieldTypeDistr.enumInit(HDR_ENUM_END);
29 ccTypeDistr.enumInit(CC_ENUM_END);
30 scTypeDistr.enumInit(SC_ENUM_END);
31 }
32
33 HttpHeaderStat(const char *aLabel, HttpHeaderMask *aMask) :
45c2a738
SM
34 label(aLabel),
35 owner_mask(aMask),
36 parsedCount(0),
37 ccParsedCount(0),
38 scParsedCount(0),
39 destroyedCount(0),
40 busyDestroyedCount(0)
26735116
AJ
41 {
42 assert(label);
43 hdrUCountDistr.enumInit(32); /* not a real enum */
44 fieldTypeDistr.enumInit(HDR_ENUM_END);
45 ccTypeDistr.enumInit(CC_ENUM_END);
46 scTypeDistr.enumInit(SC_ENUM_END);
47 }
48
49 // nothing to destruct as label is a pointer to global const string
50 // and owner_mask is a pointer to global static array
51 ~HttpHeaderStat() {}
52
e1656dc4
FC
53 const char *label;
54 HttpHeaderMask *owner_mask;
55
56 StatHist hdrUCountDistr;
57 StatHist fieldTypeDistr;
58 StatHist ccTypeDistr;
59 StatHist scTypeDistr;
60
61 int parsedCount;
62 int ccParsedCount;
63 int scParsedCount;
64 int destroyedCount;
65 int busyDestroyedCount;
66};
67
e1656dc4 68#endif /* HTTPHEADERSTAT_H_ */
f53969cc 69