summaryrefslogtreecommitdiff
path: root/node_modules/ejs/benchmark.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2012-09-24 16:22:07 -0400
committerJules Laplace <jules@okfoc.us>2012-09-24 16:22:07 -0400
commit686106d544ecc3b6ffd4db2b665d3bc879a58d8c (patch)
treea5b5e50237cef70e12f0745371896e96f5f6d578 /node_modules/ejs/benchmark.js
ok
Diffstat (limited to 'node_modules/ejs/benchmark.js')
-rw-r--r--node_modules/ejs/benchmark.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/ejs/benchmark.js b/node_modules/ejs/benchmark.js
new file mode 100644
index 0000000..7b267e1
--- /dev/null
+++ b/node_modules/ejs/benchmark.js
@@ -0,0 +1,14 @@
+
+
+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'); \ No newline at end of file