#!/bin/bash | |
# Run args as command, but run memprofile and then pprof to capture test memprofile output | |
mpf="${BENT_PROFILES}/${BENT_BINARY}_${BENT_I}.mprof" | |
mkdir -p ${BENT_PROFILES} | |
"$@" -test.memprofile="$mpf" | |
echo memprofile in "$mpf" | |
go tool pprof --alloc_space --text --cum --nodecount=20 "$mpf" |