MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / get_runtime

Function get_runtime

python/src/runtime.rs:135–148  ·  view source on GitHub ↗

Get the optimized runtime instance with proper error handling

()

Source from the content-addressed store, hash-verified

133
134/// Get the optimized runtime instance with proper error handling
135pub(crate) fn get_runtime() -> &'static Runtime {
136 GRAPHBIT_RUNTIME
137 .get_or_init(|| {
138 let config = RuntimeConfig::default();
139 match GraphBitRuntime::new(config) {
140 Ok(runtime) => runtime,
141 Err(e) => {
142 error!("Critical error: Failed to create GraphBit runtime: {}", e);
143 panic!("Failed to create GraphBit runtime: {}", e);
144 }
145 }
146 })
147 .runtime()
148}
149
150/// Initialize runtime with custom configuration
151pub(crate) fn init_runtime_with_config(config: RuntimeConfig) -> Result<(), std::io::Error> {

Callers 15

load_documentMethod · 0.70
initFunction · 0.70
embedMethod · 0.50
embed_manyMethod · 0.50
embed_batch_parallelMethod · 0.50
completeMethod · 0.50
get_statsMethod · 0.50
reset_statsMethod · 0.50
complete_fullMethod · 0.50
newMethod · 0.50
addMethod · 0.50
searchMethod · 0.50

Calls 1

runtimeMethod · 0.80

Tested by

no test coverage detected