Perfomance test

J

James T.

Hello!

Let's say I have 2 functions, both return data from the database. Now I
would like to compare perfomance of these two functions. I would like to
know how long it takes to execute these functions.

How can I do that?

Thank you!
James
 
E

Eliyahu Goldin

James,

Use System.Timers.Timer.

If the execution time for a single call is too short, make a loop for each
function to run, say, 10000 times.

Still the result won't be 100% reliable since in real conditions database
caching will differ.

Eliyahu
 
J

James T.

Thank you Eliyahu!

James


Eliyahu Goldin said:
James,

Use System.Timers.Timer.

If the execution time for a single call is too short, make a loop for each
function to run, say, 10000 times.

Still the result won't be 100% reliable since in real conditions database
caching will differ.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top