Metrics implementation, WIP

This commit is contained in:
2025-08-29 13:43:03 -04:00
parent fac0d20ae1
commit 62b37c067c
5 changed files with 1270 additions and 61 deletions

View File

@@ -186,6 +186,17 @@ target_compile_definitions(test_server_connection_return
PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN)
target_compile_options(test_server_connection_return PRIVATE -UNDEBUG)
# Metrics system test
add_executable(test_metric tests/test_metric.cpp src/metric.cpp
src/arena_allocator.cpp src/format.cpp)
target_link_libraries(test_metric doctest::doctest Threads::Threads
simdutf::simdutf weaseljson)
target_include_directories(test_metric PRIVATE src)
target_compile_options(test_metric PRIVATE -UNDEBUG)
# Register with CTest
add_test(NAME metric_tests COMMAND test_metric)
add_executable(bench_arena_allocator benchmarks/bench_arena_allocator.cpp
src/arena_allocator.cpp)
target_link_libraries(bench_arena_allocator nanobench)
@@ -222,6 +233,16 @@ add_executable(bench_format_comparison benchmarks/bench_format_comparison.cpp
target_link_libraries(bench_format_comparison nanobench)
target_include_directories(bench_format_comparison PRIVATE src)
# Metrics system benchmark
add_executable(bench_metric benchmarks/bench_metric.cpp src/metric.cpp
src/arena_allocator.cpp src/format.cpp)
target_link_libraries(bench_metric nanobench Threads::Threads simdutf::simdutf
weaseljson)
target_include_directories(bench_metric PRIVATE src)
# Register benchmark with CTest
add_test(NAME metric_benchmarks COMMAND bench_metric)
# Debug tools
add_executable(
debug_arena tools/debug_arena.cpp src/json_commit_request_parser.cpp