summaryrefslogtreecommitdiff
path: root/scripts/bin/benchmark.rs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bin/benchmark.rs')
-rw-r--r--scripts/bin/benchmark.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/bin/benchmark.rs b/scripts/bin/benchmark.rs
new file mode 100644
index 0000000..24f672d
--- /dev/null
+++ b/scripts/bin/benchmark.rs
@@ -0,0 +1,16 @@
+use std::time::Instant;
+
+use scripts::ScriptManager;
+
+fn main() {
+ let mut manager = ScriptManager::new();
+ let start = Instant::now();
+ manager
+ .add_wasm_script(Box::from("example"), "bin/ex.wat", false)
+ .unwrap();
+ println!("Took {} microseconds", start.elapsed().as_micros());
+
+ let start = Instant::now();
+ manager.run_update_scripts();
+ println!("Took {} microseconds", start.elapsed().as_micros());
+}