add perf test to travis

This commit is contained in:
SheetJS 2014-06-20 23:03:53 -04:00
parent f9733b16be
commit a4753c597f
3 changed files with 13 additions and 9 deletions

@ -4,8 +4,9 @@ node_js:
- "0.10"
- "0.8"
before_install:
- "npm install -g mocha"
- "npm install -g mocha crc-32 benchmark ansi"
- "npm install blanket"
- "npm install coveralls mocha-lcov-reporter"
after_success:
- "make coveralls-spin"
- "make perf-all"

@ -24,13 +24,16 @@ function u3(str) { return js_crc32_old.str(str); }
var ntests, len_max, do_bstr, do_buf, do_ustr;
switch(process.env.MODE) {
case "A": ntests = 100000; len_max = 256; break;
case "B": ntests = 10000; len_max = 1024; break;
case "C": ntests = 10000; len_max = 4096; break;
case "D": ntests = 1000; len_max = 16384; break;
case "E": ntests = 1000; len_max = 65536; break;
case "F": ntests = 100; len_max = 262144; break;
default: ntests = 10000; len_max = 1024; break;
case "A": ntests = 100000; len_max = 256; break;
case "B": ntests = 10000; len_max = 1024; break;
case "C": ntests = 10000; len_max = 4096; break;
case "D": ntests = 1000; len_max = 16384; break;
case "E": ntests = 1000; len_max = 65536; break;
case "F": ntests = 100; len_max = 262144; break;
case "G": ntests = 100; len_max = 1048576; break;
case "H": ntests = 10; len_max = 4194304; break;
case "I": ntests = 10; len_max = 16777216; break;
default: ntests = 10000; len_max = 1024; break;
}
if(process.argv === 2) do_bstr = do_buf = do_ustr = true;

@ -15,4 +15,4 @@ git_module node-crc https://github.com/alexgorbatchev/node-crc 2>/dev/null # crc
git_module crc32 https://github.com/beatgammit/crc32 2>/dev/null # crc32
git_module buffer-crc32 https://github.com/brianloveswords/buffer-crc32 2>/dev/null # buffer-crc32
for i in A B C D E F; do MODE="$i" node integration.js "$1"; done
for i in A B C D E F G H I; do MODE="$i" node integration.js "$1"; done