Package co.adhoclabs.ironcushion.crud

Examples of co.adhoclabs.ironcushion.crud.CrudConnectionStatistics


    SampleStatistics localProcessingStatistics = getLocalProcessingStatistics(allConnectionStatistics);
    // Get statistics for sending data.
    SampleStatistics sendDataStatistics = getSendDataStatistics(allConnectionStatistics);
    // Get statistics for remote processing of create operations.
    for (int i = 0; i < allConnectionStatistics.size(); ++i) {
      CrudConnectionStatistics connectionStatistics = allConnectionStatistics.get(i);
      values[i] = connectionStatistics.getRemoteCreateProcessingTimeMillis();
    }
    SampleStatistics remoteCreateProcessingStatistics = SampleStatistics.statisticsForPopulation(values);
    // Get statistics for remote processing of read operations.
    for (int i = 0; i < allConnectionStatistics.size(); ++i) {
      CrudConnectionStatistics connectionStatistics = allConnectionStatistics.get(i);
      values[i] = connectionStatistics.getRemoteReadProcessingTimeMillis();
    }
    SampleStatistics remoteReadProcessingStatistics = SampleStatistics.statisticsForPopulation(values);
    // Get statistics for remote processing of update operations.
    for (int i = 0; i < allConnectionStatistics.size(); ++i) {
      CrudConnectionStatistics connectionStatistics = allConnectionStatistics.get(i);
      values[i] = connectionStatistics.getRemoteUpdateProcessingTimeMillis();
    }
    SampleStatistics remoteUpdateProcessingStatistics = SampleStatistics.statisticsForPopulation(values);
    // Get statistics for remote processing of delete operations.
    for (int i = 0; i < allConnectionStatistics.size(); ++i) {
      CrudConnectionStatistics connectionStatistics = allConnectionStatistics.get(i);
      values[i] = connectionStatistics.getRemoteDeleteProcessingTimeMillis();
    }
    SampleStatistics remoteDeleteProcessingStatistics = SampleStatistics.statisticsForPopulation(values);

    // Calculate the rate of documents created per second.
    double createRate = 0;
    for (CrudConnectionStatistics connectionStatistics : allConnectionStatistics) {
      createRate += (operationCounts.numCreateOperations /
          (connectionStatistics.getRemoteCreateProcessingTimeMillis() / MILLIS_PER_SEC));
    }
    // Calculate the rate of documents read per second.
    double readRate = 0;
    for (CrudConnectionStatistics connectionStatistics : allConnectionStatistics) {
      readRate += (operationCounts.numReadOperations /
          (connectionStatistics.getRemoteReadProcessingTimeMillis() / MILLIS_PER_SEC));
    }
    // Calculate the rate of documents updated per second.
    double updateRate = 0;
    for (CrudConnectionStatistics connectionStatistics : allConnectionStatistics) {
      updateRate += (operationCounts.numUpdateOperations /
          (connectionStatistics.getRemoteUpdateProcessingTimeMillis() / MILLIS_PER_SEC));
    }
    // Calculate the rate of documents deleted per second.
    double deleteRate = 0;
    for (CrudConnectionStatistics connectionStatistics : allConnectionStatistics) {
      deleteRate += (operationCounts.numDeleteOperations /
          (connectionStatistics.getRemoteDeleteProcessingTimeMillis() / MILLIS_PER_SEC));
    }
   
    return new CrudBenchmarkResults(timeTaken,
        totalJsonBytesSent,
        totalJsonBytesReceived,
View Full Code Here

TOP

Related Classes of co.adhoclabs.ironcushion.crud.CrudConnectionStatistics

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.