Created
August 10, 2012 16:39
-
-
Save yngwie74/3315444 to your computer and use it in GitHub Desktop.
Midiendo de forma precisa el performance del código
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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