mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-28 19:28:11 -07:00
global: wip
This commit is contained in:
@@ -3,19 +3,19 @@ use std::path::Path;
|
||||
use brk_computer::Computer;
|
||||
use brk_indexer::Indexer;
|
||||
use brk_query::{Index, Query};
|
||||
use brk_vec::Computation;
|
||||
use brk_vec::{Computation, Format};
|
||||
|
||||
pub fn main() -> color_eyre::Result<()> {
|
||||
color_eyre::install()?;
|
||||
|
||||
let outputs_dir = Path::new("../../_outputs");
|
||||
|
||||
let compressed = true;
|
||||
let format = Format::Compressed;
|
||||
|
||||
let mut indexer = Indexer::new(outputs_dir, compressed, true)?;
|
||||
let mut indexer = Indexer::new(outputs_dir, format, true)?;
|
||||
indexer.import_vecs()?;
|
||||
|
||||
let mut computer = Computer::new(outputs_dir, None, compressed);
|
||||
let mut computer = Computer::new(outputs_dir, None, format);
|
||||
computer.import_vecs(&indexer, Computation::Lazy)?;
|
||||
|
||||
let query = Query::build(&indexer, &computer);
|
||||
|
||||
@@ -20,10 +20,17 @@ impl<'a> VecTrees<'a> {
|
||||
&& !(split.len() == 3
|
||||
&& split.get(1).is_some_and(|s| {
|
||||
s == &"up"
|
||||
|| s == &"start"
|
||||
|| s.ends_with("relative")
|
||||
|| s.starts_with("from")
|
||||
|| s == &"cumulative_up"
|
||||
|| s.starts_with("cumulative_from")
|
||||
}))
|
||||
&& !(split.len() == 4
|
||||
&& split
|
||||
.get(1)
|
||||
.is_some_and(|s| s == &"up" || s == &"start" || s.starts_with("from"))
|
||||
&& split.get(2).is_some_and(|s| s.ends_with("relative")))
|
||||
{
|
||||
dbg!(&name, &split);
|
||||
panic!();
|
||||
|
||||
Reference in New Issue
Block a user