ioc: add INST_COUNTER
This commit is contained in:
@@ -34,6 +34,9 @@ namespace ioc {
|
||||
|
||||
DEFINE_LOGGER(_logname, "pvxs.ioc.group.source");
|
||||
|
||||
DEFINE_INST_COUNTER(GroupSourceSubscriptionCtx);
|
||||
DEFINE_INST_COUNTER(GroupSecurityCache);
|
||||
|
||||
/**
|
||||
* Constructor for GroupSource registrar.
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "fieldsubscriptionctx.h"
|
||||
#include "group.h"
|
||||
#include "subscriptionctx.h"
|
||||
#include "utilpvt.h"
|
||||
|
||||
namespace pvxs {
|
||||
namespace ioc {
|
||||
@@ -30,6 +31,7 @@ public:
|
||||
bool eventsPrimed = false, firstEvent = true;
|
||||
bool eventsEnabled = false;
|
||||
std::unique_ptr<server::MonitorControlOp> subscriptionControl{};
|
||||
INST_COUNTER(GroupSourceSubscriptionCtx);
|
||||
|
||||
// This is as a special case for storing the initial value prior to both initial subscription events returning
|
||||
// This is so that we can merge this with the subsequent values that come in before all initial events are in
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "credentials.h"
|
||||
#include "typeutils.h"
|
||||
#include "utilpvt.h"
|
||||
|
||||
namespace pvxs {
|
||||
namespace ioc {
|
||||
@@ -45,6 +46,7 @@ class GroupSecurityCache : public SecurityControlObject {
|
||||
public:
|
||||
std::vector<SecurityClient> securityClients;
|
||||
std::unique_ptr<Credentials> credentials;
|
||||
INST_COUNTER(GroupSecurityCache);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -65,6 +67,7 @@ struct PutOperationCache : public SingleSecurityCache {
|
||||
processNotify notify{};
|
||||
Value valueToSet;
|
||||
std::unique_ptr<server::ExecOp> putOperation;
|
||||
INST_COUNTER(PutOperationCache);
|
||||
~PutOperationCache();
|
||||
};
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ namespace ioc {
|
||||
|
||||
DEFINE_LOGGER(_logname, "pvxs.ioc.single.source");
|
||||
|
||||
DEFINE_INST_COUNTER(PutOperationCache);
|
||||
DEFINE_INST_COUNTER(SingleInfo);
|
||||
|
||||
namespace {
|
||||
|
||||
void subscriptionCallback(SingleSourceSubscriptionCtx* subscriptionContext,
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
namespace pvxs {
|
||||
namespace ioc {
|
||||
|
||||
DEFINE_INST_COUNTER(SingleSourceSubscriptionCtx);
|
||||
|
||||
/**
|
||||
* Constructor for single source subscription context using a pointer to a db channel
|
||||
*
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
#include "channel.h"
|
||||
#include "fieldconfig.h"
|
||||
#include "subscriptionctx.h"
|
||||
#include "utilpvt.h"
|
||||
|
||||
namespace pvxs {
|
||||
namespace ioc {
|
||||
|
||||
struct SingleInfo : public MappingInfo {
|
||||
Channel chan;
|
||||
INST_COUNTER(SingleInfo);
|
||||
|
||||
explicit SingleInfo(Channel&& chan) :chan(std::move(chan)) {
|
||||
updateNsecMask(dbChannelRecord(this->chan));
|
||||
@@ -45,6 +47,7 @@ public:
|
||||
epicsMutex eventLock{};
|
||||
std::unique_ptr<server::MonitorControlOp> subscriptionControl{};
|
||||
bool eventsEnabled = false;
|
||||
INST_COUNTER(SingleSourceSubscriptionCtx);
|
||||
|
||||
~SingleSourceSubscriptionCtx() {
|
||||
assert(!eventsEnabled);
|
||||
|
||||
Reference in New Issue
Block a user