Skip to content

Commit

Permalink
Added more benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Jan 21, 2014
1 parent 063cd1a commit 0f47e69
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/benchmarks/sails.load.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ describe('benchmarks', function () {
after(reportBenchmarks);

benchmark('require("sails")', function(cb) {
var sails = require('../..');
var Sails = require('../../lib/app');
var sails = new Sails();
return cb();
});

benchmark('sails.load [first time, no hooks]', function(cb) {
var sails = require('../..');
var Sails = require('../../lib/app');
var sails = new Sails();
sails.load({
log: { level: 'error' },
globals: false,
Expand All @@ -23,7 +25,8 @@ describe('benchmarks', function () {
this.expected = 25;
this.comment = 'faster b/c of require cache';

var sails = require('../..');
var Sails = require('../../lib/app');
var sails = new Sails();
sails.load({
log: { level: 'error' },
globals: false,
Expand All @@ -35,7 +38,8 @@ describe('benchmarks', function () {
this.expected = 25;
this.comment = 'faster b/c of require cache';

var sails = require('../..');
var Sails = require('../../lib/app');
var sails = new Sails();
sails.load({
log: { level: 'error' },
globals: false,
Expand All @@ -46,7 +50,8 @@ describe('benchmarks', function () {
benchmark('sails.load [all core hooks]', function(cb) {
this.expected = 3000;

var sails = require('../..');
var Sails = require('../../lib/app');
var sails = new Sails();
sails.load({
log: { level: 'error' },
globals: false
Expand All @@ -56,7 +61,8 @@ describe('benchmarks', function () {
benchmark('sails.load [again, all core hooks]', function(cb) {
this.expected = 3000;

var sails = require('../..');
var Sails = require('../../lib/app');
var sails = new Sails();
sails.load({
log: { level: 'error' },
globals: false
Expand Down

0 comments on commit 0f47e69

Please sign in to comment.