]>
Commit | Line | Data |
---|---|---|
9b74279f | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
9b74279f | 3 | * |
bbc27441 AJ |
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. | |
9b74279f FC |
7 | */ |
8 | ||
ff9d9458 FC |
9 | #ifndef SQUID_SRC_SBUFSTATSACTION_H |
10 | #define SQUID_SRC_SBUFSTATSACTION_H | |
9b74279f FC |
11 | |
12 | #include "mgr/Action.h" | |
ff1eb053 | 13 | #include "StatHist.h" |
9b74279f FC |
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); | |
d87f6b1d | 23 | static void RegisterWithCacheManager(void); |
9b74279f FC |
24 | |
25 | protected: | |
26 | explicit SBufStatsAction(const Mgr::CommandPointer &cmd); | |
27 | /* Mgr::Action API */ | |
337b9aa4 AR |
28 | void collect() override; |
29 | void dump(StoreEntry* entry) override; | |
9b74279f FC |
30 | |
31 | private: | |
32 | /* Mgr::Action API */ | |
337b9aa4 AR |
33 | void add(const Mgr::Action& action) override; |
34 | void pack(Ipc::TypedMsgHdr& msg) const override; | |
35 | void unpack(const Ipc::TypedMsgHdr& msg) override; | |
9b74279f FC |
36 | |
37 | SBufStats sbdata; | |
38 | MemBlobStats mbdata; | |
ff1eb053 FC |
39 | StatHist sbsizesatdestruct; |
40 | StatHist mbsizesatdestruct; | |
9b74279f FC |
41 | }; |
42 | ||
ff9d9458 | 43 | #endif /* SQUID_SRC_SBUFSTATSACTION_H */ |
f53969cc | 44 |