pub struct PerformanceValidator {
pub config: PerformanceConfig,
/* private fields */
}Expand description
Performance validator for running large-scale tests.
Fields§
§config: PerformanceConfigPerformance configuration (public for test access).
Implementations§
Source§impl PerformanceValidator
impl PerformanceValidator
Sourcepub fn new(config: PerformanceConfig) -> Self
pub fn new(config: PerformanceConfig) -> Self
Create a new performance validator.
Sourcepub fn ten_thousand_connections() -> Self
pub fn ten_thousand_connections() -> Self
Create validator for 10K connection test.
Sourcepub fn hundred_thousand_tps() -> Self
pub fn hundred_thousand_tps() -> Self
Create validator for 100K TPS test.
Sourcepub fn add_target(&mut self, target: PerformanceTarget)
pub fn add_target(&mut self, target: PerformanceTarget)
Add a performance target.
Sourcepub fn server_addr(self, addr: SocketAddr) -> Self
pub fn server_addr(self, addr: SocketAddr) -> Self
Set server address.
Sourcepub async fn run(&self) -> Result<ValidationResult, String>
pub async fn run(&self) -> Result<ValidationResult, String>
Run the performance validation test.
Auto Trait Implementations§
impl Freeze for PerformanceValidator
impl !RefUnwindSafe for PerformanceValidator
impl Send for PerformanceValidator
impl Sync for PerformanceValidator
impl Unpin for PerformanceValidator
impl UnsafeUnpin for PerformanceValidator
impl !UnwindSafe for PerformanceValidator
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