Skip to content
Browse files

Added benchmark.js

  • Loading branch information...
1 parent 2282d69 commit 540431908ef9874c8ef587527607b9882fa00036 @tj tj committed Aug 4, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 benchmark.js
View
14 benchmark.js
@@ -0,0 +1,14 @@
+
+
+var ejs = require('./lib/ejs'),
+ str = '<% if (foo) { %><p><%= foo %></p><% } %>',
+ times = 5000;
+
+console.log('rendering ' + times + ' times');
+
+var start = new Date;
+while (times--) {
+ ejs.render(str, { locals: { foo: 'bar' }});
+}
+
+console.log('took ' + (new Date - start) + 'ms');

0 comments on commit 5404319

Please sign in to comment.
Something went wrong with that request. Please try again.