[Mono-dev] Application performance benchmarking

Andreas Nahr ClassDevelopment at A-SoftTech.com
Tue Mar 21 16:51:06 EST 2006


If you want to do simple timing then either do the DateTime.Now-StartTime 
that you described or use Environment.TickCount.
These work ok unless you need to time something very short (<100ms)
You may also want to try to launch mono with the --profile switch if you 
just want to see which functions take most of the time.

Andreas

> Hi,
>
> Does anyone know what is the best way to benchmark a C# app? I'm
> specifically looking for something, that would tell me which part of the
> code takes up lot of time, how long does a specific block of code take
> to execute, etc.
>
> Is the method when I note DateTime.Now before the block of code and
> after it do a subtraction of the current DateTime.Now to the previous
> one accurate?
>
> Best,
> Lukas
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 




More information about the Mono-devel-list mailing list