Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(cron): add timing probe for expression normalization

Steven Enamakeldd14913c7cff
diff --git a/crates/openhuman-core/src/cron/client_tests.rs b/crates/openhuman-core/src/cron/client_tests.rs
index 4563e55b7b..0fe30f40c7 100644
--- a/crates/openhuman-core/src/cron/client_tests.rs
+++ b/crates/openhuman-core/src/cron/client_tests.rs
@@ -1 +1,16 @@
use super::*;
+use std::time::Instant;
+
+#[tokio::test]
+async fn timing_probe() {
+ let config = Config::default();
+ let t = Instant::now();
+ crate::modules::tinyflows::proxy(&config).await.unwrap();
+ eprintln!("attach: {:?}", t.elapsed());
+ let t = Instant::now();
+ let normalized = normalize_expression(&config, "0 9 * * 1-5").await.unwrap();
+ eprintln!("first call: {:?} -> {normalized}", t.elapsed());
+ let t = Instant::now();
+ normalize_expression(&config, "0 9 * * 1-5").await.unwrap();
+ eprintln!("second call: {:?}", t.elapsed());
+}