Guest User

Untitled

a guest
Aug 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. from pymongo import Connection
  2. from pymongo.objectid import ObjectId
  3.  
  4. connection = Connection()
  5. db = connection.coledit_development
  6.  
  7. def test():
  8. project = db.projects.find_one({'_id': ObjectId('4e52ccbd3a5c9f20b8000003')})
  9. #print project['name']
  10.  
  11. from timeit import Timer
  12. t = Timer("test()", "from __main__ import test")
  13. print t.timeit(10000)
Add Comment
Please, Sign In to add comment