summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-03-10 12:41:14 +0200
committerGitHub <noreply@github.com>2023-03-10 12:41:14 +0200
commitcf85c3b0e9fcda807a2a5e9c1834792d73725a50 (patch)
tree6835795413623f49b01f06ab9a716725df394262 /daemon
parent37a06960f90c046f21c125c2b4265713da04f851 (diff)
/api/v2/X improvements part 3 (#14665)
* max web request size to 64KB * fix the request too big message * increase max request reading tries to 100 * support for bigger web requests * add "avg" as a shortcut for "average" to both group by aggregation and time aggregation; discard the last partial points of a query in play mode, up to max update every; group by hidden dimensions too * better implementation for partial data trimming * added group_by=selected to return only one dimension for all selected metrics * fix acceptance of group_by=selected * passing option "raw" disables partial data trimming * remove obsolete option "plan"; use "debug" * fix view.min and view.max calculation - there were 2 bugs: a) min and max were reset for every row and b) min and max were corrupted by GBC and AR printing * per row annotations * added time column to point annotations * disable caching for /api/v2/contexts responses * added api format json2 that returns an array for each points, having all the point values and annotations in them * work on swagger about /api/v2 * prevent infinite loop * cleanup and swagger work * allow negative simple pattern expressions to work as expected * do not lookup in the dictionary empty names * garbage collect dictionaries * make query_target allocate less aggressively; queries fill the remaining points with nulls * reusable query ops to save memory on huge queries * move parts of query plans into query ops to save query target memory * remove storage engine from query metric tiers, to save memory, and recalculate it when it is needed
Diffstat (limited to 'daemon')
-rw-r--r--daemon/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/daemon/main.c b/daemon/main.c
index 04bb9d377a..5afc100e31 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -1617,11 +1617,15 @@ int main(int argc, char **argv) {
char wildcarded[len];
SIMPLE_PATTERN *p = simple_pattern_create(haystack, NULL, SIMPLE_PATTERN_EXACT, true);
- int ret = simple_pattern_matches_extract(p, needle, wildcarded, len);
+ SIMPLE_PATTERN_RESULT ret = simple_pattern_matches_extract(p, needle, wildcarded, len);
simple_pattern_free(p);
- if(ret) {
- fprintf(stdout, "RESULT: MATCHED - pattern '%s' matches '%s', wildcarded '%s'\n", haystack, needle, wildcarded);
+ if(ret == SP_MATCHED_POSITIVE) {
+ fprintf(stdout, "RESULT: POSITIVE MATCHED - pattern '%s' matches '%s', wildcarded '%s'\n", haystack, needle, wildcarded);
+ return 0;
+ }
+ else if(ret == SP_MATCHED_NEGATIVE) {
+ fprintf(stdout, "RESULT: NEGATIVE MATCHED - pattern '%s' matches '%s', wildcarded '%s'\n", haystack, needle, wildcarded);
return 0;
}
else {