Author: Remi Meier <[email protected]> Branch: extradoc Changeset: r5266:f530e6b6abe8 Date: 2014-05-26 15:51 +0200 http://bitbucket.org/pypy/extradoc/changeset/f530e6b6abe8/
Log: add some tool to measure residual mem usage over time diff --git a/talk/dls2014/misc/measure_memusage.sh b/talk/dls2014/misc/measure_memusage.sh new file mode 100755 --- /dev/null +++ b/talk/dls2014/misc/measure_memusage.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# invoke like +# ./measure_memusage.sh command to execute +# it uses 'top' and records its output in a tempfile (not deleted +# afterwards). The interval for measurements is 1s. The RES/VIRT/SHR +# should be in KiB. + +TMPFILE=$(tempfile) + +"$@" & +PID=$! + +top -d1 -b -i -p $PID > $TMPFILE & +MEMPID=$! + +wait $PID +kill $MEMPID + +cat $TMPFILE | egrep "(PID)|(^\W*$PID)" +echo "RESULTS in $TMPFILE" +#pypy-c ~/pypy/benchmarks/multithread/multithread-richards.py 100 4 2>/dev/null & top -d1 -b -i -p $(pidof pypy-c) > output _______________________________________________ pypy-commit mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-commit
