(&self, execution_context: &ExecutionContext)
| 229 | } |
| 230 | |
| 231 | async fn teardown(&self, execution_context: &ExecutionContext) -> Result<()> { |
| 232 | let results_dir = execution_context.profile_folder.join("results"); |
| 233 | let has_benchmarks = std::fs::read_dir(&results_dir)? |
| 234 | .filter_map(Result::ok) |
| 235 | // Filter out non-ExecutionTimestamps files: |
| 236 | .filter(|entry| { |
| 237 | entry |
| 238 | .file_name() |
| 239 | .to_string_lossy() |
| 240 | .contains(ExecutionTimestamps::name()) |
| 241 | }) |
| 242 | .filter_map(|entry| { |
| 243 | let file = std::fs::File::open(entry.path()).ok()?; |
| 244 | ExecutionTimestamps::decode_from_reader(file).ok() |
| 245 | }) |
| 246 | .any(|artifact| !artifact.uri_by_ts.is_empty()); |
| 247 | |
| 248 | if !has_benchmarks { |
| 249 | if !execution_context.config.allow_empty { |
| 250 | bail!("No memory results found in profile folder: {results_dir:?}."); |
| 251 | } else { |
| 252 | info!("No memory results found in profile folder: {results_dir:?}."); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | Ok(()) |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | impl MemoryExecutor { |
no test coverage detected