mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
bencher: add args duration and summarize_last (seconds)
This commit is contained in:
parent
7863782413
commit
85862f161a
4 changed files with 65 additions and 42 deletions
|
|
@ -45,7 +45,11 @@ pub struct RunConfig<C> {
|
|||
}
|
||||
|
||||
impl<C> RunConfig<C> {
|
||||
pub fn run(self, command: &C) -> Result<RunSuccessResults, RunErrorResults<C>> {
|
||||
pub fn run(
|
||||
self,
|
||||
command: &C,
|
||||
duration: usize,
|
||||
) -> Result<RunSuccessResults, RunErrorResults<C>> {
|
||||
let mut tracker_config_file = NamedTempFile::new().unwrap();
|
||||
let mut load_test_config_file = NamedTempFile::new().unwrap();
|
||||
|
||||
|
|
@ -75,7 +79,7 @@ impl<C> RunConfig<C> {
|
|||
}
|
||||
};
|
||||
|
||||
for _ in 0..59 {
|
||||
for _ in 0..(duration - 1) {
|
||||
if let Ok(Some(status)) = tracker.0.try_wait() {
|
||||
return Err(RunErrorResults::new(self)
|
||||
.set_tracker_outputs(tracker)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue