Extensions to facilitate diagnosis .NET code.
C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.nuget
SmartDiagnostics.UnitTests
SmartDiagnostics
nuget
.gitignore
.travis.yml
README.md
SmartDiagnostics.sln

README.md

SmartDiagnostics

Build Status

Extensions for better perform disgnostic on .NET code

NuGet

PM> Install-Package SmartDiagnostics

Usage

Nowadays there is only one class:

SmartStopwatch

Stopwatch allowing Pause and Resume, enabling the recording of internal points, as loops.

var swFirstLoop = new SmartStopwatch();
var swSecondLoop = new SmartStopwatch();

for(int i = 0; i < 10; i++)
{
	swFirstLoop.Resume();
	// Perform some processing within the first loop.

	swFirstLoop.Pause();
     for(int  j = 0; j < 100; j++)
     {
         swSecondLoop.Resume();
         // Perform some processing within the second loop.
         swSecondLoop.Pause();
     }
}

swFirstLoop.Stop();
swSecondLoop.Stop();

When checking the output window of Visual Studio / Xamarin Studio you can see the sum of the time spent in all iterations of the processing performed in the first and second loop.