Cleanup and load test

This commit is contained in:
Dominik Werder
2023-07-21 23:06:15 +02:00
parent 9314c58a9b
commit 7c26b72537
16 changed files with 171 additions and 118 deletions

View File

@@ -5,12 +5,8 @@ authors = ["Dominik Werder <dominik.werder@gmail.com>"]
edition = "2021"
[dependencies]
tokio = { version = "1.22.0", features = ["rt-multi-thread", "io-util", "net", "time", "sync", "fs"] }
hyper = "0.14"
http = "0.2"
tracing = "0.1.25"
tracing-subscriber = "0.2.17"
futures-core = "0.3.14"
futures-util = "0.3.14"
bytes = "1.0.1"
#dashmap = "3"

View File

@@ -0,0 +1,7 @@
fn main() {
let names = ["DEBUG", "OPT_LEVEL", "TARGET", "CARGO_ENCODED_RUSTFLAGS"];
for name in names {
let val = std::env::var(name).unwrap();
println!("cargo:rustc-env=DAQBUF_{}={}", name, val);
}
}

View File

@@ -15,6 +15,7 @@ use netpod::NodeConfig;
use netpod::NodeConfigCached;
use netpod::ProxyConfig;
use netpod::ServiceVersion;
use taskrun::tokio;
use tokio::fs::File;
use tokio::io::AsyncReadExt;
@@ -66,6 +67,14 @@ async fn go() -> Result<(), Error> {
SubCmd::Retrieval(subcmd) => {
info!("daqbuffer version {} 0000", clap::crate_version!());
info!("{:?}", service_version);
{
#[allow(non_snake_case)]
let TARGET = std::env!("DAQBUF_TARGET");
#[allow(non_snake_case)]
let CARGO_ENCODED_RUSTFLAGS = std::env!("DAQBUF_CARGO_ENCODED_RUSTFLAGS");
info!("TARGET: {:?}", TARGET);
info!("CARGO_ENCODED_RUSTFLAGS: {:?}", CARGO_ENCODED_RUSTFLAGS);
}
let mut config_file = File::open(&subcmd.config).await?;
let mut buf = Vec::new();
config_file.read_to_end(&mut buf).await?;