aboutsummaryrefslogtreecommitdiff
path: root/tests/test-json-instruction-count
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2012-03-29 15:20:43 -0400
committerKen VanDine <ken.vandine@canonical.com>2012-03-29 15:20:43 -0400
commit8a0d944aa5c0578d55693f474599199471ce91e1 (patch)
treede9d4f0b0aaf6bf530360d6a07c3b153902a7e6f /tests/test-json-instruction-count
parentf6700613c6b065885a8184a0795fbf8f00632774 (diff)
parent86a192f69a22c48c5aa3965310be3b04f1f3e379 (diff)
downloadlibdbusmenu-8a0d944aa5c0578d55693f474599199471ce91e1.tar.gz
libdbusmenu-8a0d944aa5c0578d55693f474599199471ce91e1.tar.bz2
libdbusmenu-8a0d944aa5c0578d55693f474599199471ce91e1.zip
* New upstream release.
* Faster menuitem lookups (LP: #801699) * To reduce dbus traffic, only send event replies when the caller requests them * Added support for callgrind-based benchmarks * Minor code cleanup
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"