Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mattb@capdev2:~/src/golang $ time ./test_mongo.py
- 821226
- 426964
- real 0m7.742s
- user 0m6.636s
- sys 0m0.312s
- mattb@capdev2:~/src/golang $ time ./test_mongo.py
- 821226
- 426964
- real 0m7.889s
- user 0m6.768s
- sys 0m0.356s
- mattb@capdev2:~/src/golang $ time ./test_mongo.py
- 821226
- 426964
- real 0m7.350s
- user 0m6.436s
- sys 0m0.340s
- mattb@capdev2:~/src/golang $ cat test_mongo.py
- #!/usr/bin/env python
- import pymongo
- conn = pymongo.MongoClient("127.0.0.1:27017")
- tot = cnt = 0
- for doc in conn.logdb.log.find():
- tot += 1
- if doc.get('eventType') == 'VIDEO':
- cnt += 1
- print tot
- print cnt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement