Skip to content

Commit 673e7c2

Browse files
franciscovalentecastroedsiper
authored andcommitted
build: exposing parameters for msgpack to json buffer
Exposing configuration parameters to determine the function 'flb_msgpack_raw_to_json_sds' buffer strategy. This parameters can be set during build configuration in the following way : cmake ../ -DFLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE=1.5 \ -DFLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE=.10 Signed-off-by: Francisco Valente <[email protected]>
1 parent ea426c2 commit 673e7c2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,19 @@ if(FLB_HAVE_ATTRIBUTE_ALLOC_SIZE)
680680
FLB_DEFINITION(FLB_HAVE_ATTRIBUTE_ALLOC_SIZE)
681681
endif()
682682

683+
# parameters for flb_msgpack_raw_to_json_sds buffer strategy
684+
if (NOT DEFINED FLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE)
685+
FLB_DEFINITION_VAL(FLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE 2.0)
686+
else()
687+
FLB_DEFINITION_VAL(FLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE ${FLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE})
688+
endif()
689+
690+
if (NOT DEFINED FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE)
691+
FLB_DEFINITION_VAL(FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE 0.10)
692+
else()
693+
FLB_DEFINITION_VAL(FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE ${FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE})
694+
endif()
695+
683696
# Build tools/xxd-c
684697
add_subdirectory(tools/xxd-c)
685698

0 commit comments

Comments
 (0)