Assigns a weight to the input which is used to determine which of the new inputs we should try fuzzing first.
(&self)
| 406 | /// Assigns a weight to the input which is used to determine which of the new inputs we should |
| 407 | /// try fuzzing first. |
| 408 | fn weight(&self) -> impl Ord { |
| 409 | // Fuzz smaller inputs first, but maximize the number of streams that have been found. |
| 410 | // (std::cmp::Reverse(self.streams), self.len) |
| 411 | |
| 412 | // Fuzz faster inputs that hit more new bits. |
| 413 | std::cmp::Reverse((self.icount as f64 / self.new_bits as f64).round() as u64) |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | impl PartialOrd for NewInput { |