Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ Ruby/*.gem
.DS_Store
tmp
*~
*/App_Data/*.MDF
*/App_Data/*.ldf
packages
29 changes: 25 additions & 4 deletions MiniProfiler.sln
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 2013
VisualStudioVersion = 12.0.20827.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CC40098D-04F2-4F43-B5CF-B74F74351761}"
ProjectSection(SolutionItems) = preProject
MiniProfiler.EF.nuspec = MiniProfiler.EF.nuspec
MiniProfiler.MVC3.nuspec = MiniProfiler.MVC3.nuspec
MiniProfiler.nuspec = MiniProfiler.nuspec
MiniProfiler35.ADONET.nuspec = MiniProfiler35.ADONET.nuspec
MiniProfiler35.nuspec = MiniProfiler35.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MiniProfiler.MVC3", "MiniProfiler.MVC3", "{EAE04FE1-268F-46EF-ACB5-290408478EBC}"
Expand All @@ -32,16 +36,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchange.Profiling.Wcf
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Wcf", "Sample.Wcf\Sample.Wcf.csproj", "{2DD1E352-3FFE-49F8-ADAB-65F3FECE75E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchange.Profiling.AdoNet", "StackExchange.Profiling.AdoNet\StackExchange.Profiling.AdoNet.csproj", "{44612123-B2E2-458A-859F-7077134D31C8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.WebForms-NET35", "Sample.WebForms-NET35\Sample.WebForms-NET35.csproj", "{976F2910-315D-41A1-9CBF-8BAD9F420E81}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchange.Profiling35", "StackExchange.Profiling35\StackExchange.Profiling35.csproj", "{AB77F5B3-615E-446B-9905-833FDEF734A0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Mvc.Mongo", "Sample.Mvc.Mongo\Sample.Mvc.Mongo.csproj", "{C74578A4-E848-40F5-84CE-64165E7F477E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Console", "dotnet\Sample.Console\Sample.Console.csproj", "{58DA79DE-F30B-4068-BEE9-013C9360CD74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchange.Profiling.EntityFramework6", "StackExchange.Profiling.EntityFramework6\StackExchange.Profiling.EntityFramework6.csproj", "{4DFA7AD2-FCAE-44DB-AF5C-F26ABA93DBDC}"
EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = StackExchange.Profiling.vsmdi
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Expand Down Expand Up @@ -75,6 +81,18 @@ Global
{2DD1E352-3FFE-49F8-ADAB-65F3FECE75E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DD1E352-3FFE-49F8-ADAB-65F3FECE75E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DD1E352-3FFE-49F8-ADAB-65F3FECE75E6}.Release|Any CPU.Build.0 = Release|Any CPU
{44612123-B2E2-458A-859F-7077134D31C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44612123-B2E2-458A-859F-7077134D31C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44612123-B2E2-458A-859F-7077134D31C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44612123-B2E2-458A-859F-7077134D31C8}.Release|Any CPU.Build.0 = Release|Any CPU
{976F2910-315D-41A1-9CBF-8BAD9F420E81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{976F2910-315D-41A1-9CBF-8BAD9F420E81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{976F2910-315D-41A1-9CBF-8BAD9F420E81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{976F2910-315D-41A1-9CBF-8BAD9F420E81}.Release|Any CPU.Build.0 = Release|Any CPU
{AB77F5B3-615E-446B-9905-833FDEF734A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB77F5B3-615E-446B-9905-833FDEF734A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB77F5B3-615E-446B-9905-833FDEF734A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB77F5B3-615E-446B-9905-833FDEF734A0}.Release|Any CPU.Build.0 = Release|Any CPU
{C74578A4-E848-40F5-84CE-64165E7F477E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C74578A4-E848-40F5-84CE-64165E7F477E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C74578A4-E848-40F5-84CE-64165E7F477E}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -94,4 +112,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{EAE04FE1-268F-46EF-ACB5-290408478EBC} = {CC40098D-04F2-4F43-B5CF-B74F74351761}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = StackExchange.Profiling.vsmdi
EndGlobalSection
EndGlobal
20 changes: 20 additions & 0 deletions MiniProfiler35.ADONET.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>MiniProfiler35.ADONET</id>
<version>2.0.3.13</version>
<authors>Marc Gravell, Sam Saffron, Jarrod Dixon, Kerem Kat</authors>
<owners>Marc Gravell, Sam Saffron, Jarrod Dixon, Kerem Kat</owners>
<description>MiniProfiler35 integration for ADO.NET</description>
<projectUrl>https://github.com/krk/MiniProfiler/</projectUrl>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<tags>profiler sql mvc asp.net net35 performance timing</tags>
<dependencies>
<dependency id="MiniProfiler35" version="2.0.3.13"/>
</dependencies>
<language>en-US</language>
</metadata>
<files>
<file src="StackExchange.Profiling.AdoNet\bin\Release\MiniProfiler35.AdoNet.*" target="lib/net35" />
</files>
</package>
62 changes: 62 additions & 0 deletions MiniProfiler35.Package/Content/global.asax.miniprofiler
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using StackExchange.Profiling;

namespace WebApplication1
{
public class Global : System.Web.HttpApplication
{

void Application_Start(object sender, EventArgs e)
{
InitProfilerSettings();

// this is only done for testing purposes so we don't check in the db to source control
// ((SampleWeb.Helpers.SqliteMiniProfilerStorage)MiniProfiler.Settings.Storage).RecreateDatabase();
}

protected void Application_BeginRequest()
{
MiniProfiler profiler = null;

// might want to decide here (or maybe inside the action) whether you want
// to profile this request - for example, using an "IsSystemAdmin" flag against
// the user, or similar; this could also all be done in action filters, but this
// is simple and practical; just return null for most users. For our test, we'll
// profile only for local requests (seems reasonable)
if (Request.IsLocal)
{
profiler = MiniProfiler.Start();
}

using (profiler.Step("Application_BeginRequest"))
{
// you can start profiling your code immediately
}
}

protected void Application_EndRequest()
{
MiniProfiler.Stop();
}

/// <summary>
/// Customize aspects of the MiniProfiler.
/// </summary>
private void InitProfilerSettings()
{
// some things should never be seen
var ignored = MiniProfiler.Settings.IgnoredPaths.ToList();
ignored.Add("WebResource.axd");
ignored.Add("/Styles/");
MiniProfiler.Settings.IgnoredPaths = ignored.ToArray();

// MiniProfiler.Settings.Storage = new SampleWeb.Helpers.SqliteMiniProfilerStorage(SampleWeb.MvcApplication.ConnectionString);
MiniProfiler.Settings.SqlFormatter = new StackExchange.Profiling.SqlFormatters.InlineFormatter();
}
}
}
1 change: 1 addition & 0 deletions MiniProfiler35.Package/Content/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In order to start using MiniProfiler35, please integrate global.asax.miniprofiler to your global.asax file.
7 changes: 7 additions & 0 deletions MiniProfiler35.Package/Content/web.config.transform
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<configuration>
<system.webServer>
<handlers>
<add name="MiniProfiler" verb="*" path="/mini-profiler-resources/*" type="StackExchange.Profiling.UI.MiniProfilerHandler, MiniProfiler35"/>
</handlers>
</system.webServer>
</configuration>
24 changes: 24 additions & 0 deletions MiniProfiler35.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>MiniProfiler35</id>
<version>2.0.3.13</version>
<authors>Marc Gravell, Sam Saffron, Jarrod Dixon, Kerem Kat</authors>
<owners>Marc Gravell, Sam Saffron, Jarrod Dixon, Kerem Kat</owners>
<description>Lightweight mini-profiler, in particular designed for ASP.NET WebForms sites using .NET Framework 3.5</description>
<projectUrl>https://github.com/krk/MiniProfiler/</projectUrl>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<tags>profiler sql mvc asp.net net35 performance timing</tags>
<dependencies>
<dependency id="TaskParallelLibrary" version="1.0.2856.0" />
</dependencies>
<language>en-US</language>
</metadata>
<files>
<file src="StackExchange.Profiling35\bin\Release\MiniProfiler35.dll" target="lib\net35" />
<file src="StackExchange.Profiling35\bin\Release\MiniProfiler35.pdb" target="lib\net35" />
<file src="MiniProfiler35.Package\Content\web.config.transform" target="content\web.config.transform" />
<file src="MiniProfiler35.Package\Content\global.asax.miniprofiler" target="content\global.asax.miniprofiler" />
<file src="MiniProfiler35.Package\Content\readme.txt" target="readme.txt" />
</files>
</package>
6 changes: 5 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
This official clone of Mini Profiler
This is a fork of the official clone of Mini Profiler

This fork refactors ADO.NET profiling classes to a .NET 3.5 project. New StackExchange.Profiling.AdoNet could be used from other .NET projects.

We accept patches and pull requests here.

Expand All @@ -9,3 +11,5 @@ Docs for the ruby version can be found here: https://github.com/SamSaffron/MiniP
Licensed under apache 2.0 license, see: http://www.apache.org/licenses/LICENSE-2.0

For bugs and feature requests go to: http://community.miniprofiler.com

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/krk/miniprofiler/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
9 changes: 9 additions & 0 deletions Sample.Mvc.Mongo/Sample.Mvc.Mongo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>4.0</OldToolsVersion>
<MvcProjectUpgradeChecked>true</MvcProjectUpgradeChecked>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -195,6 +196,10 @@
<WCFMetadataStorage Include="Service References\SampleService\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StackExchange.Profiling.AdoNet\StackExchange.Profiling.AdoNet.csproj">
<Project>{44612123-B2E2-458A-859F-7077134D31C8}</Project>
<Name>StackExchange.Profiling.AdoNet</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling.EntityFramework\StackExchange.Profiling.EntityFramework.csproj">
<Project>{7F18DC76-61A2-4E7D-BA5A-FE159E789362}</Project>
<Name>StackExchange.Profiling.EntityFramework</Name>
Expand All @@ -203,6 +208,10 @@
<Project>{C471B0E5-0AE4-48E0-A938-02AEDA030C5E}</Project>
<Name>StackExchange.Profiling.Wcf</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling35\StackExchange.Profiling35.csproj">
<Project>{AB77F5B3-615E-446B-9905-833FDEF734A0}</Project>
<Name>StackExchange.Profiling35</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling\StackExchange.Profiling.csproj">
<Project>{386222BD-6B6E-480F-A342-8DE1AB516E2C}</Project>
<Name>StackExchange.Profiling</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18034
// Runtime Version:4.0.30319.18331
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="RouteHit" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>SampleWeb.SampleService.RouteHit</TypeInfo>
<TypeInfo>SampleWeb.SampleService.RouteHit, Service References.SampleService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
2 changes: 2 additions & 0 deletions Sample.Mvc/Global.asax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ private void InitProfilerSettings()
// you may implement this if you need to restrict visibility of profiling lists on a per request basis
return true; // all requests are kosher
};

MiniProfiler.Settings.ProfilerProvider = new WebRequestProfilerProvider40();
}

}
Expand Down
9 changes: 9 additions & 0 deletions Sample.Mvc/Sample.Mvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<MvcProjectUpgradeChecked>true</MvcProjectUpgradeChecked>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -233,6 +234,10 @@
<WCFMetadataStorage Include="Service References\SampleService\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StackExchange.Profiling.AdoNet\StackExchange.Profiling.AdoNet.csproj">
<Project>{44612123-b2e2-458a-859f-7077134d31c8}</Project>
<Name>StackExchange.Profiling.AdoNet</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling.EntityFramework\StackExchange.Profiling.EntityFramework.csproj">
<Project>{7f18dc76-61a2-4e7d-ba5a-fe159e789362}</Project>
<Name>StackExchange.Profiling.EntityFramework</Name>
Expand All @@ -241,6 +246,10 @@
<Project>{c471b0e5-0ae4-48e0-a938-02aeda030c5e}</Project>
<Name>StackExchange.Profiling.Wcf</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling35\StackExchange.Profiling35.csproj">
<Project>{ab77f5b3-615e-446b-9905-833fdef734a0}</Project>
<Name>StackExchange.Profiling35</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling\StackExchange.Profiling.csproj">
<Project>{386222bd-6b6e-480f-a342-8de1ab516e2c}</Project>
<Name>StackExchange.Profiling</Name>
Expand Down
2 changes: 1 addition & 1 deletion Sample.Mvc/Service References/SampleService/Reference.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.235
// Runtime Version:4.0.30319.18213
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down
1 change: 1 addition & 0 deletions Sample.Wcf/Global.asax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private void InitProfilerSettings()
MiniProfiler.Settings.ExcludeAssembly("NHibernate"); // Ignore any assembly named NHibernate
MiniProfiler.Settings.ExcludeMethod("Flush"); // Ignore any method with the name of Flush
MiniProfiler.Settings.StackMaxLength = 256; // default is 120 characters
MiniProfiler.Settings.ProfilerProvider = new WebRequestProfilerProvider40();
}

/// <summary>
Expand Down
8 changes: 8 additions & 0 deletions Sample.Wcf/Sample.Wcf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,18 @@
<Compile Include="WcfCommon.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StackExchange.Profiling.AdoNet\StackExchange.Profiling.AdoNet.csproj">
<Project>{44612123-b2e2-458a-859f-7077134d31c8}</Project>
<Name>StackExchange.Profiling.AdoNet</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling.Wcf\StackExchange.Profiling.Wcf.csproj">
<Project>{C471B0E5-0AE4-48E0-A938-02AEDA030C5E}</Project>
<Name>StackExchange.Profiling.Wcf</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling35\StackExchange.Profiling35.csproj">
<Project>{ab77f5b3-615e-446b-9905-833fdef734a0}</Project>
<Name>StackExchange.Profiling35</Name>
</ProjectReference>
<ProjectReference Include="..\StackExchange.Profiling\StackExchange.Profiling.csproj">
<Project>{386222BD-6B6E-480F-A342-8DE1AB516E2C}</Project>
<Name>StackExchange.Profiling</Name>
Expand Down
13 changes: 13 additions & 0 deletions Sample.WebForms-NET35/About.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="About.aspx.cs" Inherits="Sample.WebForms_NET35.About" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
About
</h2>
<p>
Put content here.
</p>
</asp:Content>
17 changes: 17 additions & 0 deletions Sample.WebForms-NET35/About.aspx.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sample.WebForms_NET35
{
public partial class About : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
}
15 changes: 15 additions & 0 deletions Sample.WebForms-NET35/About.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading