Package co.adhoclabs.ironcushion.bulkinsert

Examples of co.adhoclabs.ironcushion.bulkinsert.BulkInsertConnectionStatistics


    SampleStatistics localProcessingStatistics = getLocalProcessingStatistics(allConnectionStatistics);
    // Get statistics for sending data.
    SampleStatistics sendDataStatistics = getSendDataStatistics(allConnectionStatistics);
    // Get statistics for remote processing.
    for (int i = 0; i < allConnectionStatistics.size(); ++i) {
      BulkInsertConnectionStatistics connectionStatistics = allConnectionStatistics.get(i);
      values[i] = connectionStatistics.getRemoteProcessingTimeMillis();
    }
    SampleStatistics remoteProcessingStatistics = SampleStatistics.statisticsForPopulation(values);
    // Get statistics for receiving data.
    for (int i = 0; i < allConnectionStatistics.size(); ++i) {
      BulkInsertConnectionStatistics connectionStatistics = allConnectionStatistics.get(i);
      values[i] = connectionStatistics.getReceivedDataTimeMillis();
    }
    SampleStatistics receiveDataStatistics = SampleStatistics.statisticsForPopulation(values);

    // Calculate the rate of documents inserted per second.
    long numBulkInsertedDocs = (parsedArguments.numDocumentsPerBulkInsert *
        parsedArguments.numBulkInsertOperations);
    double remoteProcessingRate = 0;
    double localInsertRate = 0;
    for (BulkInsertConnectionStatistics connectionStatistics : allConnectionStatistics) {
      remoteProcessingRate += (MILLIS_PER_SEC * numBulkInsertedDocs /
          connectionStatistics.getRemoteProcessingTimeMillis());
      long nonLocalProcessingTime = connectionStatistics.getSendDataTimeMillis() +
          connectionStatistics.getRemoteProcessingTimeMillis() +
          connectionStatistics.getReceivedDataTimeMillis();
      localInsertRate += (MILLIS_PER_SEC * numBulkInsertedDocs / nonLocalProcessingTime);
    }
   
    return new BulkInsertBenchmarkResults(timeTaken,
        totalJsonBytesSent,
View Full Code Here

TOP

Related Classes of co.adhoclabs.ironcushion.bulkinsert.BulkInsertConnectionStatistics

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.