1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT license.
*/
//! # Shareable Infrastructure for Benchmarking Vector Indexing
//!
//! The purpose of this crate is to create abstractions and implementations for benchmarking
//! DiskANN vector indexing operations. We try to facilitate infrastructure that can be
//! shared across a range of [`diskann::provider::DataProvider`]s with stable APIs to enable
//!
//! * A tight benchmarking loop for developers performing performance optimization.
//! * Creating standalone binaries for CI benchmarking jobs.
//! * Shared infrastructure to facilitate developing new providers.
//!
//! # Algorithms
//!
//! - [`build`]: Tools for running parallelized index builds.
//! - [`build::graph`]: Built-in utilities for working with [`diskann::graph::DiskANNIndex`].
//!
//! - [`search`]: Tools for running parallelized search operations.
//! - [`search::graph`]: Built-in utilities for working with [`diskann::graph::DiskANNIndex`].
//!
//! - [`streaming`]: Tools for running streaming workloads consisting of inserts, deletes,
//! replaces, searches, etc.
//! - [`streaming::runbooks`]: Built-in [`streaming::Executor`]s for dynamic operations.
//! - [`streaming::runbooks::bigann`]: BigANN style runbook support.
//! - [`streaming::graph`]: Built-in utilities for working with [`diskann::graph::DiskANNIndex`].
//!
//! # Tools
//!
//! - [`recall`]: KNN-Recall and other accuracy measures.
//! - [`tokio`]: Quickly create new [`tokio::runtime::Runtime]`s.
//!
//! # Error Handling
//!
//! Index benchmark operations typically live high in a program's call stack and need to
//! support a wide variety of index implementations and thus error types. To that end,
//! [`anyhow::Error`] is typically used at API boundaries. While this does hide the ways
//! in which method can fail, the [`anyhow::Error`] type balances generality and fidelity.
pub
// Public Utility Modules
// Algorithms
/// # Notes on Testing
///
/// Some components in thsi framework (e.g. runbook parsing), have UX tests to report errors
/// encountered during parsing. The necessary input files and expected outputs are checked
/// in to the repo in the `tests` directory.
///
/// If error message change, the expected results can generally be regenerated by running
/// the test suite with the environment variable
/// ```text
/// DISKANN_BENCHMARK_TEST=true
/// ```
/// set.