| 148 | } |
| 149 | |
| 150 | async fn teardown(&self, execution_context: &ExecutionContext) -> Result<()> { |
| 151 | let Some(timestamps) = self.timestamps.get() else { |
| 152 | bail!("The benchmark process did not report its benchmarks"); |
| 153 | }; |
| 154 | if timestamps.uri_by_ts.is_empty() { |
| 155 | let message = format!("No benchmarks were run in {} mode", self.mode); |
| 156 | if !execution_context.config.allow_empty { |
| 157 | bail!( |
| 158 | "{message}. Were they built for it, e.g. with `cargo codspeed build -m {}`?", |
| 159 | self.mode |
| 160 | ); |
| 161 | } |
| 162 | info!("{message}."); |
| 163 | } |
| 164 | timestamps.save_to(&execution_context.profile_folder)?; |
| 165 | Ok(()) |
| 166 | } |
| 167 | } |