Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forwards compatible Bencher Client #19

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ci-bench-runner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci-bench-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
anyhow = "1.0.75"
askama = { version = "0.12.1", default-features = false }
axum = "0.6.20"
bencher_client = { git = "https://github.com/bencherdev/bencher", rev = "3a9945f" }
bencher_client = { git = "https://github.com/bencherdev/bencher", rev = "eb15929" }
hex = "0.4.3"
hmac = "0.12.1"
hyper = { version = "0.14.27", default-features = false }
Expand Down
24 changes: 10 additions & 14 deletions ci-bench-runner/src/bencher_dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::sync::Arc;

use bencher_client::json::project::measure::{INSTRUCTIONS_SLUG_STR, LATENCY_SLUG_STR};
use bencher_client::{
json::{DateTime, JsonMetric, JsonMetricsMap, JsonReport, JsonResultsMap, Measure},
json::{DateTime, JsonMetric, JsonMetricsMap, JsonResultsMap, Measure},
types::{Adapter, JsonNewReport, JsonReportSettings},
BencherClient,
};
Expand Down Expand Up @@ -63,19 +63,15 @@ impl BencherDev {
let project_id = self.config.project_id.clone();
let project_id = &project_id;
let report = &report;
let _: JsonReport = self
.client
.send_with(
|client| async move {
client
.proj_report_post()
.project(project_id.clone())
.body(report.clone())
.send()
.await
},
false,
)
self.client
.send(|client| async move {
client
.proj_report_post()
.project(project_id.clone())
.body(report.clone())
.send()
.await
})
.await?;

Ok(())
Expand Down
Loading