[ckan-dev] tests progress

William Waites ww at eris.okfn.org
Sat Dec 25 23:03:57 UTC 2010


* [2010-12-22 16:04:51 +0000] Seb Bacon <seb.bacon at gmail.com> écrit:

] Looking at the tests profiles, it was clear that 99% of the time was
] spent in database I/O (including the overhead of setting up
] connections), so the biggest win appeared to be moving the tests to a
] SQLite in-memory database.

Just a not-so-idle thought. I guess that much of the overhead is
actually *disk* I/O rather than database I/O as such, connection setup
and teardown aside which should be relatively cheap over the unix
domain socket.

So, what if for testing we ran postgres against a memory filesystem?
I'm experimenting with this now, can't really tell if it's faster --
it's certainly still not blazingly fast but does seem to be better...

I've attached a scropt to do this on OSX, other operating systems
will be nearly identical except for the command to setup and tear
down the disk. Would commit this to the repository but I don't seem to
have write permission...

Also a nice side effect of this is that you will get postgres' error
messages in the terminal which is good for seeing precisely what is
going on when there are some classes of problem. I'm seeing quite a
few tests fail because they try to create the migrate_version table
when it already exists...

Cheers,
-w
-- 
William Waites
http://eris.okfn.org/ww/foaf#i
9C7E F636 52F6 1004 E40A  E565 98E3 BBF3 8320 7664




More information about the ckan-dev mailing list