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

fix: benchmarks@

Louis Beaumonte42979135c89
diff --git a/screenpipe-server/benches/db_benchmarks.rs b/screenpipe-server/benches/db_benchmarks.rs
index f0348c068..fe223df8b 100644
--- a/screenpipe-server/benches/db_benchmarks.rs
+++ b/screenpipe-server/benches/db_benchmarks.rs
@@ -44,6 +44,8 @@ async fn setup_large_db(size: usize) -> DatabaseManager {
screenpipe_audio::DeviceType::Input,
),
None,
+ None,
+ None,
)
.await
.unwrap();
diff --git a/screenpipe-vision/benches/apple_leak_bench.rs b/screenpipe-vision/benches/apple_leak_bench.rs
index 07452038c..e9bff5d04 100644
--- a/screenpipe-vision/benches/apple_leak_bench.rs
+++ b/screenpipe-vision/benches/apple_leak_bench.rs
@@ -1,3 +1,4 @@
+use cidre::ns;
use criterion::{criterion_group, criterion_main, Criterion};
use image::GenericImageView;
use memory_stats::memory_stats;
@@ -38,7 +39,8 @@ fn apple_ocr_benchmark(c: &mut Criterion) {
}
}
- let result = perform_ocr_apple(&image, vec![]);
+ let result =
+ perform_ocr_apple(&image, &ns::ArrayMut::<ns::String>::with_capacity(0));
assert!(
result.0.contains("receiver_count"),
"OCR failed: {:?}",
diff --git a/screenpipe-vision/benches/vision_benchmark.rs b/screenpipe-vision/benches/vision_benchmark.rs
index ba07dd6bb..b3b5ea0f2 100644
--- a/screenpipe-vision/benches/vision_benchmark.rs
+++ b/screenpipe-vision/benches/vision_benchmark.rs
@@ -3,7 +3,10 @@
// cargo bench --bench vision_benchmark
// ! not very useful bench
+use std::sync::Arc;
+
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
+use screenpipe_vision::capture_screenshot_by_window::WindowFilters;
use screenpipe_vision::monitor::get_default_monitor;
use screenpipe_vision::{continuous_capture, OcrEngine};
use tokio::sync::mpsc;
@@ -12,16 +15,16 @@ use tokio::time::Duration;
async fn benchmark_continuous_capture(duration_secs: u64) -> f64 {
let (result_tx, mut result_rx) = mpsc::channel(100);
+ let window_filters = Arc::new(WindowFilters::new(&[], &[]));
let capture_handle = tokio::spawn(async move {
continuous_capture(
result_tx,
Duration::from_millis(100),
- false,
OcrEngine::Tesseract,
get_default_monitor().await.id(),
- &[],
- &[],
+ window_filters,
vec![],
+ false,
)
.await;
});