Consolidate benchmark code to benchmarks/.
Currently, the benchmark used to assess leveldb changes lives in db/. The codebase also contains two benchmarks against other database engines in doc/bench/. Moving all the benchmarks in one place opens up the way for extracting common code. PiperOrigin-RevId: 246737541
This commit is contained in:
parent
506b1722ef
commit
4bd052d7e8
@ -8,7 +8,7 @@ DerivePointerAlignment: false
|
|||||||
# Order them so that when imported to the authoritative repository they will be
|
# Order them so that when imported to the authoritative repository they will be
|
||||||
# in correct alphabetical order.
|
# in correct alphabetical order.
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '^(<|"(db|helpers)/)'
|
- Regex: '^(<|"(benchmarks|db|helpers)/)'
|
||||||
Priority: 1
|
Priority: 1
|
||||||
- Regex: '^"(leveldb)/'
|
- Regex: '^"(leveldb)/'
|
||||||
Priority: 2
|
Priority: 2
|
||||||
|
@ -374,12 +374,12 @@ if(LEVELDB_BUILD_BENCHMARKS)
|
|||||||
endfunction(leveldb_benchmark)
|
endfunction(leveldb_benchmark)
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
leveldb_benchmark("${PROJECT_SOURCE_DIR}/db/db_bench.cc")
|
leveldb_benchmark("${PROJECT_SOURCE_DIR}/benchmarks/db_bench.cc")
|
||||||
endif(NOT BUILD_SHARED_LIBS)
|
endif(NOT BUILD_SHARED_LIBS)
|
||||||
|
|
||||||
check_library_exists(sqlite3 sqlite3_open "" HAVE_SQLITE3)
|
check_library_exists(sqlite3 sqlite3_open "" HAVE_SQLITE3)
|
||||||
if(HAVE_SQLITE3)
|
if(HAVE_SQLITE3)
|
||||||
leveldb_benchmark("${PROJECT_SOURCE_DIR}/doc/bench/db_bench_sqlite3.cc")
|
leveldb_benchmark("${PROJECT_SOURCE_DIR}/benchmarks/db_bench_sqlite3.cc")
|
||||||
target_link_libraries(db_bench_sqlite3 sqlite3)
|
target_link_libraries(db_bench_sqlite3 sqlite3)
|
||||||
endif(HAVE_SQLITE3)
|
endif(HAVE_SQLITE3)
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ int main() {
|
|||||||
" HAVE_KYOTOCABINET)
|
" HAVE_KYOTOCABINET)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQURED_LIBRARIES})
|
set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQURED_LIBRARIES})
|
||||||
if(HAVE_KYOTOCABINET)
|
if(HAVE_KYOTOCABINET)
|
||||||
leveldb_benchmark("${PROJECT_SOURCE_DIR}/doc/bench/db_bench_tree_db.cc")
|
leveldb_benchmark("${PROJECT_SOURCE_DIR}/benchmarks/db_bench_tree_db.cc")
|
||||||
target_link_libraries(db_bench_tree_db kyotocabinet)
|
target_link_libraries(db_bench_tree_db kyotocabinet)
|
||||||
endif(HAVE_KYOTOCABINET)
|
endif(HAVE_KYOTOCABINET)
|
||||||
endif(LEVELDB_BUILD_BENCHMARKS)
|
endif(LEVELDB_BUILD_BENCHMARKS)
|
||||||
|
@ -90,9 +90,9 @@ div.bsql {
|
|||||||
<h4>Benchmark Source Code</h4>
|
<h4>Benchmark Source Code</h4>
|
||||||
<p>We wrote benchmark tools for SQLite and Kyoto TreeDB based on LevelDB's <span class="code">db_bench</span>. The code for each of the benchmarks resides here:</p>
|
<p>We wrote benchmark tools for SQLite and Kyoto TreeDB based on LevelDB's <span class="code">db_bench</span>. The code for each of the benchmarks resides here:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li> <b>LevelDB:</b> <a href="http://code.google.com/p/leveldb/source/browse/trunk/db/db_bench.cc">db/db_bench.cc</a>.</li>
|
<li> <b>LevelDB:</b> <a href="https://github.com/google/leveldb/blob/master/benchmarks/db_bench.cc">benchmarks/db_bench.cc</a>.</li>
|
||||||
<li> <b>SQLite:</b> <a href="http://code.google.com/p/leveldb/source/browse/#svn%2Ftrunk%2Fdoc%2Fbench%2Fdb_bench_sqlite3.cc">doc/bench/db_bench_sqlite3.cc</a>.</li>
|
<li> <b>SQLite:</b> <a href="https://github.com/google/leveldb/blob/master/benchmarks/db_bench_sqlite3.cc">benchmarks/db_bench_sqlite3.cc</a>.</li>
|
||||||
<li> <b>Kyoto TreeDB:</b> <a href="http://code.google.com/p/leveldb/source/browse/#svn%2Ftrunk%2Fdoc%2Fbench%2Fdb_bench_tree_db.cc">doc/bench/db_bench_tree_db.cc</a>.</li>
|
<li> <b>Kyoto TreeDB:</b> <a href="https://github.com/google/leveldb/blob/master/benchmarks/db_bench_tree_db.cc">benchmarks/db_bench_tree_db.cc</a>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Custom Build Specifications</h4>
|
<h4>Custom Build Specifications</h4>
|
||||||
|
Loading…
Reference in New Issue
Block a user