I have written several tests for a unit and they run fine, but I do notice
extreme differences in performance when I only run one test versus running
every test in the unit.
The class that is being tested has several static methods. When I run all
the tests in this unit the timing (captured through QueryPerformanceCount)
returns in 130-140 ticks. However if I just run this test by itself the
same process takes 8800-8900 ticks.
Has anyone else encountered this?
Tom 4 986
Tom Olson <to**@tomo.com> wrote: I have written several tests for a unit and they run fine, but I do notice extreme differences in performance when I only run one test versus running every test in the unit.
The class that is being tested has several static methods. When I run all the tests in this unit the timing (captured through QueryPerformanceCount) returns in 130-140 ticks. However if I just run this test by itself the same process takes 8800-8900 ticks.
Has anyone else encountered this?
Do you mean that just that test takes 130-140 ticks? If so, the rest of
the ticks are probably taken with creating the test fixture, loading
libraries etc.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jon,
The timings of all the test are pretty consistent, however when any of them
are run individually the run time skyrockets. When run as a batch none of
the test show this spike.
"Jon Skeet [C# MVP]" wrote: Tom Olson <to**@tomo.com> wrote: I have written several tests for a unit and they run fine, but I do
notice extreme differences in performance when I only run one test versus
running every test in the unit.
The class that is being tested has several static methods. When I run
all the tests in this unit the timing (captured through
QueryPerformanceCount) returns in 130-140 ticks. However if I just run this test by itself the same process takes 8800-8900 ticks.
Has anyone else encountered this?
Do you mean that just that test takes 130-140 ticks? If so, the rest of the ticks are probably taken with creating the test fixture, loading libraries etc. ...
On Thu, 28 Apr 2005 22:13:57 -0500, "Tom Olson" <to**@tomo.com> wrote: I have written several tests for a unit and they run fine, but I do notice extreme differences in performance when I only run one test versus running every test in the unit.
The class that is being tested has several static methods. When I run all the tests in this unit the timing (captured through QueryPerformanceCount) returns in 130-140 ticks. However if I just run this test by itself the same process takes 8800-8900 ticks.
Has anyone else encountered this?
Tom
Have you made sure that all methods have been run atleast once
(including the queryperformance methods), before you do the
performance test. Methods aren't JIT compiled until they are accessed
for the first time and JIT compiling takes a good amount of time.
--
Marcus Andrén
Marcus,
I'll give that a try, but wouldn't the timing of at least one of the test be
askew even when run as a batch?
<Marcus Andrén> : On Thu, 28 Apr 2005 22:13:57 -0500, "Tom Olson" <to**@tomo.com> wrote:
I have written several tests for a unit and they run fine, but I do
noticeextreme differences in performance when I only run one test versus
runningevery test in the unit.
The class that is being tested has several static methods. When I run
allthe tests in this unit the timing (captured through
QueryPerformanceCount)returns in 130-140 ticks. However if I just run this test by itself the same process takes 8800-8900 ticks.
Has anyone else encountered this?
Tom
Have you made sure that all methods have been run atleast once (including the queryperformance methods), before you do the performance test. Methods aren't JIT compiled until they are accessed for the first time and JIT compiling takes a good amount of time.
-- Marcus Andrén This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rob Meade |
last post by:
Lo all,
I have a local recordset which is not linked to a database.
Some of the fields in this recordset contain html tags.
I have a function which is called when I'm calculating my...
|
by: Shaun McKinnon |
last post by:
HI...Here's my problem...I have a popup window that loads when i want it to,
but it's not sized properly. I've set the size, but it doesn't seem to
work. I've been on 8 different websites to find...
|
by: Lord Khaos |
last post by:
If I am trying to find an expression, foo, I can do something like
this:
rExp = /foo/gi;
if(results.search(rExp) > -1){
and all work fine.
however, if I want my search term to be a...
|
by: Christopher Benson-Manica |
last post by:
I need a simple HTML element whose text I can change dynamically.
What is it? (it doesn't seem to be <div>, since I can't seem to find
what properties a <div> has...)
--
Christopher...
|
by: James H. |
last post by:
Greetings! I'm new to Python and am struggling a little with "and" and
"or" logic in Python. Since Python always ends up returning a value
and this is a little different from C, the language I...
|
by: |
last post by:
Hi!
I'm looking for unit-testing tools for .NET.
Somthing like Java has --> http://www.junit.org
regards,
gicio
|
by: Leon |
last post by:
why is the following not correct in asp.net? I'm trying to match all
subdomain names 'leon.domain.com', but
not 'www.domain.com'?
Dim sdm As Regex
sdm = New Regex (?!www\.)(.*)\.domain\.com
|
by: yeti349 |
last post by:
Hi, I'm using the following code to retrieve data from an xml file and
populate a javascript array. The data is then displayed in html table
form. I would like to then be able to sort by each...
|
by: genc_ymeri |
last post by:
Hi over there,
Propably this subject is discussed over and over several times. I did google
it too but I was a little bit surprised what I read on internet when it
comes 'when to use what'.
Most...
|
by: dmorand |
last post by:
I'm having a little trouble with my ajax. I can see my results in IE, but not firefox. I'm assuming I'm missing some syntax somewhere.
alert("Test " + results + testing); returns the values in...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |