Discovers and caches the suite's benchmark query files. Query files are found by recursively scanning from the suite directory, accepting only `qNN.benchmark` files, sorting by numeric query id, and rejecting duplicate ids.
(&self)
| 138 | /// accepting only `qNN.benchmark` files, sorting by numeric query id, and |
| 139 | /// rejecting duplicate ids. |
| 140 | pub fn discover_queries(&self) -> Result<Vec<SuiteQuery>> { |
| 141 | if let Some(queries) = self.query_cache.get() { |
| 142 | return Ok(queries.clone()); |
| 143 | } |
| 144 | |
| 145 | let queries = self.scan_queries()?; |
| 146 | let _ = self.query_cache.set(queries.clone()); |
| 147 | Ok(queries) |
| 148 | } |
| 149 | |
| 150 | /// Performs uncached query discovery and duplicate-id validation. |
| 151 | fn scan_queries(&self) -> Result<Vec<SuiteQuery>> { |