Permalink
Browse files

Added benchmark.js

  • Loading branch information...
1 parent 7477247 commit c7247bc7cf4ad7f2b7d86a99b377e89cc386e393 @tj tj committed Jul 27, 2010
Showing with 13 additions and 0 deletions.
  1. +13 −0 benchmark.js
View
@@ -0,0 +1,13 @@
+
+var jade = require('./lib/jade'),
+ str = require('fs').readFileSync(__dirname + '/examples/whitespace.jade', 'utf8'),
+ times = 5000;
+
+console.log('rendering ' + times + ' times');
+
+var start = new Date;
+while (times--) {
+ jade.render(str);
+}
+
+console.log('took ' + (new Date - start) + 'ms');

0 comments on commit c7247bc

Please sign in to comment.