refactor(tvix): move service addrs into shared clap struct

Change-Id: I7cab29ecfa1823c2103b4c47b7d784bc31459d55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12008
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
This commit is contained in:
Yureka 2024-07-21 16:41:09 +02:00 committed by yuka
parent 6774d9c59c
commit 67335c41b7
12 changed files with 132 additions and 149 deletions

View file

@ -1,3 +1,4 @@
use clap::Parser;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use lazy_static::lazy_static;
use std::{env, rc::Rc, sync::Arc, time::Duration};
@ -11,7 +12,7 @@ use tvix_glue::{
tvix_io::TvixIO,
tvix_store_io::TvixStoreIO,
};
use tvix_store::utils::construct_services;
use tvix_store::utils::{construct_services, ServiceUrlsMemory};
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
@ -27,7 +28,9 @@ fn interpret(code: &str) {
// piece of code. b/262
let (blob_service, directory_service, path_info_service, nar_calculation_service) =
TOKIO_RUNTIME
.block_on(async { construct_services("memory://", "memory://", "memory://").await })
.block_on(async {
construct_services(ServiceUrlsMemory::parse_from(std::iter::empty::<&str>())).await
})
.unwrap();
// We assemble a complete store in memory.