MCPcopy Create free account
hub / github.com/apache/datafusion / build_runtime

Method build_runtime

benchmarks/src/util/options.rs:137–149  ·  view source on GitHub ↗

Build the runtime environment, optionally wrapping the local filesystem with a throttled object store to simulate remote storage latency.

(&self)

Source from the content-addressed store, hash-verified

135 /// Build the runtime environment, optionally wrapping the local filesystem
136 /// with a throttled object store to simulate remote storage latency.
137 pub fn build_runtime(&self) -> Result<Arc<RuntimeEnv>> {
138 let rt = self.runtime_env_builder()?.build_arc()?;
139 if self.simulate_latency {
140 let store: Arc<dyn object_store::ObjectStore> =
141 Arc::new(LatencyObjectStore::new(LocalFileSystem::new()));
142 let url = ObjectStoreUrl::parse("file:///")?;
143 rt.register_object_store(url.as_ref(), store);
144 println!(
145 "Simulating S3-like object store latency (get: 25-200ms, list: 40-400ms)"
146 );
147 }
148 Ok(rt)
149 }
150}
151
152/// Parse capacity limit from string to number of bytes by allowing units: K, M and G.

Callers 12

make_ctxFunction · 0.80
runMethod · 0.80
runMethod · 0.80
benchmark_queryMethod · 0.80
runMethod · 0.80
benchmark_queryMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
benchmark_queryMethod · 0.80

Calls 5

newFunction · 0.85
build_arcMethod · 0.80
runtime_env_builderMethod · 0.80
register_object_storeMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected