mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
326 B
14 lines
326 B
13 years ago
|
|
||
|
|
||
|
var ejs = require('./lib/ejs'),
|
||
|
str = '<% if (foo) { %><p><%= foo %></p><% } %>',
|
||
|
times = 50000;
|
||
|
|
||
|
console.log('rendering ' + times + ' times');
|
||
|
|
||
|
var start = new Date;
|
||
|
while (times--) {
|
||
|
ejs.render(str, { cache: true, filename: 'test', locals: { foo: 'bar' }});
|
||
|
}
|
||
|
|
||
|
console.log('took ' + (new Date - start) + 'ms');
|