MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / add_data

Method add_data

hail-fuzz/src/queue.rs:93–111  ·  view source on GitHub ↗
(&mut self, data: D)

Source from the content-addressed store, hash-verified

91
92impl<D> CorpusStore<D> {
93 fn add_data(&mut self, data: D) -> InputId {
94 let id = self.test_cases.len();
95 self.test_cases.push(TestCase {
96 data,
97 stage_data: HashMap::new(),
98 metadata: InputMetadata {
99 id,
100 found_at: self.start_time.elapsed().as_millis() as u64,
101 ..Default::default()
102 },
103 blocks: None,
104 // Inputs are added when they cover new coverage bits, so they are always favoured
105 // initially.
106 favored: true,
107 has_unique_edge: false,
108 is_import: false,
109 });
110 id
111 }
112
113 /// Returns the total number of test cases in the corpus
114 pub fn inputs(&self) -> usize {

Callers 1

addMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected