-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move array mixin methods into CoreMongooseArray #7798
Labels
Milestone
Comments
vkarpov15
added a commit
that referenced
this issue
May 21, 2019
vkarpov15
added a commit
that referenced
this issue
May 21, 2019
Basic benchmark: 'use strict';
const Benchmark = require('benchmark');
const mongoose4 = require('mongoose');
// Note this is not the actual mongoose 5 npm module, this is just
// a symlinked alias for the purposes of this benchmark
const mongoose5 = require('mongoose-56');
const suite = new Benchmark.Suite;
const M4 = mongoose4.model('Test', new mongoose4.Schema({ arr: [String] }));
const M5 = mongoose5.model('Test', new mongoose5.Schema({ arr: [String] }));
suite.
add('mongoose4', function() {
new M4({ arr: ['foo', 'bar', 'baz'] });
}).
add('mongoose5', function() {
new M5({ arr: ['foo', 'bar', 'baz'] });
}).
on('cycle', function(event) {
console.log(String(event.target));
}).
on('complete', function() {
console.log('Fastest is ' + this.filter('fastest').map('name'));
}).
run(); Output:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: