From 11ee75120bad73033ccd1ec1ceb919395023084e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 28 Mar 2012 23:30:40 -0500 Subject: Adding in a test to print the number of instructions it takes to export a menu --- tests/test-json-instruction-count | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 tests/test-json-instruction-count (limited to 'tests/test-json-instruction-count') 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" -- cgit v1.2.3