PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/js/time.sh

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
Shell | 13 lines | 12 code | 0 blank | 1 comment | 2 complexity | 9157dc3b59be3c84819b76e6eae07594 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. #!/bin/bash
  2. echo -n interp:' '
  3. for i in 1 2 3 4 5; do
  4. INTERP=`Darwin_OPT.OBJ/js -e 'var d = Date.now(); load("'$1'"); print(Date.now() - d);'`
  5. echo -n $INTERP' '
  6. done
  7. echo -ne '\njit: '
  8. for i in 1 2 3 4 5; do
  9. JIT=`Darwin_OPT.OBJ/js -j -e 'var d = Date.now(); load("'$1'"); print(Date.now() - d);'`
  10. echo -n $JIT' '
  11. done
  12. echo -ne '\njit factor: '
  13. (echo scale=2; echo $INTERP / $JIT ) | bc