Skip to content
2 changes: 1 addition & 1 deletion diskann-benchmark-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//! in which method can fail, the [`anyhow::Error`] type balances generality and fidelity.
mod internal;
pub(crate) mod utils;
pub mod utils;

// Public Utility Modules
pub mod recall;
Expand Down
3 changes: 2 additions & 1 deletion diskann-benchmark-core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

use diskann_benchmark_runner::utils::percentiles::AsF64Lossy;

pub(crate) fn average_all<I>(x: I) -> f64
/// Computes the arithmetic mean of an iterator of values, returning `0.0` when empty.
pub fn average_all<I>(x: I) -> f64
where
I: IntoIterator<Item: AsF64Lossy>,
{
Expand Down
22 changes: 22 additions & 0 deletions diskann-benchmark/example/flat-index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"search_directories": [
"test_data/disk_index_search"
],
"jobs": [
{
"type": "flat-search",
"content": {
"data": "disk_index_siftsmall_learn_256pts_data.fbin",
"data_type": "float32",
"distance": "squared_l2",
"search": {
"queries": "disk_index_sample_query_10pts.fbin",
"groundtruth": "disk_index_10pts_idx_uint32_truth_search_res.bin",
"k": 10,
"num_threads": [1],
"reps": 1
}
}
}
]
}
22 changes: 22 additions & 0 deletions diskann-benchmark/perf_test_inputs/wikipedia-100K-flat-index.json
Comment thread
arrayka marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"search_directories": [
"target/tmp"
],
"jobs": [
{
"type": "flat-search",
"content": {
"data": "wikipedia_cohere/wikipedia_base.bin.crop_nb_100000",
"data_type": "float32",
"distance": "inner_product",
"search": {
"queries": "wikipedia_cohere/wikipedia_query.bin",
"groundtruth": "wikipedia_cohere/wikipedia-100K",
"k": 100,
"num_threads": [4, 8],
"reps": 1
}
}
}
]
}
12 changes: 12 additions & 0 deletions diskann-benchmark/src/flat/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT license.
*/

use diskann_benchmark_runner::Registry;

mod search;

pub(crate) fn register_benchmarks(registry: &mut Registry) -> anyhow::Result<()> {
search::register_benchmarks(registry)
}
Loading
Loading