aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-11 23:22:43 +0900
committernsfisis <nsfisis@gmail.com>2024-03-11 23:22:43 +0900
commita19354ea930054e848930f5f338b4c0c91bbb8bc (patch)
treef45d6ed12af642399f26de2cc0b90622f35a674d
parent75e14575b4ae1a0cc428ccf2944c314b0c908f93 (diff)
downloadphp-waddiwasi-a19354ea930054e848930f5f338b4c0c91bbb8bc.tar.gz
php-waddiwasi-a19354ea930054e848930f5f338b4c0c91bbb8bc.tar.zst
php-waddiwasi-a19354ea930054e848930f5f338b4c0c91bbb8bc.zip
feat: benchmark
-rw-r--r--Makefile4
-rw-r--r--benchmarks/20240311-2315.log4
2 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index db03d11..461246c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+.PHONY: bench
+bench:
+ hyperfine --warmup=1 --style=nocolor 'make run' | tee benchmarks/$$(date '+%Y%m%d-%H%M').log
+
.PHONY: run
run:
php -d memory_limit=4G -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php
diff --git a/benchmarks/20240311-2315.log b/benchmarks/20240311-2315.log
new file mode 100644
index 0000000..4f6fd4b
--- /dev/null
+++ b/benchmarks/20240311-2315.log
@@ -0,0 +1,4 @@
+Benchmark 1: make run
+ Time (mean ± σ): 31.903 s ± 2.675 s [User: 29.948 s, System: 1.209 s]
+ Range (min … max): 30.128 s … 39.100 s 10 runs
+