Skip to content

Commit

Permalink
baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
agola11 committed Oct 24, 2024
1 parent 4774da2 commit 14f5817
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust/crates/langsmith_tracing_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ criterion = { version = "0.5.1", features = ["async_tokio"] }

[[bench]]
name = "tracing_client_benchmark"
harness = false
harness = false
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ fn bench_run_create_iter_custom(c: &mut Criterion) {
let mut elapsed_time = Duration::default();
let server_url = server_url.clone();
async move {
println!("Iterations: {}", iters);
for _ in 0..iters {
let runs: Vec<RunCreateExtended> = (0..num_runs)
.map(|i| {
Expand All @@ -181,10 +180,8 @@ fn bench_run_create_iter_custom(c: &mut Criterion) {
}
// shutdown the client to flush the queue
client.shutdown().await.unwrap();
println!("Elapsed time inner loop: {:?}", start.elapsed());
elapsed_time += start.elapsed();
}
println!("Elapsed time: {:?}", elapsed_time);
elapsed_time
}
})
Expand All @@ -199,7 +196,7 @@ fn bench_run_create_iter_custom(c: &mut Criterion) {
criterion_group! {
name = benches;
config = Criterion::default().sample_size(10);
targets = bench_run_create_iter_custom, bench_run_create
targets = bench_run_create
}

criterion_main!(benches);
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ impl RunProcessor {

async fn send_batch(&self, batch: Vec<QueuedRun>) -> Result<(), TracingClientError> {
let mut form = Form::new();
// println!("Sending batch of {} runs", batch.len());

for queued_run in batch {
match queued_run {
Expand Down

0 comments on commit 14f5817

Please sign in to comment.