-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for Entity Framework 6 into MiniProfiler #134
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove unneeded includes.tmpl file.
Add accessors so that options can be set using: Rack::MiniProfiler.config.start_hidden = true instead of having to use #merge!
It's wrong (but barely noticeable) in normal use. But when you start to use custom timings without sql timings, it offsets the headers.
On my system redis would return ['ABC', 'XYZ'] instead of ['XYZ', 'ABC'] which should still fit the requirement of the failing spec.
RSolr queries are currently only displaying as network requests which is not very helpful to debug slow search queries. This patch adds profiling of RSolr request so they are listed like SQL queries with the displayed data allowing do build up a manual query using eg. curl. The profiling hook requires at least RSolr 1.0.0 and ensures it is available to avoid breakage. Example output facetted search: ``` POST http://localhost:8983/solr/development/select?wt=ruby fq=type:Spree\:\:Product&fq=is_active_b:true&sort=score desc&q=macbook&fl=* score&qf=name_text brand_text description_text sku_text vendor_sku_text&defType=dismax&start=0&rows=10&facet=true&facet.query=price_f:[0\.0 TO 10\.0]&facet.query=price_f:[10\.0 TO 50\.0]&facet.query=price_f:[50\.0 TO 100\.0]&facet.query=price_f:[100\.0 TO 500\.0]&facet.query=price_f:[500\.0 TO 800\.0]&facet.query=price_f:[800\.0 TO 1000\.0]&facet.query=price_f:[1000\.0 TO *]&f.taxon_ids_im.facet.mincount=1&facet.field=taxon_ids_im ``` Delete index query: ``` POST http://localhost:8983/solr/development/update?wt=ruby&commit=true <delete><query>type:Spree\:\:Product</query></delete> ```
There were quite some files that mixed tabs and spaces for indenting which have been fixed to use spaces consistently. I've also removed redundant whitespace for those files.
Added a new project for Entity Framework 6 - Alpha 3.
No need to enable the package restore for now.
this needs rebasing ... very hard to tell what happened |
I will create a new fork and a new pull request without the noise. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although EF6 is currently in Alpha stage, they have made significant changes to bot the underlying injection points as well as the namespaces, requiring a new project (targeting .NET 4.5) to add support.
This pull request adds that project, as well as the needed implementation to inject MiniProfiler into both DbContext and ObjectContext classes. (SqlServer only for now, will probably add SqlCe support also, other providers will hopefully come later as EF6 reaches beta and later RTM).
All that is needed is instead of the old way of calling MiniProfilerEF.Initialize() or using the ObjectContextUtils.CreateObjectContext(conn); you now just need to add the following in the web.config:
B.t.w, I seem to be unable to make the commit history on this pull request cleaner, don't know if I'm doing something wrong (I'm a GitHub noob). The files changed are correct though.