Skip to content

Instantly share code, notes, and snippets.

@mpobrien
Created February 2, 2012 18:18
Show Gist options
  • Save mpobrien/1724945 to your computer and use it in GitHub Desktop.
Save mpobrien/1724945 to your computer and use it in GitHub Desktop.
db.accounts.drop();
db.content.drop();
for(var i=0;i<22000;i++){
print(i)
var id = new ObjectId();
db.accounts.save({_id:id})
var numcontent = parseInt(Math.random() * 100)
for(var j=0;j<numcontent;j++){
db.content.insert({account_id:id, avg_ctr:Math.random(), published:new Date() })
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment