mvc-mini-profiler

Does MvcMiniProfiler require a web application to work, or can it be used in pure libraries, such as in unit tests?

六月ゝ 毕业季﹏ 提交于 2019-12-06 17:29:06
问题 I really like what I've seen regarding MvcMiniProfiler. I'd love to use the SQL monitoring features on non-web applications (windows services, unit tests, etc). Is this possible, or does it require an HTTP environment? The obvious difference would be results delivery, but if I can serialize the results to JSON or somesuch, that would be fine. I threw together a simple unit test trying to get it to work, but MiniProfiler.Current appears to always be null, even after executing MiniProfiler

mvc-mini-profiler configuration clarification

喜欢而已 提交于 2019-12-06 16:09:10
问题 The profiler is installed in my MVC 3 app and it works, but what I'm having a hard time with is the correct way to get the EF 4 db portion setup correctly. from the home page of the profiler Use a factory to return your connection: public static DbConnection GetOpenConnection() { var cnn = CreateRealConnection(); // wrap the connection with a profiling connection that tracks timings return MvcMiniProfiler.Data.ProfiledDbConnection.Get(cnn, MiniProfiler.Current); } Entity Framework public

java web app profiler like this

ぃ、小莉子 提交于 2019-12-05 22:11:02
问题 Read an article on http://code.google.com/p/mvc-mini-profiler/ Any open-source profiler available like this for java web apps? Anyone started to port this one to Java environment? Thanks. 回答1: Yes, there is one java "mini profiler" project inspired by mvc-mini-profiler for the Google App Engine Java runtime (gae-java-mini-profiler). You can see a demo. 回答2: BTrace is a good agent that can be used to get the profiling information out of your JVM (anything from memory usage, thread usage, to

How to customize the Mini-Profiler UI

孤者浪人 提交于 2019-12-05 22:03:35
I have installed Mini-Profiler on my MVC 4 application and it is working like a charm. The only problem I have with it is that the UI covers up a critical part of my UI. I can move it around the page using the css but ideally I would like to make it so it defaults to a hidden state with a drawer button to make it pop out. I tried writing a javascript function that would manipulate the results display but when I placed the following code at the bottom of my _Layout.cshtml file the mini-profiler would place all of it's code at the very bottom of the page after my customize function so the

How do you use the mvc-mini-profiler with Entity Framework 4.1

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 18:47:15
问题 I am trying to use the mvc-mini-profiler with MVC3 and keep getting the following error Unable to determine the provider name for connection of type 'MvcMiniProfiler.Data.ProfiledDbConnection' Below is the code that I am using to try and instatiate my Context. DbConnection conn = new MySqlConnection( ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString); var profiledConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(conn); return new DB(profiledConnection); And here

Using mvc-mini-profiler

橙三吉。 提交于 2019-12-05 12:57:19
问题 I'm trying to use the mvc-mini-profiler with EFCodeFirst I'm creating a DbProfiledConnection and passing it to the DbContext on construction as below. The application continues to work as expected by the sql is not exposed to the Profiler. public class WebContext : DbContext { static DbConnection _connection = new SqlConnection(ConfigurationManager.ConnectionStrings["WebContext"].ConnectionString); static DbConnection _profiledConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(

Setup of mvc-mini-profiler for EF-db- first

拟墨画扇 提交于 2019-12-05 09:46:30
I'm trying to use the mini-profiler with old-style EF code - database-first. So far: I've created a db context using: string connectionString = GetConnectionString(); var connection = new EntityConnection(connectionString); var profiledConnection = ProfiledDbConnection.Get(connection); _context = profiledConnection.CreateObjectContext<MyEntitiesType>(); but then I hit a "Unable to find the requested .Net Framework Data Provider. It may not be installed." which I worked around using a <system.data> reference to the MvcMiniProfiler provider: <system.data> <DbProviderFactories> <remove invariant=

Find: DisplayTemplates Speed

ⅰ亾dé卋堺 提交于 2019-12-05 08:40:38
I have Mini-Profiler installed on a new MVC4 site and notice a big wait time for certain Find: DisplayTemplates including String and DateTime. Below is an example. In another question, Sam Saffron said this about the find step On subsequent runs it is lightning fast (unless you have something really bad going on) But the following happens on every page load: http://localhost:80/SLS.Site/s/hogwarts/lunch... 2.6 +0.0 Check School Permissions 2.4 +2.0 1 sql 0.9 Controller: SchoolAdmin.LunchGroupsController... 4.0 +4.5 Find: Index 0.4 +8.6 Render : Index 70.0 +9.1 2 sql 13.0 Controller:

How to hide miniprofiler?

早过忘川 提交于 2019-12-05 00:49:53
I'm using MVC Mini profiler to check the speed of specific parts of my application, and would like to keep it there just in case something happens later and I may need to check "what's going wrong". It's not a full log set, but it comes pretty in handy to know what's making a page take long. So, my goal is to hide it and have it profile only when the request comes with a specific parameter. However, none of my attempts have worked in the way that I would expect. This has done the trick of not showing it on the screen (code in a view): @if (Request.QueryString.AllKeys.Contains("showProfiler"))

mvc-mini-profiler configuration clarification

别来无恙 提交于 2019-12-04 23:17:01
The profiler is installed in my MVC 3 app and it works, but what I'm having a hard time with is the correct way to get the EF 4 db portion setup correctly. from the home page of the profiler Use a factory to return your connection: public static DbConnection GetOpenConnection() { var cnn = CreateRealConnection(); // wrap the connection with a profiling connection that tracks timings return MvcMiniProfiler.Data.ProfiledDbConnection.Get(cnn, MiniProfiler.Current); } Entity Framework public static MyModel Get() { var conn = ProfiledDbConnection.Get(GetConnection()); return ObjectContextUtils