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

Function init_runtime_with_config

python/src/runtime.rs:151–166  ·  view source on GitHub ↗

Initialize runtime with custom configuration

(config: RuntimeConfig)

Source from the content-addressed store, hash-verified

149
150/// Initialize runtime with custom configuration
151pub(crate) fn init_runtime_with_config(config: RuntimeConfig) -> Result<(), std::io::Error> {
152 if GRAPHBIT_RUNTIME.get().is_some() {
153 warn!("Runtime already initialized, ignoring new configuration");
154 return Ok(());
155 }
156
157 let runtime = GraphBitRuntime::new(config)?;
158 GRAPHBIT_RUNTIME.set(runtime).map_err(|_| {
159 std::io::Error::new(
160 std::io::ErrorKind::AlreadyExists,
161 "Runtime already initialized",
162 )
163 })?;
164
165 Ok(())
166}
167
168/// Get runtime statistics for monitoring
169pub(crate) fn get_runtime_stats() -> Option<RuntimeStats> {

Callers 1

configure_runtimeFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected