PageRenderTime 10ms CodeModel.GetById 7ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/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
 1#!/bin/bash
 2echo -n interp:' '
 3for 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' '
 6done
 7echo -ne '\njit: '
 8for 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' '
11done
12echo -ne '\njit factor: '
13(echo scale=2; echo $INTERP / $JIT ) | bc