MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / run

Function run

src/storage/examples/upsert_open_loop.rs:299–331  ·  view source on GitHub ↗
(args: Args)

Source from the content-addressed store, hash-verified

297}
298
299pub async fn run(args: Args) -> Result<(), anyhow::Error> {
300 let metrics_registry = MetricsRegistry::new();
301 {
302 let metrics_registry = metrics_registry.clone();
303 info!(
304 "serving internal HTTP server on http://{}/metrics",
305 args.internal_http_listen_addr
306 );
307
308 let listener = TcpListener::bind(&args.internal_http_listen_addr)
309 .await
310 .expect("can bind");
311 mz_ore::task::spawn(
312 || "http_server",
313 axum::serve(
314 listener,
315 axum::Router::new()
316 .route(
317 "/metrics",
318 axum::routing::get(move |headers: axum::http::HeaderMap| async move {
319 mz_http_util::handle_prometheus(&metrics_registry, headers).await
320 }),
321 )
322 .into_make_service(),
323 )
324 .into_future(),
325 );
326 }
327
328 let num_sources = args.num_sources;
329 let num_workers = args.num_timely_workers;
330 run_benchmark(args, metrics_registry, num_sources, num_workers).await
331}
332
333async fn run_benchmark(
334 args: Args,

Callers 1

mainFunction · 0.70

Calls 9

spawnFunction · 0.85
handle_prometheusFunction · 0.85
expectMethod · 0.80
routeMethod · 0.80
run_benchmarkFunction · 0.70
serveFunction · 0.50
getFunction · 0.50
cloneMethod · 0.45
into_futureMethod · 0.45

Tested by

no test coverage detected