Skip to content

Commit 113a786

Browse files
authored
Add: Metadata for observability (#508)
--------- Co-authored-by: Mikhail Bautin <[email protected]>
1 parent c27c99d commit 113a786

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

include/usearch/index.hpp

+12
Original file line numberDiff line numberDiff line change
@@ -3175,6 +3175,18 @@ class index_gt {
31753175

31763176
std::size_t memory_usage_per_node(level_t level) const noexcept { return node_bytes_(level); }
31773177

3178+
double inverse_log_connectivity() const {
3179+
return pre_.inverse_log_connectivity;
3180+
}
3181+
3182+
std::size_t neighbors_base_bytes() const {
3183+
return pre_.neighbors_base_bytes;
3184+
}
3185+
3186+
std::size_t neighbors_bytes() const {
3187+
return pre_.neighbors_bytes;
3188+
}
3189+
31783190
#if defined(USEARCH_USE_PRAGMA_REGION)
31793191
#pragma endregion
31803192

include/usearch/index_dense.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,9 @@ class index_dense_gt {
693693
std::size_t max_level() const { return typed_->max_level(); }
694694
index_dense_config_t const& config() const { return config_; }
695695
index_limits_t const& limits() const { return typed_->limits(); }
696+
double inverse_log_connectivity() const { return typed_->inverse_log_connectivity(); }
697+
std::size_t neighbors_base_bytes() const { return typed_->neighbors_base_bytes(); }
698+
std::size_t neighbors_bytes() const { return typed_->neighbors_bytes(); }
696699
bool multi() const { return config_.multi; }
697700
std::size_t currently_available_threads() const {
698701
std::unique_lock<std::mutex> available_threads_lock(available_threads_mutex_);

0 commit comments

Comments
 (0)