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