Skip to content

Commit

Permalink
chore: delete commented-out code
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrahmanHafez committed Mar 21, 2022
1 parent 29837ed commit c39a641
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion benchmarks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ function run(label, fn) {
res.heapUsed = used.heapUsed - started.heapUsed;
log('change: ', res);
a = res = used = time = started = start = total = i = null;
// console.error(((used.vsize - started.vsize) / 1048576)+' MB');
}

run('string', function() {
Expand Down
21 changes: 1 addition & 20 deletions benchmarks/validate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// require('nodetime').profile();

'use strict';

const mongoose = require('../../mongoose');
Expand All @@ -25,8 +23,7 @@ const breakfastSchema = new Schema({
}
});
const Breakfast = mongoose.model('Breakfast', breakfastSchema);
// const time1 = (new Date - start1);
// console.error('reading from disk and parsing JSON took %d ms', time1);

const badBreakfast = new Breakfast({
eggs: 2,
bacon: 0,
Expand All @@ -38,23 +35,7 @@ const goodBreakfast = new Breakfast({
bacon: 1,
drink: 'Tea'
})
// const start = new Date;
// const total = 10000000;
// let i = total;
// let len;

// for (i = 0, len = total; i < len; ++i) {

// const goodBreakfast = new Breakfast({
// eggs: 6,
// bacon: 1,
// drink: 'Tea'
// })
// goodBreakfast.validateSync();
// }

// const time = (new Date - start) / 1000;
// console.error('took %d seconds for %d docs (%d dps)', time, total, total / time);
const suite = new Benchmark.Suite()
suite
.add('invalid async', {
Expand Down
1 change: 0 additions & 1 deletion lib/helpers/query/castFilterPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ module.exports = function castFilterPath(query, schematype, val) {
}
continue;
}
// cast(schematype.caster ? schematype.caster.schema : schema, nested, options, context);
} else {
val[$cond] = schematype.castForQueryWrapper({
$conditional: $cond,
Expand Down

0 comments on commit c39a641

Please sign in to comment.