diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/installer/checksums.sh | 1 | ||||
-rw-r--r-- | tests/profile/Makefile | 51 | ||||
-rw-r--r-- | tests/profile/test-eval.c | 12 |
3 files changed, 52 insertions, 12 deletions
diff --git a/tests/installer/checksums.sh b/tests/installer/checksums.sh index e83e0c23..ff0400ba 100755 --- a/tests/installer/checksums.sh +++ b/tests/installer/checksums.sh @@ -49,6 +49,5 @@ check_file() { } check_file kickstart.sh packaging/installer/methods/kickstart.md -check_file kickstart-static64.sh packaging/installer/methods/kickstart-64.md echo "No problems found, exiting successfully!" diff --git a/tests/profile/Makefile b/tests/profile/Makefile new file mode 100644 index 00000000..b3510e6e --- /dev/null +++ b/tests/profile/Makefile @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +COMMON_CFLAGS = -I ../../ -Wall -Wextra +PROFILE_CFLAGS = -O1 -ggdb $(COMMON_CFLAGS) +PERFORMANCE_CFLAGS = -O2 $(COMMON_CFLAGS) + +CFLAGS = $(PERFORMANCE_CFLAGS) + +LIBNETDATA_FILES = \ + ../../libnetdata/popen/popen.o \ + ../../libnetdata/storage_number/storage_number.o \ + ../../libnetdata/avl/avl.o \ + ../../libnetdata/socket/socket.o \ + ../../libnetdata/os.o \ + ../../libnetdata/clocks/clocks.o \ + ../../libnetdata/procfile/procfile.o \ + ../../libnetdata/statistical/statistical.o \ + ../../libnetdata/eval/eval.o \ + ../../libnetdata/threads/threads.o \ + ../../libnetdata/dictionary/dictionary.o \ + ../../libnetdata/simple_pattern/simple_pattern.o \ + ../../libnetdata/url/url.o \ + ../../libnetdata/config/appconfig.o \ + ../../libnetdata/libnetdata.o \ + ../../libnetdata/buffer/buffer.o \ + ../../libnetdata/adaptive_resortable_list/adaptive_resortable_list.o \ + ../../libnetdata/locks/locks.o \ + ../../libnetdata/log/log.o \ + $(NULL) + +COMMON_LDFLAGS = $(LIBNETDATA_FILES) -pthread -lm + +all: statsd-stress benchmark-procfile-parser test-eval benchmark-dictionary benchmark-value-pairs + +benchmark-procfile-parser: benchmark-procfile-parser.c + gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS} + +benchmark-dictionary: benchmark-dictionary.c + gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS} + +benchmark-value-pairs: benchmark-value-pairs.c + gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS} + +statsd-stress: statsd-stress.c + gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS} + +test-eval: test-eval.c + gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS} + +clean: + rm -f benchmark-procfile-parser statsd-stress test-eval benchmark-dictionary benchmark-value-pairs diff --git a/tests/profile/test-eval.c b/tests/profile/test-eval.c index 1c23063b..b0c3b1af 100644 --- a/tests/profile/test-eval.c +++ b/tests/profile/test-eval.c @@ -9,10 +9,9 @@ #include "config.h" #include "libnetdata/libnetdata.h" +#include "libnetdata/required_dummies.h" #include "database/rrdcalc.h" -void netdata_cleanup_and_exit(int ret) { exit(ret); } - /* void indent(int level, int show) { int i = level; @@ -261,15 +260,6 @@ void print_expression(EVAL_NODE *op, const char *failed_at, int error) { } */ -int health_variable_lookup(const char *variable, uint32_t hash, RRDCALC *rc, calculated_number *result) { - (void)variable; - (void)hash; - (void)rc; - (void)result; - - return 0; -} - int main(int argc, char **argv) { if(argc != 2) { fprintf(stderr, "I need an expression (enclose it in single-quotes (') as a single parameter)\n"); |