Skip to content

Commit

Permalink
Adding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet committed Oct 20, 2023
1 parent 5f740ab commit 1f75ede
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion cpp/bench/ann/src/common/benchmark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ inline void printf_usage()
" [--data_prefix=<prefix>]\n"
" [--index_prefix=<prefix>]\n"
" [--override_kv=<key:value1:value2:...:valueN>]\n"
" [--mode=<latency|throughput>\n"
" <conf>.json\n"
"\n"
"Note the non-standard benchmark parameters:\n"
Expand All @@ -353,7 +354,10 @@ inline void printf_usage()
" --override_kv=<key:value1:value2:...:valueN>:"
" override a build/search key one or more times multiplying the number of configurations;"
" you can use this parameter multiple times to get the Cartesian product of benchmark"
" configs.\n");
" configs.\n"
" --mode=<latency|throughput>"
" run the benchmarks in latency (accumulate times spent in each batch) or "
" throughput (pipeline batches and measure end-to-end) mode\n");
}

template <typename T>
Expand Down
1 change: 1 addition & 0 deletions cpp/bench/ann/src/common/thread_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class ThreadPool {
{
// push a single empty task onto the queue and notify all threads,
// then wait for them to terminate

{
std::lock_guard<std::mutex> lock(mutex);
queue.push({});
Expand Down
2 changes: 1 addition & 1 deletion python/raft-ann-bench/src/raft-ann-bench/run/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def run_build_and_search(
"--benchmark_out_format=json",
"--benchmark_out="
+ f"{os.path.join(search_folder, f'{algo}.json')}",
"--mode=" % str(mode),
"--mode=%s" % mode,
]
if force:
cmd = cmd + ["--overwrite"]
Expand Down

0 comments on commit 1f75ede

Please sign in to comment.