From 55ac0b729e5266a47d91e8ba9cd7ac9e5feea35b Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Tue, 10 Sep 2024 11:37:29 -0700 Subject: [PATCH] Support building db_bench using buck (#13004) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/13004 The patch extends the buckifier script so it generates a target for `db_bench` as well. Reviewed By: cbi42 Differential Revision: D62407071 fbshipit-source-id: 0cb98a324ce0598ad84a8675aa77b7d0f91bf40c --- TARGETS | 2 ++ buckifier/buckify_rocksdb.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/TARGETS b/TARGETS index fb4588ef76..4b79a73e42 100644 --- a/TARGETS +++ b/TARGETS @@ -417,6 +417,8 @@ cpp_binary_wrapper(name="ldb", srcs=["tools/ldb.cc"], deps=[":rocksdb_tools_lib" cpp_binary_wrapper(name="db_stress", srcs=["db_stress_tool/db_stress.cc"], deps=[":rocksdb_stress_lib"], extra_preprocessor_flags=[], extra_bench_libs=False) +cpp_binary_wrapper(name="db_bench", srcs=["tools/db_bench.cc"], deps=[":rocksdb_tools_lib"], extra_preprocessor_flags=[], extra_bench_libs=False) + cpp_binary_wrapper(name="cache_bench", srcs=["cache/cache_bench.cc"], deps=[":rocksdb_cache_bench_tools_lib"], extra_preprocessor_flags=[], extra_bench_libs=False) cpp_binary_wrapper(name="ribbon_bench", srcs=["microbench/ribbon_bench.cc"], deps=[], extra_preprocessor_flags=[], extra_bench_libs=True) diff --git a/buckifier/buckify_rocksdb.py b/buckifier/buckify_rocksdb.py index f7831c6907..815e55d7bf 100755 --- a/buckifier/buckify_rocksdb.py +++ b/buckifier/buckify_rocksdb.py @@ -201,6 +201,10 @@ def generate_targets(repo_path, deps_map): TARGETS.add_binary( "db_stress", ["db_stress_tool/db_stress.cc"], [":rocksdb_stress_lib"] ) + # db_bench binary + TARGETS.add_binary( + "db_bench", ["tools/db_bench.cc"], [":rocksdb_tools_lib"] + ) # cache_bench binary TARGETS.add_binary( "cache_bench", ["cache/cache_bench.cc"], [":rocksdb_cache_bench_tools_lib"]