~ubuntu-branches/ubuntu/utopic/squid3/utopic-proposed

« back to all changes in this revision

Viewing changes to src/mgr/CountersAction.h

  • Committer: Package Import Robot
  • Author(s): Yolanda Robla
  • Date: 2013-07-10 17:12:42 UTC
  • mfrom: (21.2.18 sid)
  • Revision ID: package-import@ubuntu.com-20130710171242-2i9v941ikbpnjyqk
Tags: 3.3.4-1ubuntu1
* Merge from Debian unstable (LP: #1199883).  Remaining changes:
  + debian/control:
    - Update maintainer.
    - Suggests apparmor (>= 2.3)
    - Depends on ssl-cert ((>= 1.0-11ubuntu1), autopkgtests
  + debian/squid3.upstart
    - Move ulimit command to script section so that it applies
      to the started squid daemon. Thanks to Timur Irmatov (LP: 986159)
    - Work around squid not handling SIGHUP by adding respawn to
      upstart job. (LP: 978356)
  + debian/NEWS.Debian: Rename NEWS.debian, add note regarding squid3
    transition in 12.04 (LP: 924739)
  + debian/rules
    - Re-enable all hardening options lost in the squid->squid3
      transition (LP: 986314)
  + squid3.resolvconf, debian/squid3.postinst, debian/squid3.postrm,
    debian/squid3.preinst, debian/squid3.prerm:
    - Convert init script to upstart
  + debian/patches/99-ubuntu-ssl-cert-snakeoil:
    - Use snakeoil certificates.
  + debian/logrotate
    - Use sar-reports rather than sarg-maint. (LP: 26616)
  + debian/patches/90-cf.data.ubuntu.dpatch:
    - Add an example refresh pattern for debs.
      (foundations-lucid-local-report spec)
  + Add disabled by default AppArmor profile (LP: 497790)
    - debian/squid3.upstart: load profile in pre-start stanza
    - add debian/usr.sbin.squid3 profile
    - debian/rules:
      + install debian/usr.sbin.squid3, etc/apparmor.d/force-complain and
        etc/apparmor.d/disable into $(INSTALLDIR)
      + use dh_apparmor
    - debian/squid3.install: install etc/apparmor.d/disable, force-complain
      and usr.sbin.squid3
    - debian/squid3.preinst: disable profile on clean install or upgrades
      from earlier than when we shipped the profile
  + debian/tests:
    - Add autopkgtests.

* Dropped:
  - debian/patches: dropped patches, superseded by new release:
    + 98-CVE-2012-5643.patch
    + 99-lp1117517_r12473.patch
  - debian/rules: fix FTBFS, removed --with-cppunit-basedir flag,
    included in Debian.
  - debian/control: Dropped transitional packages from squid, no
    longer required.

* Refreshed patches:
  - 01-cf.data.debian.patch
  - 02-makefile-defaults.patch
  - 15-cachemgr-default-config.patch

* debian/tests/test-squid.py: fixed case problem with ftp test

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * DEBUG: section 16    Cache Manager API
 
3
 *
 
4
 */
 
5
 
 
6
#ifndef SQUID_MGR_COUNTERS_ACTION_H
 
7
#define SQUID_MGR_COUNTERS_ACTION_H
 
8
 
 
9
#include "mgr/Action.h"
 
10
#include <sys/time.h>
 
11
 
 
12
namespace Mgr
 
13
{
 
14
 
 
15
/// store traffic and resource counters
 
16
class CountersActionData
 
17
{
 
18
public:
 
19
    CountersActionData();
 
20
    CountersActionData& operator += (const CountersActionData& stats);
 
21
 
 
22
public:
 
23
    struct timeval sample_time;
 
24
    double client_http_requests;
 
25
    double client_http_hits;
 
26
    double client_http_errors;
 
27
    double client_http_kbytes_in;
 
28
    double client_http_kbytes_out;
 
29
    double client_http_hit_kbytes_out;
 
30
    double server_all_requests;
 
31
    double server_all_errors;
 
32
    double server_all_kbytes_in;
 
33
    double server_all_kbytes_out;
 
34
    double server_http_requests;
 
35
    double server_http_errors;
 
36
    double server_http_kbytes_in;
 
37
    double server_http_kbytes_out;
 
38
    double server_ftp_requests;
 
39
    double server_ftp_errors;
 
40
    double server_ftp_kbytes_in;
 
41
    double server_ftp_kbytes_out;
 
42
    double server_other_requests;
 
43
    double server_other_errors;
 
44
    double server_other_kbytes_in;
 
45
    double server_other_kbytes_out;
 
46
    double icp_pkts_sent;
 
47
    double icp_pkts_recv;
 
48
    double icp_queries_sent;
 
49
    double icp_replies_sent;
 
50
    double icp_queries_recv;
 
51
    double icp_replies_recv;
 
52
    double icp_replies_queued;
 
53
    double icp_query_timeouts;
 
54
    double icp_kbytes_sent;
 
55
    double icp_kbytes_recv;
 
56
    double icp_q_kbytes_sent;
 
57
    double icp_r_kbytes_sent;
 
58
    double icp_q_kbytes_recv;
 
59
    double icp_r_kbytes_recv;
 
60
#if USE_CACHE_DIGESTS
 
61
    double icp_times_used;
 
62
    double cd_times_used;
 
63
    double cd_msgs_sent;
 
64
    double cd_msgs_recv;
 
65
    double cd_memory;
 
66
    double cd_local_memory;
 
67
    double cd_kbytes_sent;
 
68
    double cd_kbytes_recv;
 
69
#endif
 
70
    double unlink_requests;
 
71
    double page_faults;
 
72
    double select_loops;
 
73
    double cpu_time;
 
74
    double wall_time;
 
75
    double swap_outs;
 
76
    double swap_ins;
 
77
    double swap_files_cleaned;
 
78
    double aborted_requests;
 
79
};
 
80
 
 
81
/// implement aggregated 'counters' action
 
82
class CountersAction: public Action
 
83
{
 
84
protected:
 
85
    CountersAction(const CommandPointer &cmd);
 
86
 
 
87
public:
 
88
    static Pointer Create(const CommandPointer &cmd);
 
89
    /* Action API */
 
90
    virtual void add(const Action& action);
 
91
    virtual void pack(Ipc::TypedMsgHdr& msg) const;
 
92
    virtual void unpack(const Ipc::TypedMsgHdr& msg);
 
93
 
 
94
protected:
 
95
    /* Action API */
 
96
    virtual void collect();
 
97
    virtual void dump(StoreEntry* entry);
 
98
 
 
99
private:
 
100
    CountersActionData data;
 
101
};
 
102
 
 
103
} // namespace Mgr
 
104
 
 
105
#endif /* SQUID_MGR_COUNTERS_ACTION_H */