test/script/basic/run-octane.js

Print this page




  35     "navier-stokes.js", 
  36     "pdfjs.js",
  37     "raytrace.js",
  38     "regexp.js", 
  39     "richards.js", 
  40     "splay.js" 
  41 ];
  42 
  43 // hack, teardown breaks things defined in the global space, making it impossible
  44 // to do multiple consecutive benchmark runs with the same harness. I think it's a bug
  45 // that the setup and teardown aren't each others constructor and destructor but rather
  46 // that the benchmarks rely on partial global state. For shame, Octane! 
  47 var ignoreTeardown = [
  48     { name: "box2d.js" },
  49     { name: "gbemu.js" },
  50 ];
  51 
  52 var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
  53 
  54 // TODO: why is this path hard coded when it's defined in project properties?
  55 var path = dir + "../external/octane/benchmarks/";
  56 
  57 var runtime = "";
  58 var verbose = false;
  59 
  60 var numberOfIterations = 5;
  61 
  62 function endsWith(str, suffix) {
  63     return str.indexOf(suffix, str.length - suffix.length) !== -1;
  64 }
  65 
  66 function run_one_benchmark(arg, iters) {
  67 
  68     load(path + 'base.js');
  69     load(arg);
  70 
  71     var file_name;
  72 
  73     var file = arg.split('/');
  74     if (file.length == 1) {
  75         file = arg.split('\\');




  35     "navier-stokes.js", 
  36     "pdfjs.js",
  37     "raytrace.js",
  38     "regexp.js", 
  39     "richards.js", 
  40     "splay.js" 
  41 ];
  42 
  43 // hack, teardown breaks things defined in the global space, making it impossible
  44 // to do multiple consecutive benchmark runs with the same harness. I think it's a bug
  45 // that the setup and teardown aren't each others constructor and destructor but rather
  46 // that the benchmarks rely on partial global state. For shame, Octane! 
  47 var ignoreTeardown = [
  48     { name: "box2d.js" },
  49     { name: "gbemu.js" },
  50 ];
  51 
  52 var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
  53 
  54 // TODO: why is this path hard coded when it's defined in project properties?
  55 var path = dir + "../external/octane/";
  56 
  57 var runtime = "";
  58 var verbose = false;
  59 
  60 var numberOfIterations = 5;
  61 
  62 function endsWith(str, suffix) {
  63     return str.indexOf(suffix, str.length - suffix.length) !== -1;
  64 }
  65 
  66 function run_one_benchmark(arg, iters) {
  67 
  68     load(path + 'base.js');
  69     load(arg);
  70 
  71     var file_name;
  72 
  73     var file = arg.split('/');
  74     if (file.length == 1) {
  75         file = arg.split('\\');