How to test the performace of executing a method.Help...
Performance
Collapse
This topic is closed.
X
X
-
SKTags: None -
Jon Skeet [C# MVP]
Re: Performance
SK <anonymous@disc ussions.microso ft.com> wrote:[color=blue]
> How to test the performace of executing a method.Help...[/color]
Call it "several" times (where "several" is enough to make it take a
significant amount of time) and measure the time it's taken to execute.
Obviously this is somewhat easier for idempotent methods than ones
which alter state and need to be "reset".
--
Jon Skeet - <skeet@pobox.co m>
Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.
If replying to the group, please do not mail me too
-
Guest
Re: Performance
Suppose i called the method 1000 times,then say...how much
time shud it take if it is performing well.
[color=blue]
>-----Original Message-----
>SK <anonymous@disc ussions.microso ft.com> wrote:[color=green]
>> How to test the performace of executing a method.Help...[/color]
>
>Call it "several" times (where "several" is enough to[/color]
make it take a[color=blue]
>significant amount of time) and measure the time it's[/color]
taken to execute.[color=blue]
>Obviously this is somewhat easier for idempotent methods[/color]
than ones[color=blue]
>which alter state and need to be "reset".
>
>--
>Jon Skeet - <skeet@pobox.co m>
>http://www.pobox.com/~skeet
>If replying to the group, please do not mail me too
>.
>[/color]
Comment
-
Cor Ligthert
Re: Performance
> Suppose i called the method 1000 times,then say...how much[color=blue]
> time shud it take if it is performing well.
>[/color]
With a normal method you than mostly do not even see it in ticks (1/1000
second)
However mostly it is just try and see what is in your method, when you are
doing datahandling or much screen refreshing, it takes some time. Mostly is
even complex text handling very fast when you use the right
functions/methods.
Cor
Comment
-
Jon Skeet [C# MVP]
Re: Performance
<anonymous@disc ussions.microso ft.com> wrote:[color=blue]
> Suppose i called the method 1000 times,then say...how much
> time shud it take if it is performing well.[/color]
That depends - is it rendering a complex 3D model on a large area, or
is it checking whether you passed it true or false?
Without knowing what the method is meant to achieve, there's no way on
earth of knowing what constitutes "performing well".
--
Jon Skeet - <skeet@pobox.co m>
Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.
If replying to the group, please do not mail me too
Comment
Comment