Details
Description
I'm proposing that we create a performance test-suite.
-
- patch-C732-20050614.txt
- 14/Jun/05 2:00 AM
- 191 kB
- Ralf Joachim
-
- patch-C732-20050616.txt
- 16/Jun/05 4:49 PM
- 203 kB
- Ralf Joachim
-
Hide
- perf.zip
- 03/Apr/04 7:36 AM
- 8 kB
- Stein M. Hugubakken
-
- castor-cvs2/src/perf/castor.properties 6 kB
- castor-cvs2/src/perf/jdo-conf.xml 1 kB
- castor-cvs2/src/perf/log4j.properties 1.0 kB
- castor-cvs2/src/perf/mapping.xml 2 kB
- castor-cvs2/src/perf/mysql.sql 0.3 kB
- castor-cvs2/src/.../perf/AbstractItem.java 1 kB
- castor-cvs2/src/.../perf/AbstractPerf.java 0.7 kB
- castor-cvs2/src/perf/.../perf/DirItem.java 0.7 kB
- castor-cvs2/src/perf/.../perf/FileItem.java 0.3 kB
- castor-cvs2/src/.../perf/ToDatabasePerf.java 1 kB
- castor-cvs2/src/.../XMLMarshallingPerf.java 2 kB
- castor-cvs2/src/.../XMLUnmarshallerPerf.java 1 kB
Activity
Sorry, I should have attached the file as application/zip, not
application/octet-stream.
The goal of the test-suite is to construct a directory/file-structure for some
target-directory and then it's timing marshalling/unmarshalling of this
structure for both xml and datatabase.
Attached is what I got so far, but I have problem with ToDatabasePerf and mapping.
It works for marshalling/unmarshalling xml, but I have problem with writing the
root-node to database, exception thrown is:
org.exolab.castor.mapping.MappingException: Field element,
"org.castor.perf.AbstractItem" not found!
The mappingfile-location is hardcoded in AbstractPerf.getMapping().
First you must run XMLMarshallingPerf with a target-directory as argument for
creating the the xml-file named out.xml.
Then you can run XMLUnmarshallingPerf to unmarshal the out.xml and this works
ok, but if you try ToDatabasePerf you'll get the exception.
The problem is the AbstractItem-type, is it in relation with
http://www.castor.org/jdo-project.html#Polymorphism ?
Suggestions for how it can be solved?
Stein, yes you are suffering from 'polymorphism' ..
. Just looking at your
mapping file, here's what seems to be the problem:
<field name="children" type="org.castor.perf.AbstractItem"
collection="collection" get-method="getChildren" set-method="addChild">
<sql many-key="parent_id"/>
<bind-xml auto-naming="deriveByClass" node="element" />
</field>
DatingService.close() does not have a filedMolder to ClassMolder-mapping for
AbstractItem when trying to resolve above relation. It only has such mappings
for classes enlisted in mapping.xml through their corresponding <class>
definitions. Can't you enlist AbstractItem as well, and then use the extends
relationship for the remainder ?
As requirements for performance tests are quite a bit different between XML and
JDO I want to seperate developement of both parts. Therefor I want to change
this to be the XML one and create a new JDO one.
Any comments?
Ralf, Stein's work actually is a test suite for JDO, afair. Having said that,
Stein, can you please have a look at the latest patches I have attached to bug
1881, as they add (partial) support for polymorphism (Database.load() only), and
see whether they enable you to proceeed ?
Werner, If you like this to be the JDO side, why not
.
I think we need to do a lot more than Stein did so far.
- readonly / readwrite access
- objects w/o relations and those with different types of relations
- 1:1 / 1:n / n:m relations
- unidirectional / bidirectional relations
- differnent types of mapping polymorph objects (when supported)
- all objects in cache or not in cache
- queries / load / create / delete / updates (short and long transaction)
- lazy and not lazy loading
We can add tests step by step and calculate an overall performance index as well
as indices according to special needs.
I intend to contribute some focusing on readonly queries as I found some
performance problems there.
Gregory, can you add some to show up the improvements of the new cache
implementation.
> I think we need to do a lot more than Stein did so far.
Yoz are definitely right that a lot of tests need to be added, bug please keep
in mind that Stein could not proceed with his work due to missing support for
polymorphism. Which either has been added already or still needs to be added
(in case of OQL queries).
Stein, could you please provide an updated (unified if possible) patch ?
Stein, I am just trying to integrate the patch provided by you with the
polymorphism preview as offered last week. Here's a couple of small questions:
a) Why do you need both parent and parent_id properties in AbstractPerf ?
b) Is this a result of you trying to work-around missing support for polymorphism.
c) If that's not the case, what's the genuine meaning behind these instance
members ?
d) If it is, how should and could out.xml be modified to be in-line with support
for polymorphism.
Oops, forgot to mention that I modified all occurences to "parent_id" in the
mapping file with a filed mapping as folows:
<field name="parent" type="org.castor.perf.AbstractItem">
<sql name="parent_id" />
</field>
I'll see what I can do about the performance tests.
I'm not sure we should use the "current" patch, but rather start from scratch.
Is it an idea to base a performance test-suite on JUnit since they too should be
independent of one another?
What about using an existing framework?
http://opensourcetesting.org/performance.php
Stein, if you like to continue your original aproache I suggest to open a new issue for this work.
Created an attachment (id=439)
Unfinished test-suite