benchmark.js 326 B

1234567891011121314
  1. var ejs = require('./lib/ejs'),
  2. str = '<% if (foo) { %><p><%= foo %></p><% } %>',
  3. times = 50000;
  4. console.log('rendering ' + times + ' times');
  5. var start = new Date;
  6. while (times--) {
  7. ejs.render(str, { cache: true, filename: 'test', locals: { foo: 'bar' }});
  8. }
  9. console.log('took ' + (new Date - start) + 'ms');