Compare commits

...
6 Commits
Author SHA1 Message Date
fengzeroz 09da1cdab6 Merge pull request #2138 from fengzeroz/v2.9
version: 2.9.1
2024-07-12 09:43:05 +08:00
fengzero 35849a00a9 version: 2.9.1 2024-07-12 01:42:11 +00:00
fengzeroz 305cb7449a Merge pull request #2134 from eeff/v2.9
Pick to v2.9 fix(core): set metric to init value when reset
2024-07-10 10:08:23 +08:00
eeff 9467bdaa36 fix(core): set metric to init value when reset 2024-07-10 10:01:02 +08:00
fengzeroz 79dde6ecf4 Merge pull request #2129 from eeff/v2.9
Pick to v2.9 fix(core): event loop check stop flag
2024-07-04 16:17:48 +08:00
eeff d71f240ec7 fix(core): event loop check stop flag 2024-07-04 16:15:19 +08:00
6 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ on:
- published
env:
VERSION: 2.9.0
VERSION: 2.9.1
UI_VERSION: 2.6.1
BRANCH: v2.9
+1 -1
View File
@@ -24,7 +24,7 @@
#define NEU_VERSION_MAJOR 2
#define NEU_VERSION_MINOR 9
#define NEU_VERSION_FIX 0
#define NEU_VERSION_FIX 1
#define NEU_GET_VERSION_MAJOR(V) ((0xffff0000 & V) >> 16)
#define NEU_GET_VERSION_MINOR(V) ((0x0000ff00 & V) >> 8)
+3 -2
View File
@@ -248,6 +248,7 @@ typedef struct {
const char * name; // NOTE: should points to string literal
const char * help; // NOTE: should points to string literal
neu_metric_type_e type; //
uint64_t init; //
uint64_t value; //
neu_rolling_counter_t *rcnt; //
UT_hash_handle hh; // ordered by name
@@ -489,7 +490,7 @@ static inline void neu_node_metrics_reset(neu_node_metrics_t *node_metrics)
HASH_LOOP(hh, node_metrics->entries, entry)
{
if (!neu_metric_type_no_reset(entry->type)) {
entry->value = 0;
entry->value = entry->init;
if (neu_metric_type_is_rolling_counter(entry->type)) {
neu_rolling_counter_reset(entry->rcnt);
}
@@ -502,7 +503,7 @@ static inline void neu_node_metrics_reset(neu_node_metrics_t *node_metrics)
HASH_LOOP(hh, g->entries, entry)
{
if (!neu_metric_type_no_reset(entry->type)) {
entry->value = 0;
entry->value = entry->init;
if (neu_metric_type_is_rolling_counter(entry->type)) {
neu_rolling_counter_reset(entry->rcnt);
}
+1
View File
@@ -313,6 +313,7 @@ int neu_metric_entries_add(neu_metric_entry_t **entries, const char *name,
entry->value = init;
}
entry->init = init;
entry->name = name;
entry->type = type;
entry->help = help;
+1 -1
View File
@@ -108,7 +108,7 @@ static void *event_loop(void *arg)
neu_events_t *events = (neu_events_t *) arg;
int epoll_fd = events->epoll_fd;
while (true) {
while (!events->stop) {
struct epoll_event event = { 0 };
struct event_data *data = NULL;
+1 -1
View File
@@ -1 +1 @@
2.9.0
2.9.1