Package org.neo4j.smack.test.util

Examples of org.neo4j.smack.test.util.FixedRequestClient


       
        return (end.getTime() - start.getTime()) / 1000.0d;
    }

    private double sendXRequests(int numRequests) throws InterruptedException {
        FixedRequestClient client = new FixedRequestClient("localhost", 7473, PerformanceRoutes.NO_SERIALIZATION_AND_NO_DESERIALIZATION_AND_NO_INTROSPECTION, 1);
       
        Date start = new Date();
        for(int i=0;i<numRequests;i+=1) {
            client.sendBatch();
            client.waitForXResponses(i);
        }
        Date end = new Date();
        client.close();
        return (end.getTime() - start.getTime()) / 1000.0d;
    }
View Full Code Here


    }
   
    private double sendXRequestsPipelined(long numRequests) throws InterruptedException
    {
        int requestsPerBatch = 10;
        FixedRequestClient client = new FixedRequestClient("localhost", 7473, PerformanceRoutes.NO_SERIALIZATION_AND_NO_DESERIALIZATION_AND_NO_INTROSPECTION, requestsPerBatch);
        Date start = new Date();
        for(int i=0;i<numRequests;i+=requestsPerBatch) {
            client.sendBatch();
        }
        client.waitForXResponses(numRequests);
        client.close();
        Date end = new Date();
        return (end.getTime() - start.getTime()) / 1000.0d;
    }
View Full Code Here

           
            int numRequests = 500000;
           
            //startServer();
           
            pipelineClient = new FixedRequestClient("localhost", 7473, PerformanceRoutes.NO_SERIALIZATION_AND_NO_DESERIALIZATION_AND_NO_INTROSPECTION, 1);
           
            Date start = new Date();
            sendXRequests("http://localhost:7473" + PerformanceRoutes.NO_SERIALIZATION_AND_NO_DESERIALIZATION_AND_NO_INTROSPECTION, numRequests);
            //sendXRequestsPipelined(numRequests);
            Date end = new Date();
View Full Code Here

    private boolean logStuff;
    private int numWorkers;
    private int requestsPerBatch = 1000;

    public LoadGeneratingRunnable(boolean logStuff, long numRequestsToSend, int numWorkers){
        client = new FixedRequestClient("localhost", 7473, PerformanceRoutes.NO_SERIALIZATION_AND_NO_DESERIALIZATION_AND_NO_INTROSPECTION, requestsPerBatch );
        this.logStuff = logStuff;
        this.numRequestsToSend = numRequestsToSend;
        this.numWorkers = numWorkers;
    }
View Full Code Here

TOP

Related Classes of org.neo4j.smack.test.util.FixedRequestClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.