pub struct BaselineClient { /* private fields */ }Expand description
High-level client for the perfgate baseline service.
Implementations§
Source§impl BaselineClient
impl BaselineClient
Sourcepub fn new(config: ClientConfig) -> Result<Self, ClientError>
pub fn new(config: ClientConfig) -> Result<Self, ClientError>
Creates a new BaselineClient from the given configuration.
Sourcepub async fn upload_baseline(
&self,
project: &str,
request: &UploadBaselineRequest,
) -> Result<UploadBaselineResponse, ClientError>
pub async fn upload_baseline( &self, project: &str, request: &UploadBaselineRequest, ) -> Result<UploadBaselineResponse, ClientError>
Uploads a new baseline to the server.
Sourcepub async fn get_latest_baseline(
&self,
project: &str,
benchmark: &str,
) -> Result<BaselineRecord, ClientError>
pub async fn get_latest_baseline( &self, project: &str, benchmark: &str, ) -> Result<BaselineRecord, ClientError>
Gets the latest baseline for a benchmark.
Sourcepub async fn get_baseline_version(
&self,
project: &str,
benchmark: &str,
version: &str,
) -> Result<BaselineRecord, ClientError>
pub async fn get_baseline_version( &self, project: &str, benchmark: &str, version: &str, ) -> Result<BaselineRecord, ClientError>
Gets a specific version of a baseline.
Sourcepub async fn promote_baseline(
&self,
project: &str,
benchmark: &str,
request: &PromoteBaselineRequest,
) -> Result<PromoteBaselineResponse, ClientError>
pub async fn promote_baseline( &self, project: &str, benchmark: &str, request: &PromoteBaselineRequest, ) -> Result<PromoteBaselineResponse, ClientError>
Promotes a baseline to a new version.
Sourcepub async fn list_baselines(
&self,
project: &str,
query: &ListBaselinesQuery,
) -> Result<ListBaselinesResponse, ClientError>
pub async fn list_baselines( &self, project: &str, query: &ListBaselinesQuery, ) -> Result<ListBaselinesResponse, ClientError>
Lists baselines for a project.
Sourcepub async fn delete_baseline(
&self,
project: &str,
benchmark: &str,
version: &str,
) -> Result<(), ClientError>
pub async fn delete_baseline( &self, project: &str, benchmark: &str, version: &str, ) -> Result<(), ClientError>
Deletes a baseline from the server.
Sourcepub async fn submit_verdict(
&self,
project: &str,
request: &SubmitVerdictRequest,
) -> Result<VerdictRecord, ClientError>
pub async fn submit_verdict( &self, project: &str, request: &SubmitVerdictRequest, ) -> Result<VerdictRecord, ClientError>
Submits a benchmark verdict to the server.
Sourcepub async fn list_verdicts(
&self,
project: &str,
query: &ListVerdictsQuery,
) -> Result<ListVerdictsResponse, ClientError>
pub async fn list_verdicts( &self, project: &str, query: &ListVerdictsQuery, ) -> Result<ListVerdictsResponse, ClientError>
Lists verdicts for a project.
Sourcepub async fn health_check(&self) -> Result<HealthResponse, ClientError>
pub async fn health_check(&self) -> Result<HealthResponse, ClientError>
Checks the health of the baseline service.
Sourcepub async fn is_healthy(&self) -> bool
pub async fn is_healthy(&self) -> bool
Returns true if the service is reachable and healthy.
Trait Implementations§
Source§impl Clone for BaselineClient
impl Clone for BaselineClient
Source§fn clone(&self) -> BaselineClient
fn clone(&self) -> BaselineClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BaselineClient
impl !RefUnwindSafe for BaselineClient
impl Send for BaselineClient
impl Sync for BaselineClient
impl Unpin for BaselineClient
impl UnsafeUnpin for BaselineClient
impl !UnwindSafe for BaselineClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more