(&self, ty: &str)
| 343 | } |
| 344 | |
| 345 | pub fn load(&self, ty: &str) -> eyre::Result<f32> { |
| 346 | let log_path = self.get_ty_usage_file(ty); |
| 347 | if !log_path.exists() { |
| 348 | return Ok(0_f32); |
| 349 | } |
| 350 | let buf = std::fs::read_to_string(log_path)?; |
| 351 | let usage: f32 = buf.parse()?; |
| 352 | Ok(usage) |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | /// GlobalTimeLogger is used to log and analyze the time cost of each submodule of PromptFuzz. |
no test coverage detected