counters: avoid unneeded 'updates' increment

No longer used now that the counter functions are only for regular counters.
pull/14398/head
Victor Julien 9 months ago
parent fd9ce24fa3
commit 0d8c81c062

@ -154,7 +154,6 @@ void StatsAddUI64(ThreadVars *tv, uint16_t id, uint64_t x)
BUG_ON ((id < 1) || (id > pca->size)); BUG_ON ((id < 1) || (id > pca->size));
#endif #endif
pca->head[id].value += x; pca->head[id].value += x;
pca->head[id].updates++;
} }
/** /**
@ -174,7 +173,6 @@ void StatsIncr(ThreadVars *tv, uint16_t id)
BUG_ON ((id < 1) || (id > pca->size)); BUG_ON ((id < 1) || (id > pca->size));
#endif #endif
pca->head[id].value++; pca->head[id].value++;
pca->head[id].updates++;
} }
/** /**
@ -194,7 +192,6 @@ void StatsDecr(ThreadVars *tv, uint16_t id)
BUG_ON((id < 1) || (id > pca->size)); BUG_ON((id < 1) || (id > pca->size));
#endif #endif
pca->head[id].value--; pca->head[id].value--;
pca->head[id].updates++;
} }
/** /**
@ -214,14 +211,7 @@ void StatsSetUI64(ThreadVars *tv, uint16_t id, uint64_t x)
#ifdef DEBUG #ifdef DEBUG
BUG_ON ((id < 1) || (id > pca->size)); BUG_ON ((id < 1) || (id > pca->size));
#endif #endif
pca->head[id].value = x;
if ((pca->head[id].pc->type == STATS_TYPE_MAXIMUM) && ((int64_t)x > pca->head[id].value)) {
pca->head[id].value = x;
} else if (pca->head[id].pc->type == STATS_TYPE_NORMAL) {
pca->head[id].value = x;
}
pca->head[id].updates++;
} }
/** /**

Loading…
Cancel
Save