~ps-jenkins/libdbusmenu/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/test-json-instruction-count

  • Committer: Ted Gould
  • Date: 2012-03-29 04:30:40 UTC
  • mto: This revision was merged to the branch mainline in revision 395.
  • Revision ID: ted@gould.cx-20120329043040-fr7yp67tyv0slru5
Adding in a test to print the number of instructions it takes to export a menu

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
COMMAND=$@
 
4
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]*//'`
 
5
 
 
6
echo "Instructions needed to execute '$COMMAND': $INSTRUCTIONS"