diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-03-29 07:44:31 -0700 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-03-29 07:44:31 -0700 |
commit | 921aacaeec41ef3b62d2c1650f9f872eea921013 (patch) | |
tree | d12db36a7cedb1d3ce93da2fab0a227d46507a74 /tests/test-json-instruction-count | |
parent | 4c0ab8af125ecdac6690bc56ab60f0059bafad9f (diff) | |
parent | 11ee75120bad73033ccd1ec1ceb919395023084e (diff) | |
download | libdbusmenu-921aacaeec41ef3b62d2c1650f9f872eea921013.tar.gz libdbusmenu-921aacaeec41ef3b62d2c1650f9f872eea921013.tar.bz2 libdbusmenu-921aacaeec41ef3b62d2c1650f9f872eea921013.zip |
merge lp:~ted/dbusmenu/instruction-count-testing to support benchmarking based on callgrind measurements h/t Chase
Diffstat (limited to 'tests/test-json-instruction-count')
-rwxr-xr-x | tests/test-json-instruction-count | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-json-instruction-count b/tests/test-json-instruction-count new file mode 100755 index 0000000..3a4db97 --- /dev/null +++ b/tests/test-json-instruction-count @@ -0,0 +1,6 @@ +#!/bin/sh + +COMMAND=$@ +INSTRUCTIONS=`valgrind --tool=callgrind --callgrind-out-file=/dev/null --instr-atstart=no --collect-atstart=no --combine-dumps=yes $COMMAND 2>&1 > /dev/null | grep refs | grep I | tail --lines=1 | cut -d ":" -f 2 | sed -e 's/^[ \t]*//'` + +echo "Instructions needed to execute '$COMMAND': $INSTRUCTIONS" |