squid-
cache.org
Optimising Web Delivery
Docs
Download
Donate
Support
About
Contact
Shop
Blog
src
HttpHeaderStat.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2022 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 HTTPHEADERSTAT_H_
10
#define HTTPHEADERSTAT_H_
11
12
#include "
HttpHdrCc.h
"
13
#include "
HttpHdrSc.h
"
14
#include "
StatHist.h
"
15
17
class
HttpHeaderStat
18
{
19
public
:
20
HttpHeaderStat
() :
21
label
(
NULL
),
22
owner_mask
(
NULL
),
23
parsedCount
(0),
24
ccParsedCount
(0),
25
scParsedCount
(0),
26
destroyedCount
(0),
27
busyDestroyedCount
(0)
28
{
29
hdrUCountDistr
.
enumInit
(32);
/* not a real enum */
30
fieldTypeDistr
.
enumInit
(
Http::HdrType::enumEnd_
);
31
ccTypeDistr
.
enumInit
(
HttpHdrCcType::CC_ENUM_END
);
32
scTypeDistr
.
enumInit
(
SC_ENUM_END
);
33
}
34
35
HttpHeaderStat
(
const
char
*aLabel,
HttpHeaderMask
*aMask) :
36
label
(aLabel),
37
owner_mask
(aMask),
38
parsedCount
(0),
39
ccParsedCount
(0),
40
scParsedCount
(0),
41
destroyedCount
(0),
42
busyDestroyedCount
(0)
43
{
44
assert
(
label
);
45
hdrUCountDistr
.
enumInit
(32);
/* not a real enum */
46
fieldTypeDistr
.
enumInit
(
Http::HdrType::enumEnd_
);
47
ccTypeDistr
.
enumInit
(
HttpHdrCcType::CC_ENUM_END
);
48
scTypeDistr
.
enumInit
(
SC_ENUM_END
);
49
}
50
51
// nothing to destruct as label is a pointer to global const string
52
// and owner_mask is a pointer to global static array
53
~HttpHeaderStat
() {}
54
55
const
char
*
label
;
56
HttpHeaderMask
*
owner_mask
;
57
58
StatHist
hdrUCountDistr
;
59
StatHist
fieldTypeDistr
;
60
StatHist
ccTypeDistr
;
61
StatHist
scTypeDistr
;
62
63
int
parsedCount
;
64
int
ccParsedCount
;
65
int
scParsedCount
;
66
int
destroyedCount
;
67
int
busyDestroyedCount
;
68
};
69
70
#endif
/* HTTPHEADERSTAT_H_ */
71
HttpHeaderStat::destroyedCount
int destroyedCount
Definition:
HttpHeaderStat.h:66
StatHist
Definition:
StatHist.h:26
HttpHeaderStat
HTTP per header statistics.
Definition:
HttpHeaderStat.h:18
HttpHeaderStat::hdrUCountDistr
StatHist hdrUCountDistr
Definition:
HttpHeaderStat.h:58
HttpHeaderStat::fieldTypeDistr
StatHist fieldTypeDistr
Definition:
HttpHeaderStat.h:59
HttpHdrCc.h
HttpHeaderStat::~HttpHeaderStat
~HttpHeaderStat()
Definition:
HttpHeaderStat.h:53
HttpHeaderStat::scParsedCount
int scParsedCount
Definition:
HttpHeaderStat.h:65
NULL
#define NULL
Definition:
types.h:166
HttpHeaderStat::scTypeDistr
StatHist scTypeDistr
Definition:
HttpHeaderStat.h:61
Http::enumEnd_
@ enumEnd_
Definition:
RegisteredHeaders.h:123
HttpHeaderStat::ccParsedCount
int ccParsedCount
Definition:
HttpHeaderStat.h:64
StatHist.h
HttpHeaderMask
char HttpHeaderMask[12]
Definition:
HttpHeaderMask.h:13
StatHist::enumInit
void enumInit(unsigned int last_enum)
Definition:
StatHist.cc:235
assert
#define assert(EX)
Definition:
assert.h:19
SC_ENUM_END
@ SC_ENUM_END
Definition:
forward.h:37
HttpHeaderStat::owner_mask
HttpHeaderMask * owner_mask
Definition:
HttpHeaderStat.h:56
HttpHeaderStat::HttpHeaderStat
HttpHeaderStat()
Definition:
HttpHeaderStat.h:20
HttpHeaderStat::busyDestroyedCount
int busyDestroyedCount
Definition:
HttpHeaderStat.h:67
HttpHdrSc.h
HttpHeaderStat::label
const char * label
Definition:
HttpHeaderStat.h:55
HttpHeaderStat::parsedCount
int parsedCount
Definition:
HttpHeaderStat.h:63
HttpHeaderStat::ccTypeDistr
StatHist ccTypeDistr
Definition:
HttpHeaderStat.h:60
CC_ENUM_END
@ CC_ENUM_END
Definition:
HttpHdrCc.h:36
HttpHeaderStat::HttpHeaderStat
HttpHeaderStat(const char *aLabel, HttpHeaderMask *aMask)
Definition:
HttpHeaderStat.h:35
Introduction
About Squid
Why Squid?
Squid Developers
How to Donate
How to Help Out
Getting Squid
Squid Source Packages
Squid Deployment Case-Studies
Squid Software Foundation
Documentation
Configuration:
Reference
Examples
FAQ
and
Wiki
Guide Books:
Beginners
Definitive
Non-English
More...
Support
Security Advisories
Bugzilla Database
Mailing lists
Contacting us
Commercial services
Project Sponsors
Squid-based products
Miscellaneous
Developer Resources
Related Writings
Related Software:
Authenticators
Ecap
Icap
Ident
Log Analysis
Monitor
Proxies
Redirectors
General
Squid Artwork
Web Site Translations
Japanese
Mirrors
Website:
gr
il
jp
pl
...
full list
FTP Package Archive