aboutsummaryrefslogtreecommitdiff
path: root/tests/test-json-instruction-count
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-29 11:34:08 -0700
committerCharles Kerr <charles.kerr@canonical.com>2012-03-29 11:34:08 -0700
commite58eb9f420b0ea6b4830f78027dfddc5a28ec46d (patch)
tree2b364913f9e73bd88da7f507c4658072e68d1996 /tests/test-json-instruction-count
parent73a2c824dc830cef9577f0993e83bd699fa60362 (diff)
parentbc392e208fa1f9b46c77ea8142dadd629722663a (diff)
downloadlibdbusmenu-e58eb9f420b0ea6b4830f78027dfddc5a28ec46d.tar.gz
libdbusmenu-e58eb9f420b0ea6b4830f78027dfddc5a28ec46d.tar.bz2
libdbusmenu-e58eb9f420b0ea6b4830f78027dfddc5a28ec46d.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"