MvcMiniProfiler Categories of sql statements. Unknown DML statements that alter database state, e.g. INSERT, UPDATE Statements that return a single record Statements that iterate over a result set Extension mechanism for additional services; requested service provider or null. An individual profiling step that can contain child steps. Reference to the containing profiler, allowing this Timing to affect the Head and get Stopwatch readings. Offset from parent MiniProfiler's creation that this Timing was created. Creates a new Timing named 'name' in the 'profiler's session, with 'parent' as this Timing's immediate ancestor. Obsolete - used for serialization. Adds arbitrary string 'value' under 'key', allowing custom properties to be stored in this Timing step. Completes this Timing's duration and sets the MiniProfiler's Head up one level. Unique identifer for this timing; set during construction. Text displayed when this Timing is rendered. How long this Timing step took in ms; includes any Timings' durations. The offset from the start of profiling. All sub-steps that occur within this Timing step. Add new children through Stores arbitrary key/value strings on this Timing step. Add new tuples through . Any queries that occurred during this Timing step. Which Timing this Timing is under - the duration that this step takes will be added to its parent's duration. This will be null for the root (initial) Timing. Gets the ellapsed milliseconds in this step without any children's durations. Gets the aggregate ellapsed milliseconds of all SqlTimings executed in this Timing, excluding Children Timings. Returns true when this is less than the configured , by default 2.0 ms. Returns true when this Timing has inner Timing steps. Returns true if this Timing step collected sql execution timings. Returns true if any s executed in this step are detected as duplicate statements. Returns true when this Timing is the first one created in a MiniProfiler session. How far away this Timing is from the Profiler's Root. How many sql data readers were executed in this Timing step. How many sql scalar queries were executed in this Timing step. How many sql non-query statements were executed in this Timing step. If the underlying command supports BindByName, this sets/clears the underlying implementation accordingly. This is required to support OracleCommand from dapper-dot-net Wraps a database connection, allowing sql execution timings to be collected when a session is started. When is not null, returns a new that wraps , providing query execution profiling. If is null, connection is returned unwrapped. Your provider-specific flavor of connection, e.g. SqlConnection, OracleConnection When is not null, returns a new that wraps , providing query execution profiling. If profiler is null, connection is returned unwrapped. Your provider-specific flavor of connection, e.g. SqlConnection, OracleConnection The currently started or null. Returns a new that wraps , providing query execution profiling. If profiler is null, no profiling will occur. Your provider-specific flavor of connection, e.g. SqlConnection, OracleConnection The currently started or null. Profiles a single sql execution. Creates a new SqlTiming to profile 'command'. Obsolete - used for serialization. Called when command execution is finished to determine this SqlTiming's duration. Called when database reader is closed, ending profiling for SqlTimings. To help with display, put some space around sammiched commas Category of sql statement executed. The sql that was executed. Roughly where in the calling code that this sql was executed. Offset from main MiniProfiler start that this sql began. How long this sql statement took to execute. When executing readers, how long it took to come back initially from the database, before all records are fetched and reader is closed. True when other identical sql statements have been executed during this MiniProfiler session. Gets part of a stack trace containing only methods we care about. Contains the default list of full type names we don't want in any stack trace snippets. A single MiniProfiler can be used to represent any number of steps/levels in a call-graph, via Step() Totally baller. Starts when this profiler is instantiated. Each step will use this Stopwatch's current ticks as their starting time. Creates and starts a new MiniProfiler for the root , filtering steps to . Obsolete - used for serialization. Walks the hierarchy contained in this profiler, starting with , and returns each Timing found. Returns all results contained in all child steps. Returns milliseconds based on Stopwatch's Frequency. Starts a new MiniProfiler for the current Request. This new profiler can be accessed by Ends the current profiling session, if one exists. When true, clears the for this HttpContext, allowing profiling to be prematurely stopped and discarded. Useful for when a specific route does not need to be profiled. Returns an that will time the code between its creation and disposal. Use this method when you do not wish to include the MvcMiniProfiler namespace for the extension method. A descriptive name for the code that is encapsulated by the resulting IDisposable's lifetime. This step's visibility level; allows filtering when is called. Returns the css and javascript includes needed to display the MiniProfiler results UI. Which side of the page the profiler popup button should be displayed on (defaults to left) Whether to show trivial timings by default (defaults to false) Whether to show time the time with children column by default (defaults to false) Script and link elements normally; an empty string when there is no active profiling session. Renders the current to json. Renders the parameter to json. Deserializes the json string parameter to a . Identifies this Profiler so it may be stored/cached. A display name for this profiling session. When this profiler was instantiated. Where this profiler was run. Allows filtering of steps based on what the steps are created with. The first that is created and started when this profiler is instantiated. All other s will be children of this one. Contains information about queries executed during this profiling session. Milliseconds, to one decimal place, that this MiniProfiler ran. Milliseconds, to one decimal place, that this MiniProfiler was executing sql. Returns true when we have profiled queries. Returns true when any child Timings have duplicate queries. Returns true when or any of its are . Returns true when all child s are . Any Timing step with a duration less than or equal to this will be hidden by default in the UI; defaults to 2.0 ms. Ticks since this MiniProfiler was started. Points to the currently executing Timing. Gets the currently running MiniProfiler for the current HttpContext; null if no MiniProfiler was ed. Various configuration properties. When setters are null, creates default getters and setters that operate on the HttpRuntime.Cache. Our MiniProfiler must have these to run. When true, link and script tags will be written to the response stream when MiniProfiler.Stop is called. Any Timing step with a duration less than or equal to this will be hidden by default in the UI; defaults to 2.0 ms. Dictates on which side of the page the profiler popup button is displayed; defaults to false (i.e. renders on left side). When is called, if the current request url starts with this property, no profiler will be instantiated and no results will be displayed. Default value is { "/mini-profiler-includes.js", "/mini-profiler-includes.less", "/mini-profiler-results", "/content/", "/scripts/" }. A method that will return a MiniProfiler when given a Guid. Meant for caching individual page profilings for a very limited time. By default, MiniProfilers will be cached for 5 minutes in the HttpRuntime.Cache. This can be extended when the cache is shared from its top link. A method that will save a MiniProfiler into a short-duration cache, so results can fetched down to the client after page load. It is important that you cache the MiniProfiler under its Id, a Guid - this Id will be passed to the ShortTermCacheGetter. By default, MiniProfilers will be cached for 5 minutes in the HttpRuntime.Cache. A method that will return a MiniProfiler when given a Guid. Meant for caching profilings for an extended period of time, so they may be shared with others. This is used by the full page results view, which is linked in the popup's header. A method that will save a MiniProfiler, identified by its Guid Id, into long-term storage. Allows results to be shared with others. It is important that you cache the MiniProfiler under its Id, a Guid - this Id will be passed to the LongTermCacheGetter. This is activated EVERY TIME the top left header link is clicked in the popup UI and the full page results view is displayed. When overriding the default, your code will need to handle setting the same profiler back into your chosen storage medium (e.g. no-op when it already exists). Assembly version of this dank MiniProfiler. Understands how to route and respond to MiniProfiler UI urls. Returns this to handle . Returns either includes' css/javascript or results' html. Handles rendering our .js and .less static content files. Handles rendering a previous MiniProfiler session, identified by its "?id=GUID" on the query. Embedded resource contents keyed by filename. Helper method that sets a proper 404 response code. Try to keep everything static so we can easily be reused. This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example), and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE** equality. The type is fully thread-safe. Categorizes individual steps to allow filtering. Default level given to Timings. Useful when profiling many items in a loop, but you don't wish to always see this detail. Dictates on which side of the page the profiler popup button is displayed; defaults to left. Profiler popup button is displayed on the left. Profiler popup button is displayed on the right. Contains helper methods that ease working with null s. Wraps in a call and executes it, returning its result. The current profiling session or null. Method to execute and profile. The step name used to label the profiler results. Returns an that will time the code between its creation and disposal. The current profiling session or null. A descriptive name for the code that is encapsulated by the resulting IDisposable's lifetime. This step's visibility level; allows filtering when is called. Adds 's hierarchy to this profiler's current Timing step, allowing other threads, remote calls, etc. to be profiled and joined into this profiling session. Returns an html-encoded string with a text-representation of ; returns "" when profiler is null. The current profiling session or null.