Background
bin/benchmark.cc directly uses google::protobuf::Arena to allocate QueryResponse messages. Because libneug.so hides all protobuf symbols via the version script (cmake/neug_exports.ld), the benchmark binary cannot link ${Protobuf_LIBRARIES} without causing duplicate libprotobuf runtime issues (#387).
PR #491 removed the explicit protobuf linkage from all other consumer targets, but benchmark.cc still has direct Arena usage that needs to be addressed.
Proposal
Replace bin/benchmark.cc with a Python script that uses neug_py_bind to run benchmarks. This:
- Eliminates the last direct protobuf dependency in consumer binaries
- Simplifies the build matrix (
benchmark target can be removed from bin/CMakeLists.txt)
- Makes benchmarks easier to extend and parameterize without recompilation
- Leverages the existing Python binding infrastructure
Scope
Related
Background
bin/benchmark.ccdirectly usesgoogle::protobuf::Arenato allocateQueryResponsemessages. Becauselibneug.sohides all protobuf symbols via the version script (cmake/neug_exports.ld), the benchmark binary cannot link${Protobuf_LIBRARIES}without causing duplicate libprotobuf runtime issues (#387).PR #491 removed the explicit protobuf linkage from all other consumer targets, but
benchmark.ccstill has direct Arena usage that needs to be addressed.Proposal
Replace
bin/benchmark.ccwith a Python script that usesneug_py_bindto run benchmarks. This:benchmarktarget can be removed frombin/CMakeLists.txt)Scope
benchmark.ccfunctionality to a Python script (config parsing, query execution loop, timing)benchmark.ccand its CMake target frombin/CMakeLists.txtRelated
${Protobuf_LIBRARIES}linkage