aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-05 23:36:41 +0900
committernsfisis <nsfisis@gmail.com>2024-07-05 23:37:43 +0900
commit422e089207b4874f0cff25a376dc46a375953db9 (patch)
treecdc9ecd34c144a80a9a2fcc2785c7bd00a23da28 /tools
parent19fed09a55e07bafbfbb32fd90a0d53c676c9af6 (diff)
downloadphp-waddiwasi-422e089207b4874f0cff25a376dc46a375953db9.tar.gz
php-waddiwasi-422e089207b4874f0cff25a376dc46a375953db9.tar.zst
php-waddiwasi-422e089207b4874f0cff25a376dc46a375953db9.zip
chore: remove bench/perf logs
Diffstat (limited to 'tools')
-rw-r--r--tools/bench.sh1
-rw-r--r--tools/prof.sh5
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/bench.sh b/tools/bench.sh
new file mode 100644
index 0000000..feeb714
--- /dev/null
+++ b/tools/bench.sh
@@ -0,0 +1 @@
+hyperfine --warmup=1 --style=nocolor 'php -d zend.assertions=-1 -d memory_limit=512M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php' | tee benchmarks/$(date '+%Y%m%d-%H%M').log
diff --git a/tools/prof.sh b/tools/prof.sh
new file mode 100644
index 0000000..ef9d280
--- /dev/null
+++ b/tools/prof.sh
@@ -0,0 +1,5 @@
+timestamp="$(date '+%Y%m%d-%H%M')"
+# php -d 'error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED' vendor/bin/reli inspector:trace -o traces/"$timestamp".log -- php -d memory_limit=512M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2> traces/"$timestamp".stderr.log
+# vendor/bin/reli converter:flamegraph < traces/"$timestamp".log > traces/"$timestamp".svg
+
+php -d zend.assertions=-1 -d memory_limit=512M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2> traces/"$timestamp".stderr.log