TylerBrock / mongo-hacker

MongoDB Shell Enhancements for Hackers
tylerbrock.github.io/mongo-hacker
MIT License
1.79k stars 235 forks source link

Add records count in 'show collections' #211

Open pouriamoosavi opened 4 years ago

pouriamoosavi commented 4 years ago

Description of changes

I've added document count in 'show collections' table. it tries to split count into groups of 3 e.g: 12,450 r(s)

Testing

I've test it in my own server. The result is something like this: se... → 0.000MB / 0.004MB / 0 r(s) shar... → 0.049MB / 0.051MB / 279 r(s) sh... → 0.003MB / 0.016MB / 32 r(s) sha... → 3649.972MB / 1594.980MB / 1,250,528 r(s) test... → 27444.810MB / 12135.191MB / 75,349,867 r(s) tr... → 209.701MB / 92.375MB / 464,012 r(s) tt... → 0.003MB / 0.016MB / 32 r(s) us... → 0.000MB / 0.016MB / 1 r(s)

Software Version(s) tested
mongo shell 4.0.9
MongoDB server 4.0.9
Operating system Linux Ubuntu 18.04.2 LTS