Struct google_api_proto::google::devtools::testing::v1::SmartSharding
source · pub struct SmartSharding {
pub targeted_shard_duration: Option<Duration>,
}
Expand description
Shards test based on previous test case timing records.
Fields§
§targeted_shard_duration: Option<Duration>
The amount of time tests within a shard should take.
Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes).
The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if:
- The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards.
- Any individual test is estimated to be longer than the targeted shard duration.
Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are:
- If the service has processed a test case in the last 30 days, the record of the latest successful test case will be used.
- For new test cases, the average duration of other known test cases will be used.
- If there are no previous test case timing records available, the default test case duration is 15 seconds.
Because the actual shard duration can exceed the targeted shard duration, we recommend that you set the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or that you use the custom test timeout value that you set. This approach avoids cancelling the shard before all tests can finish.
Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 200. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created counts toward daily test quota.
Trait Implementations§
source§impl Clone for SmartSharding
impl Clone for SmartSharding
source§fn clone(&self) -> SmartSharding
fn clone(&self) -> SmartSharding
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SmartSharding
impl Debug for SmartSharding
source§impl Default for SmartSharding
impl Default for SmartSharding
source§impl Message for SmartSharding
impl Message for SmartSharding
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for SmartSharding
impl PartialEq for SmartSharding
source§fn eq(&self, other: &SmartSharding) -> bool
fn eq(&self, other: &SmartSharding) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for SmartSharding
impl StructuralPartialEq for SmartSharding
Auto Trait Implementations§
impl Freeze for SmartSharding
impl RefUnwindSafe for SmartSharding
impl Send for SmartSharding
impl Sync for SmartSharding
impl Unpin for SmartSharding
impl UnwindSafe for SmartSharding
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request