jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: the 1mn test: first jackrabbit performance and scalability tests
Date Wed, 10 Nov 2004 11:14:43 GMT
here's the (not too sophisticated ;) brute force test code:

<snippet>
        Node root = session.getRootNode();

        String importTargetName = "sandbox";
        Node importTarget;
        if (!root.hasNode(importTargetName)) {
            importTarget = root.addNode(importTargetName, "nt:unstructured");
            root.save();
        } else {
            importTarget = root.getNode(importTargetName);
        }

        System.out.println("1000*Node.addNode()\tItem.save()\tTotal\t#nodes");
        int cnt1 = 0, cnt2 = 0, total = 0;
        while (cnt1++ < 1000) {
            Node n = importTarget.addNode("node" + cnt1, "nt:unstructured");
            importTarget.save();
            cnt2 = 0;
            long t0 = System.currentTimeMillis();
            while (cnt2++ < 1000) {
                Node n1 = n.addNode("node" + cnt2, "nt:unstructured");
            }
            total += cnt2 - 1;
            long t1 = System.currentTimeMillis();
            importTarget.save();
            long t2 = System.currentTimeMillis();
            long tAdd = t1 - t0;
            long tSave = t2 - t1;
            long tTotal = t2 - t0;
            System.out.print("\t" + tAdd);
            System.out.print("\t" + tSave);
            System.out.print("\t" + tTotal);
            System.out.println("\t" + total);
        }
    }
</snippet>

cheers
stefan


On Wed, 10 Nov 2004 12:05:21 +0100, Ugo Cei <ugo@apache.org> wrote:
> Il giorno 04/nov/04, alle 19:06, David Nuescheler ha scritto:
> 
> > we tested in a brute force manner a number of
> > PersistenceManagers in jackrabbit and found that
> > the system scales quite ok right now.
> 
> Are the sources for those load tests available?
> 
>        Ugo
> 
> --
> Ugo Cei - http://beblogging.com/
> 
> 
>

Mime
View raw message