Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

new db structure for benchmark tests

matthew-heartful22e8f38145d9
diff --git a/screenpipe-server/benches/db_benchmarks.rs b/screenpipe-server/benches/db_benchmarks.rs
index 2fd61269f..8e54318aa 100644
--- a/screenpipe-server/benches/db_benchmarks.rs
+++ b/screenpipe-server/benches/db_benchmarks.rs
@@ -13,7 +13,10 @@ async fn setup_large_db(size: usize) -> DatabaseManager {
let _video_id = db.insert_video_chunk("test_video.mp4").await.unwrap();
let frame_id = db.insert_frame().await.unwrap();
let ocr_text = format!("OCR text {}", rng.gen::<u32>());
- db.insert_ocr_text(frame_id, &ocr_text).await.unwrap();
+ let text_json = format!(r#"{{"text": "{}"}}"#, ocr_text);
+ let new_text_json_vs_previous_frame = format!(r#"{{"text": "{}"}}"#, ocr_text);
+ let raw_data_output_from_OCR = format!(r#"{{"output": "{}"}}"#, ocr_text);
+ db.insert_ocr_text(frame_id, &ocr_text, &text_json, &new_text_json_vs_previous_frame, &raw_data_output_from_OCR).await.unwrap();
let audio_id = db.insert_audio_chunk("test_audio.mp3").await.unwrap();
let audio_text = format!("Audio transcription {}", rng.gen::<u32>());
@@ -56,4 +59,4 @@ fn bench_search(c: &mut Criterion) {
}
criterion_group!(benches, bench_search);
-criterion_main!(benches);
+criterion_main!(benches);
\ No newline at end of file