View debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/Users/aheckmann/.nvm/versions/node/v4.8.4/bin/node',
1 verbose cli '/Users/aheckmann/.nvm/versions/node/v4.8.4/bin/npm',
1 verbose cli '--registry=https://registry.npmjs.org/',
1 verbose cli '--depth',
1 verbose cli '2',
1 verbose cli 'update' ]
2 info using npm@5.5.1
3 info using node@v4.8.4
4 verbose npm-session 2390aa4c6f224961
View await_thenables.js
'use strict';
// run using this fork of NodeJS
// https://github.com/targos/node/commits/v8-5.4 (https://github.com/nodejs/node/pull/8317)
//
// node --harmony_async_await await_thenables.js
function counter(count) {
return {
then: function(res, rej) {
View lru-cache-perf-issue-node4.js
var LRU = require('lru-cache');
var i = 0;
var sets = 0;
var start = Date.now();
var last = Date.now();
var max = 8193; // 8192 is the magic number upper perf limit of plain objects
var maxAge = 1000 * 60 * 60 * 24;
View parallelism.js
/**
* example of configurable parallelism
*/
// silly counter
var i = 0;
// configurable amount of work to run in parallel
var max = 1;
View gist:2647d4afe7d0bb760e49
mongo -u USERNAME -p PASSWORD --host "REPLICA_SET_NAME/HOST:PORT" --authenticationDatabase DB_NAME
# after connected, you'll need to change the database
// db = db.getSiblingDB(DB_NAME);
View README.md

run this with > time DEBUG=amqp:* COUNT=30000 PREFETCH=0 BUCKET_SIZE=20000 node index.js

before applying the fix:

real  1m22.216s
user  1m10.973s
sys 0m16.106s
View generator-fodder
http://swannodette.github.io/2013/08/24/es6-generators-and-csp/
https://github.com/visionmedia/co
http://wiki.ecmascript.org/doku.php?id=harmony:generators
http://pag.forbeslindesay.co.uk/
View driver-findAndModifyBug.js
var assert = require('assert')
var uri = 'mongodb://localhost/findAndModifyBug';
var mongo = require('mongodb')
console.log('driver version: %s', mongo.version);
mongo.connect(uri, function (err, db) {
if (err) throw err;
console.log('connected');
View mongoose-cpu-load-test.js
/**
* configuration
*/
// connection pool size
var poolSize = 5;
// number of parallel queries
var n = 60;
View 1652.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var assert = require('assert')
console.log('\n===========');
console.log(' mongoose version: %s', mongoose.version);
console.log('========\n\n');
var dbname = 'goosetest-1652';