Skip to content

Commit

Permalink
mde#575 Add case for error option to benchmarkRender
Browse files Browse the repository at this point in the history
  • Loading branch information
blutorange committed Jan 14, 2023
1 parent 84468fe commit bfb18b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions benchmark/bench-ejs.js
Expand Up @@ -172,9 +172,11 @@ if (runCompile) {

if (runCache) {
benchRender('single tmpl cached', 'bench1', data, {cache:true, compileDebug: false}, { loopFactor: 5 });
benchRender('single tmpl cached (error)', 'bench1', data, {cache:true, compileDebug: false, error: function(){}}, { loopFactor: 5 });
benchRender('single tmpl cached (debug)', 'bench1', data, {cache:true, compileDebug: true}, { loopFactor: 5 });

benchRender('large tmpl cached', 'bench2', data, {cache:true, compileDebug: false}, { loopFactor: 0.4 });
benchRender('large tmpl cached (error)', 'bench2', data, {cache:true, compileDebug: false, error: function(){}}, { loopFactor: 0.4 });
benchRender('include-1 cached', 'include1', data, {cache:true, compileDebug: false}, { loopFactor: 2 });
benchRender('include-2 cached', 'include2', data, {cache:true, compileDebug: false}, { loopFactor: 2 });

Expand All @@ -187,9 +189,11 @@ if (runCache) {

if (runNoCache) {
benchRender('single tmpl NO-cache', 'bench1', data, {cache:false, compileDebug: false});
benchRender('single tmpl NO-cache (error)', 'bench1', data, {cache:false, compileDebug: false, error: function(){}});
benchRender('single tmpl NO-cache (debug)', 'bench1', data, {cache:false, compileDebug: true});

benchRender('large tmpl NO-cache', 'bench2', data, {cache:false, compileDebug: false}, { loopFactor: 0.1 });
benchRender('large tmpl NO-cache (error)', 'bench2', data, {cache:false, compileDebug: false, error: function(){}}, { loopFactor: 0.1 });

benchRender('include-1 NO-cache', 'include1', data, {cache:false, compileDebug: false});
benchRender('include-2 NO-cache', 'include2', data, {cache:false, compileDebug: false});
Expand Down

0 comments on commit bfb18b2

Please sign in to comment.