LOGDEBUG(anna::Logger::debug(anna::functions::asString("No more holes to register new application message counters in the scope (up to %d message codes)", capacity), ANNA_FILE_LOCATION));
return;
}
- baseOffset = getCounterTypes() * a_eventMap.size(); // N counter types for each message code
+ baseOffset = getCounterTypes() * a_eventMap.size(); // N counter types for each message code / rc
a_eventMap[eventId] = baseOffset;
// Counter name:
if (counterNamePrefix[counterNamePrefix.size() - 1] != '-') counterNamePrefix += "-";
std::string counterName;
- // register only count event:
- //for (int offset = 0; offset < getCounterTypes(); offset++) {
- int offset = baseOffset + type;
+ /*
+ for (int offset = 0; offset < getCounterTypes(); offset++) {
counterName = counterNamePrefix + getDefaultInternalCounterDescription(offset);
if (resultCode != -1) counterName += anna::functions::asString("-ResultCode_%d", resultCode);
registerCounter(baseOffset + offset, counterName, baseOffset + offset);
- //}
+ }
+ */
+ // Register only affected one:
+ int offset = baseOffset + type;
+ counterName = counterNamePrefix + getDefaultInternalCounterDescription(type);
+ if (resultCode != -1) counterName += anna::functions::asString("-ResultCode_%d", resultCode);
+ registerCounter(baseOffset + offset, counterName, baseOffset + offset);
+
}
else {
baseOffset = eventMap_it->second;