Skip to content

Instantly share code, notes, and snippets.

@pglombardo
Created June 30, 2014 21:39
Show Gist options
  • Save pglombardo/5356616cb75cb46a4f61 to your computer and use it in GitHub Desktop.
Save pglombardo/5356616cb75cb46a4f61 to your computer and use it in GitHub Desktop.
Mongo Find - with and without result reference
@session = Moped::Session.new([ "127.0.0.1:27017" ])
@session.use :moped_test
@users = @session[:users]
Oboe::API.start_trace('just_mongo_find', nil, { :Force => true }) do
@users.find
end
Oboe::API.start_trace('mongo_find_and_count', nil, { :Force => true }) do
@users.find.count
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment