summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-06-26 14:00:59 +0300
committerGitHub <noreply@github.com>2023-06-26 14:00:59 +0300
commit0d61c11b5f4772a4762ede1d8204290b94bb08e7 (patch)
tree49c97d67e0d2a4846a4b379345f53ef8d93a6aec /daemon
parentf90d56f18d29c2835bc278f6a22e840230b9ca86 (diff)
use gperf for the pluginsd/streaming parser hashtable (#15251)
* use gperf for the pluginsd parser * simplify pluginsd_parser by removing void pointers to user * pluginsd_split_words() with inlined pluginsd_space() * quoted_string_splitter() now uses a map instead of a function for determining spaces * add stress test for pluginsd parser * optimized BITMAP256 * optimized rrdpush receiver reception * optimized rrdpush sender compression * renames and cleanup * remove wrong negation * unify handshake and disconnection reasons * use parser_find_keyword * register job names only for the current repertoire
Diffstat (limited to 'daemon')
-rw-r--r--daemon/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/daemon/main.c b/daemon/main.c
index 36bb158b1a..71a570d781 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -110,10 +110,10 @@ bool service_running(SERVICE_TYPE service) {
if(unlikely(!sth))
sth = service_register(SERVICE_THREAD_TYPE_NETDATA, NULL, NULL, NULL, false);
- if(netdata_exit)
+ if(unlikely(netdata_exit))
__atomic_store_n(&service_globals.running, 0, __ATOMIC_RELAXED);
- if(service == 0)
+ if(unlikely(service == 0))
service = sth->services;
sth->services |= service;
@@ -1555,6 +1555,10 @@ int main(int argc, char **argv) {
unittest_running = true;
return julytest();
}
+ else if(strcmp(optarg, "parsertest") == 0) {
+ unittest_running = true;
+ return pluginsd_parser_unittest();
+ }
else if(strncmp(optarg, createdataset_string, strlen(createdataset_string)) == 0) {
optarg += strlen(createdataset_string);
unsigned history_seconds = strtoul(optarg, NULL, 0);