SBufStatsAction.h
Go to the documentation of this file.
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 
19 {
20 public:
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 
41 };
42 
43 #endif /* SQUID_SRC_SBUFSTATSACTION_H */
44 
void add(const Mgr::Action &action) override
incrementally merge in remote information (of the same action type)
StatHist mbsizesatdestruct
StatHist sbsizesatdestruct
void dump(StoreEntry *entry) override
const CommandPointer cmd
the command that caused this action
Definition: Action.h:90
static Pointer Create(const Mgr::CommandPointer &cmd)
Mgr::ClassActionCreationHandler for Mgr::RegisterAction()
static void RegisterWithCacheManager(void)
SBuf stats for cachemgr.
void collect() override
calculate and keep local action-specific information
SBufStatsAction(const Mgr::CommandPointer &cmd)
MemBlobStats mbdata
void unpack(const Ipc::TypedMsgHdr &msg) override
unpack action info from the message received by Coordinator
void pack(Ipc::TypedMsgHdr &msg) const override
pack collected action info into a message to be sent to Coordinator
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:34
Various MemBlob class-wide statistics.
Definition: MemBlob.h:19

 

Introduction

Documentation

Support

Miscellaneous