Skip to content

Replace benchmark.cc with a Python script #495

@zhanglei1949

Description

@zhanglei1949

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

  • Port benchmark.cc functionality to a Python script (config parsing, query execution loop, timing)
  • Remove benchmark.cc and its CMake target from bin/CMakeLists.txt
  • Verify equivalent performance measurement accuracy through Python bindings

Related

Metadata

Metadata

Assignees

Labels

ciCI/CD and build systemengineStorage and execution engine

Type

No fields configured for Task.

Projects

Status
To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions