Skip to content

Commit

Permalink
extreme sub-tree size limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusmanske committed Jan 22, 2024
1 parent a89a1d3 commit e703ff7
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/datasource_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1370,23 +1370,4 @@ mod tests {
let result = simulate_category_query(params).await.unwrap();
assert!(result.len().unwrap() > 0);
}


use std::time::Instant;

#[tokio::test]
async fn test_cat_db() {
let state = get_state().await;
let params = SourceDatabaseParameters::new();
let dbs = SourceDatabase::new(params);
let category = "Monochrome photographs";
let depth = 100;

println!("RUNNING");

let start_time = Instant::now();
let result = dbs.get_categories_in_tree(&state,"commonswiki",category,depth).await.unwrap();
let end_time = Instant::now();
println!("ORIG: {} pages in {:.2}",result.len(),(end_time-start_time).as_secs_f64());
}
}

0 comments on commit e703ff7

Please sign in to comment.