]> git.ipfire.org Git - thirdparty/squid.git/blame - src/SBufStatsAction.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / SBufStatsAction.h
CommitLineData
9b74279f 1/*
4ac4a490 2 * Copyright (C) 1996-2017 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
9#ifndef SQUID_SBUFEXTRAS_H
10#define SQUID_SBUFEXTRAS_H
11
12#include "mgr/Action.h"
65e41a45 13#include "sbuf/SBuf.h"
ff1eb053 14#include "StatHist.h"
9b74279f
FC
15
16class StoreEntry;
17
18/// SBuf stats for cachemgr
19class SBufStatsAction: public Mgr::Action
20{
21public:
22 /// Mgr::ClassActionCreationHandler for Mgr::RegisterAction()
23 static Pointer Create(const Mgr::CommandPointer &cmd);
d87f6b1d 24 static void RegisterWithCacheManager(void);
9b74279f
FC
25
26protected:
27 explicit SBufStatsAction(const Mgr::CommandPointer &cmd);
28 /* Mgr::Action API */
29 virtual void collect();
30 virtual void dump(StoreEntry* entry);
31
32private:
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;
ff1eb053
FC
40 StatHist sbsizesatdestruct;
41 StatHist mbsizesatdestruct;
9b74279f
FC
42};
43
44#endif /* SQUID_SBUFSTATSACTION_H */
f53969cc 45