(&self, execution_context: &ExecutionContext)
| 177 | } |
| 178 | |
| 179 | async fn teardown(&self, execution_context: &ExecutionContext) -> Result<()> { |
| 180 | let results_dir = execution_context.profile_folder.join("results"); |
| 181 | let has_benchmarks = std::fs::read_dir(&results_dir)? |
| 182 | .filter_map(Result::ok) |
| 183 | // Filter out non-ExecutionTimestamps files: |
| 184 | .filter(|entry| { |
| 185 | entry |
| 186 | .file_name() |
| 187 | .to_string_lossy() |
| 188 | .contains(ExecutionTimestamps::name()) |
| 189 | }) |
| 190 | .filter_map(|entry| { |
| 191 | let file = std::fs::File::open(entry.path()).ok()?; |
| 192 | ExecutionTimestamps::decode_from_reader(file).ok() |
| 193 | }) |
| 194 | .any(|artifact| !artifact.uri_by_ts.is_empty()); |
| 195 | |
| 196 | if !has_benchmarks { |
| 197 | if !execution_context.config.allow_empty { |
| 198 | bail!("No memory results found in profile folder: {results_dir:?}."); |
| 199 | } else { |
| 200 | info!("No memory results found in profile folder: {results_dir:?}."); |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | Ok(()) |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | impl MemoryExecutor { |
no test coverage detected