]> git.ipfire.org Git - thirdparty/squid.git/blob - src/SBufStatsAction.h
Fix printf format for size_t and mb_size_t
[thirdparty/squid.git] / src / SBufStatsAction.h
1 /*
2 * Copyright (C) 1996-2015 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_SBUFEXTRAS_H
10 #define SQUID_SBUFEXTRAS_H
11
12 #include "mgr/Action.h"
13 #include "SBuf.h"
14 #include "StatHist.h"
15
16 class StoreEntry;
17
18 /// SBuf stats for cachemgr
19 class SBufStatsAction: public Mgr::Action
20 {
21 public:
22 /// Mgr::ClassActionCreationHandler for Mgr::RegisterAction()
23 static Pointer Create(const Mgr::CommandPointer &cmd);
24 static void RegisterWithCacheManager(void);
25
26 protected:
27 explicit SBufStatsAction(const Mgr::CommandPointer &cmd);
28 /* Mgr::Action API */
29 virtual void collect();
30 virtual void dump(StoreEntry* entry);
31
32 private:
33 /* Mgr::Action API */
34 virtual void add(const Mgr::Action& action);
35 virtual void pack(Ipc::TypedMsgHdr& msg) const;
36 virtual void unpack(const Ipc::TypedMsgHdr& msg);
37
38 SBufStats sbdata;
39 MemBlobStats mbdata;
40 StatHist sbsizesatdestruct;
41 StatHist mbsizesatdestruct;
42 };
43
44 #endif /* SQUID_SBUFSTATSACTION_H */
45