[Kmymoney-devel] KMyMoney - Unit Testing Database curiosity

allan aganderson at ukonline.co.uk
Sat Jun 26 19:24:56 CEST 2010


On 26/06/10 17:28, Fernando Vilas wrote:
> On Saturday, June 26, 2010 11:10:28 allan wrote:
>> I'd created some patches for QTesting of the csvimporter and installed
>> them on my secondary PC as acheck that all was OK.  On running the
>> tests, though, I was quite surprised by the speed difference.
>>
>> On PC A, the complete run takes 2 minutes, whereas on PC B, it took only
>> 8.49 seconds.  All tests passed without error.  So that's 14-15 times
>> faster on the older PC.  The slow one runs openSuse 11.2, and the faster
>> one is Kubuntu 10.04.  Kubuntu outputs all the timings, too.
>> Practically all the time is in the databasemanagertest.
>>
>> PC A is Athlon 64 X2 dual core 6000+.
>> PC B is Athlon 64 3500+.
>>
>> I ran both in debug mode but still no errors showed.  I even wondered if
>> the fact that I have used the database on PC A might allow for more
>> testing, but more or less ruled that out as it is password protected.  I
>> even had a quick, very, look at the code.
>>
>> It's no bother to me, but I'm just curious.  Is openSuse slow?  Anyone
>> else noticed differences?
>>
>> Allan
>>
> 
> Database tests are skipped if the unit test cannot open the test database for 
> whatever reason. Right now, it uses an SQLite database called kmm_test_driver. 
> So if the unit test did not have write permission to that file or SQLite is not 
> installed, then that would explain it.
> 
> Also, the database unit test is I/O bound, not CPU bound, so the clock speed 
> should not affect it much. The real difference would be the disk access speeds.
> 

Ah, SQLite is not installed, I thought.  But, no, it is installed.  I've
now done a save of my kmm file to sqlite, so, although it took some
while to open, it all is working.  Ctest, is much the same though.

Would not an error have occurred if ctest couldn't access a file?

I wasn't really expecting the cpu speed to be relevant, either, but
thought if I didn't mention it, it would be queried.

Like I said, though, it's no great bother to me.

Allan



More information about the KMyMoney-devel mailing list