Please add support for MongoDB
How do you envisage this working?
I suppose one can dig into the MongoDB C# driver and make something like ProfiledDbConnection but for MongoDB. Timing wouldn’t be too hard (do it client side if the server doesn’t say the query execution time) and the query is trivially to get, probably stored in a string.
I won’t have time until next months to try to get something working, but it shouldn’t be too hard.
I have been just wrapping my MongoDB calls with a .Step() but it would be great to get this timing for free like I do for SQL. It would be great to see details of what I’m querying on, but even just query executing time and a summed up time spent in Mongo would be super helpful.
I created a fork with simultaneous Mongo and SQL support. It is far from complete, but should get you started.
@Bryce do you feel like giving the prep “abstraction” work a shot? Keep in mind we already have an interface for profiling.
how do we go about integrating this into the core
I think a first step might be decoupling the main MiniProfiler class from the data source type used for profiling. Once that is done, we can add support for multiple simultaneous data sources.
That way the mongo support can be an optional assembly since it depends on the mongo driver nuget package.