mrsarm / mongotail

Command line tool to log all MongoDB queries in a "tail"able way
https://pypi.org/project/mongotail/
GNU General Public License v3.0
192 stars 17 forks source link

Feature request: Option to display query time #10

Closed r1b closed 8 years ago

r1b commented 8 years ago

And/or other metadata

mrsarm commented 8 years ago

Do you want to see how much time a query takes? Yes, could be a good "optional" feature, and I liked the idea about add more metadata optionally, even the time, maybe with a parameter like --metadata querytime for example. Right?

r1b commented 8 years ago

Yes! I have a modified version of mongotail locally that pulls out millis and displays it for each query. If you think it would be valuable to do this in a more general way that would be awesome. It is pretty easy to pull out whatever metadata you want, displaying it in a general way is trickier.

mrsarm commented 8 years ago

@r1b I'm working on this, and also in add support to some changes in MongoDB 3.2 log format. But testing with Mongo 2.8, 3.0 and 3.2, I cannot see the property millis or any other property from the profile log that give me the time of the operation.

Could you give me more information about your environment and how you get this information? What version of MongoDB do you have?

mrsarm commented 8 years ago

@r1b Dismiss my comment, I did the test wrong. Now I see the millis property in the logs.

mrsarm commented 8 years ago

@r1b I added two options for this:

I going to release the version 2.0.0 with these and others improvements. Please, take a look on this and give me a feedback if this doesn't work for you.

r1b commented 8 years ago

Looks great! Thanks so much. I will close this issue.