mirror of
https://github.com/emqx/neuron.git
synced 2026-10-30 16:09:02 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09da1cdab6 | ||
|
|
35849a00a9 | ||
|
|
305cb7449a | ||
|
|
9467bdaa36 | ||
|
|
79dde6ecf4 | ||
|
|
d71f240ec7 |
@@ -8,7 +8,7 @@ on:
|
||||
- published
|
||||
|
||||
env:
|
||||
VERSION: 2.9.0
|
||||
VERSION: 2.9.1
|
||||
UI_VERSION: 2.6.1
|
||||
BRANCH: v2.9
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user