begin a new case. iterations added after this will be included in the new case
(&mut self, id: &str)
| 121 | } |
| 122 | /// begin a new case. iterations added after this will be included in the new case |
| 123 | pub fn start_new_case(&mut self, id: &str) { |
| 124 | self.queries.push(BenchQuery { |
| 125 | query: id.to_owned(), |
| 126 | iterations: vec![], |
| 127 | start_time: SystemTime::now(), |
| 128 | success: true, |
| 129 | }); |
| 130 | if let Some(c) = self.current_case.as_mut() { |
| 131 | *c += 1; |
| 132 | } else { |
| 133 | self.current_case = Some(0); |
| 134 | } |
| 135 | } |
| 136 | /// Write a new iteration to the current case |
| 137 | pub fn write_iter(&mut self, elapsed: Duration, row_count: usize) { |
| 138 | if let Some(idx) = self.current_case { |