Skip to content

Commit 192d2a0

Browse files
committed
Allow pprof format for profile output
1 parent ac4bb74 commit 192d2a0

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

run_profiling.sh

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
11
#!/bin/bash
22

3-
cabal v2-run --enable-profiling dataframe -- +RTS -hy -l-agu
3+
PROF_TYPE=""
4+
5+
if [ -z "$1" ]; then
6+
# Default to eventlog profile if no argument given
7+
PROF_TYPE="eventlog"
8+
else
9+
case "$1" in
10+
"eventlog")
11+
PROF_TYPE="eventlog"
12+
;;
13+
"pprof")
14+
PROF_TYPE="pprof"
15+
;;
16+
*)
17+
echo "invalid profile type $1, should be one of 'eventlog' or 'pprof'"
18+
exit 1
19+
;;
20+
esac
21+
fi
22+
23+
case "$PROF_TYPE" in
24+
"eventlog")
25+
cabal v2-run --enable-profiling dataframe -- +RTS -hy -l-agu
26+
;;
27+
"pprof")
28+
cabal v2-run --enable-profiling dataframe -- +RTS -pj -RTS
29+
;;
30+
esac

0 commit comments

Comments
 (0)