aboutsummaryrefslogtreecommitdiff
path: root/tests/test-json-instruction-count
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-29 11:33:24 -0700
committerCharles Kerr <charles.kerr@canonical.com>2012-03-29 11:33:24 -0700
commitbc392e208fa1f9b46c77ea8142dadd629722663a (patch)
tree360ea9101d0ae45fdba3e3a15d4eaab7de587793 /tests/test-json-instruction-count
parentebab055ed741101f59c320367eb8be7484555a48 (diff)
parent86df02fa5a703cacd492db1b999f9449c3247c6b (diff)
downloadlibdbusmenu-bc392e208fa1f9b46c77ea8142dadd629722663a.tar.gz
libdbusmenu-bc392e208fa1f9b46c77ea8142dadd629722663a.tar.bz2
libdbusmenu-bc392e208fa1f9b46c77ea8142dadd629722663a.zip
Import upstream version 0.5.96
Diffstat (limited to 'tests/test-json-instruction-count')
-rwxr-xr-xtests/test-json-instruction-count6
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"