@@ -0,0 +1,2333 @@
+package org.neo4j.test.tools;%0A%0Aimport java.util.Arrays;%0Aimport java.util.Random;%0A%0Aimport org.neo4j.graphdb.DynamicLabel;%0Aimport org.neo4j.graphdb.GraphDatabaseService;%0Aimport org.neo4j.graphdb.Label;%0Aimport org.neo4j.graphdb.Transaction;%0Aimport org.neo4j.graphdb.factory.GraphDatabaseFactory;%0A%0Aimport static java.lang.String.format;%0A%0A// Builds a store in the path given as first argument of of -DnumNodes nodes, where each node has at most -DnumLabels%0A// randomly selected labels%0Apublic class BigLabelStoreGenerator%0A%7B%0A    private static Random random = new Random();%0A%0A    public static void main(String%5B%5D args)%0A    %7B%0A        long batchSize = 1000;%0A%0A        long numNodes = Long.parseLong( System.getProperty( %22numNodes%22 ) );%0A        int numLabels = Integer.parseInt( System.getProperty( %22numLabels%22 ) );%0A%0A        Label%5B%5D labels = createLabels( numLabels );%0A%0A        GraphDatabaseFactory factory = new GraphDatabaseFactory();%0A        GraphDatabaseService graph = factory.newEmbeddedDatabase( args%5B0%5D );%0A%0A        try %7B%0A            for ( long l = 0; l %3C numNodes; l += batchSize )%0A            %7B%0A                long labelings = 0;%0A                long start = System.currentTimeMillis();%0A                try ( Transaction tx = graph.beginTx() )%0A                %7B%0A                    for ( long m = 0; m %3C batchSize; m++ )%0A                    %7B%0A                        Label%5B%5D selectedLabels = pickRandomLabels( labels );%0A                        labelings += selectedLabels.length;%0A                        graph.createNode( selectedLabels );%0A                    %7D%0A                    tx.success();%0A                %7D%0A                long duration = System.currentTimeMillis() - start;%0A                System.out.println( format( %22nodes: %25d, labelings: %25d, duration: %25d%22, l, labelings, duration ) );%0A            %7D%0A        %7D%0A        finally%0A        %7B%0A            graph.shutdown();%0A        %7D%0A%0A    %7D%0A%0A    private static Label%5B%5D pickRandomLabels( Label%5B%5D labels )%0A    %7B%0A        return Arrays.copyOf( labels, 1 + random.nextInt( labels.length - 1 ) );%0A    %7D%0A%0A    private static Label%5B%5D createLabels( int numLabels )%0A    %7B%0A        Label%5B%5D labels = new DynamicLabel%5BnumLabels%5D;%0A        for ( int i = 0; i %3C numLabels; i++ )%0A        %7B%0A            labels%5Bi%5D = DynamicLabel.label( format( %22LABEL_%25d%22, i ) );%0A        %7D%0A        return labels;%0A    %7D%0A%7D%0A

Add BigLabelStoreGenerator