Skip to content

Instantly share code, notes, and snippets.

@yngwie74
Created August 10, 2012 16:39
Show Gist options
  • Save yngwie74/3315444 to your computer and use it in GitHub Desktop.
Save yngwie74/3315444 to your computer and use it in GitHub Desktop.
Midiendo de forma precisa el performance del código
using System.Diagnostics;
class MiClase
{
private void MiFuncion()
{
var sw = new Stopwatch();
sw.Start();
// Tu código va aquí
sw.Stop();
Log.Info(string.Format("MiFuncion: {0} ms", sw.ElapsedMilliseconds));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment