summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cpuprofile.sh7
-rw-r--r--scripts/memprofile.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/cpuprofile.sh b/scripts/cpuprofile.sh
new file mode 100644
index 0000000..2f6f18b
--- /dev/null
+++ b/scripts/cpuprofile.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -eu
+
+go build ./json/profile/json.go
+./json.exe -cpuprofile cpu.out
+go tool pprof json.exe cpu.out
diff --git a/scripts/memprofile.sh b/scripts/memprofile.sh
new file mode 100644
index 0000000..0fdc5ec
--- /dev/null
+++ b/scripts/memprofile.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -eu
+
+go build ./json/profile/json.go
+./json.exe -memprofile mem.out
+go tool pprof json.exe mem.out