/**
   * Prints the results of the voting simulation and statistics about performance.
   *
   * @throws Exception if anything unexpected happens.
   */
  public synchronized void printResults() throws Exception {
    printHeading("Transaction Results");
    BenchmarkCallback.printAllResults();

    ClientStats stats = fullStatsContext.fetch().getStats();

    // 3. Performance statistics
    printHeading("Client Workload Statistics");

    System.out.printf("Average throughput:            %,9d txns/sec\n", stats.getTxnThroughput());
    System.out.printf(
        "Average latency:               %,9.2f ms\n", (double) stats.getAverageLatency());
    System.out.printf("95th percentile latency:       %,9d ms\n", stats.kPercentileLatency(.95));
    System.out.printf("99th percentile latency:       %,9d ms\n", stats.kPercentileLatency(.99));

    printHeading("System Server Statistics");

    if (config.autotune) {
      System.out.printf("Targeted Internal Avg Latency: %,9d ms\n", config.latencytarget);
    }
    System.out.printf(
        "Reported Internal Avg Latency: %,9.2f ms\n", (double) stats.getAverageInternalLatency());

    // 4. Write stats to file if requested
    client.writeSummaryCSV(stats, config.statsfile);
  }
  /**
   * Prints a one line update on performance that can be printed periodically during a benchmark.
   */
  public synchronized void printStatistics() {
    ClientStats stats = periodicStatsContext.fetchAndResetBaseline().getStats();
    long time = Math.round((stats.getEndTimestamp() - benchmarkStartTS) / 1000.0);

    System.out.printf("%02d:%02d:%02d ", time / 3600, (time / 60) % 60, time % 60);
    System.out.printf("Throughput %d/s, ", stats.getTxnThroughput());
    System.out.printf(
        "Aborts/Failures %d/%d, ", stats.getInvocationAborts(), stats.getInvocationErrors());

    // cast to stats.getAverageLatency from long to double
    System.out.printf(
        "Avg/95%% Latency %.2f/%dms\n",
        (double) stats.getAverageLatency(), stats.kPercentileLatency(0.95));
  }
Ejemplo n.º 3
0
  /**
   * Prints a one line update on performance that can be printed periodically during a benchmark.
   */
  public synchronized void printStatistics() {
    ClientStats stats = periodicStatsContext.fetchAndResetBaseline().getStats();
    long time = Math.round((stats.getEndTimestamp() - benchmarkStartTS) / 1000.0);

    System.out.printf("%02d:%02d:%02d ", time / 3600, (time / 60) % 60, time % 60);
    System.out.printf("Throughput %d/s, ", stats.getTxnThroughput());
    System.out.printf("Txns Completed %d ", stats.getInvocationsCompleted());
    System.out.printf(
        "Avg/95%% Latency %.2f/%.2fms\n",
        stats.getAverageLatency(), stats.kPercentileLatencyAsDouble(0.95));
    System.out.println("");
  }
Ejemplo n.º 4
0
  /**
   * Prints a one line update on performance that can be printed periodically during a benchmark.
   */
  private static synchronized void printStatistics(
      ClientStatsContext context, boolean resetBaseline) {
    if (resetBaseline) {
      context = context.fetchAndResetBaseline();
    } else {
      context = context.fetch();
    }

    ClientStats stats = context.getStatsByProc().get(config.procedure);

    if (stats == null) return;

    long time = Math.round((stats.getEndTimestamp() - benchmarkStartTS) / 1000.0);

    System.out.printf("%02d:%02d:%02d ", time / 3600, (time / 60) % 60, time % 60);
    System.out.printf("Throughput %d/s, ", stats.getTxnThroughput());
    System.out.printf(
        "Aborts/Failures %d/%d, ", stats.getInvocationAborts(), stats.getInvocationErrors());
    System.out.printf(
        "Avg/95%% Latency %.2f/%.2fms\n",
        stats.getAverageLatency(), stats.kPercentileLatencyAsDouble(0.95));
  }
Ejemplo n.º 5
0
  /**
   * Prints a one line update on performance that can be printed periodically during a benchmark.
   */
  public synchronized void printStatistics() {
    try {
      ClientStats stats = periodicStatsContext.fetchAndResetBaseline().getStats();

      System.out.printf("%s ", dateformat(getTime()));
      System.out.printf("Throughput %d/s, ", stats.getTxnThroughput());
      System.out.printf(
          "Aborts/Failures %d/%d, ", stats.getInvocationAborts(), stats.getInvocationErrors());
      System.out.printf(
          "Avg/95%% Latency %.2f/%dms\n",
          stats.getAverageLatency(), stats.kPercentileLatency(0.95));
      if (totalConnections.get() == -1 && stats.getTxnThroughput() == 0) {
        if (!config.recover) {
          String errMsg = "Lost all connections. Exit...";
          exitOnError(errMsg);
        }
      }
    } catch (Exception e) {
      String msg = "In printStatistics. We got an exception: '" + e.getMessage() + "'!!";
      prt(msg);
    }
  }
Ejemplo n.º 6
0
  /**
   * Prints the results and statistics about performance.
   *
   * @throws IOException
   * @throws Exception if anything unexpected happens.
   */
  public synchronized void printResults(long totalElapsedMS, long queryElapsedMS)
      throws IOException {
    ClientStats stats = fullStatsContext.fetch().getStats();

    // 1. Results and performance statistics
    System.out.print(HORIZONTAL_RULE);
    System.out.println(" Results");
    System.out.println(HORIZONTAL_RULE);
    System.out.printf("Total queries completed:       %9d\n", stats.getInvocationsCompleted());

    // 2. Performance statistics
    System.out.print(HORIZONTAL_RULE);
    System.out.println(" Client Workload Statistics");
    System.out.println(HORIZONTAL_RULE);

    System.out.printf("Average throughput:            %,9d txns/sec\n", stats.getTxnThroughput());
    System.out.printf("Average latency:               %,9.2f ms\n", stats.getAverageLatency());
    System.out.printf(
        "95th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.95));
    System.out.printf(
        "99th percentile latency:       %,9.2f ms\n", stats.kPercentileLatencyAsDouble(.99));

    System.out.print("\n" + HORIZONTAL_RULE);
    System.out.println(" System Server Statistics");
    System.out.println(HORIZONTAL_RULE);

    System.out.printf(
        "Reported Internal Avg Latency: %,9.2f ms\n", stats.getAverageInternalLatency());

    System.out.print("\n" + HORIZONTAL_RULE);
    System.out.println(" Planner Statistics");
    System.out.println(HORIZONTAL_RULE);

    printPlannerStatistics();

    // 3. Write stats to file if requested
    client.writeSummaryCSV(stats, cliConfig.statsfile);
  }
Ejemplo n.º 7
0
  /**
   * Prints the results of the voting simulation and statistics about performance.
   *
   * @throws Exception if anything unexpected happens.
   */
  public synchronized void printResults() throws Exception {
    ClientStats stats = fullStatsContext.fetch().getStats();

    // 1. Get/Put performance results
    String display =
        "\n"
            + HORIZONTAL_RULE
            + " KV Store Results\n"
            + HORIZONTAL_RULE
            + "\nA total of %,d operations were posted...\n"
            + " - GETs: %,9d Operations (%,d Misses and %,d Failures)\n"
            + "         %,9d  Multi-partition Operations (%.2f%%)\n"
            + "         %,9d Single-partition Operations (%.2f%%)\n"
            + "         %,9d MB in compressed store data\n"
            + "         %,9d MB in uncompressed application data\n"
            + "         Network Throughput: %6.3f Gbps*\n"
            + " - PUTs: %,9d Operations (%,d Failures)\n"
            + "         %,9d  Multi-partition Operations (%.2f%%)\n"
            + "         %,9d Single-partition Operations (%.2f%%)\n"
            + "         %,9d MB in compressed store data\n"
            + "         %,9d MB in uncompressed application data\n"
            + "         Network Throughput: %6.3f Gbps*\n"
            + " - Total Network Throughput: %6.3f Gbps*\n\n"
            + "* Figure includes key & value traffic but not database protocol overhead.\n\n";

    double oneGigabit = (1024 * 1024 * 1024) / 8;
    long oneMB = (1024 * 1024);
    double getThroughput = networkGetData.get() + (successfulGets.get() * config.keysize);
    getThroughput /= (oneGigabit * config.duration);
    long totalPuts = successfulPuts.get() + failedPuts.get();
    double putThroughput = networkGetData.get() + (totalPuts * config.keysize);
    putThroughput /= (oneGigabit * config.duration);

    long gtt = successfulGetsMPT.get() + successfulGetsMPF.get();
    long gst = successfulGetsMPT.get();
    long gsf = successfulGetsMPF.get();
    double getMptR = (double) (100.00 * gst / gtt);
    double getMpfR = (double) (100.00 * gsf / gtt);
    // System.out.printf("st = %d, sf = %d, tt = %d, getMptR = '%.2f%%', getMpfR = '%.2f%%',",
    //        gst, gsf, gtt, getMptR, getMpfR);
    long ptt = successfulPutsMPT.get() + successfulPutsMPF.get();
    long pst = successfulPutsMPT.get();
    long psf = successfulPutsMPF.get();
    double putMptR = (double) (100.00 * pst / ptt);
    double putMpfR = (double) (100.00 * psf / ptt);

    System.out.printf(
        display,
        stats.getInvocationsCompleted(),
        successfulGets.get(),
        missedGets.get(),
        failedGets.get(),
        successfulGetsMPT.get(),
        getMptR,
        successfulGetsMPF.get(),
        getMpfR,
        networkGetData.get() / oneMB,
        rawGetData.get() / oneMB,
        getThroughput,
        successfulPuts.get(),
        failedPuts.get(),
        successfulPutsMPT.get(),
        putMptR,
        successfulPutsMPF.get(),
        putMpfR,
        networkPutData.get() / oneMB,
        rawPutData.get() / oneMB,
        putThroughput,
        getThroughput + putThroughput);

    // 2. Performance statistics
    System.out.print(HORIZONTAL_RULE);
    System.out.println(" Client Workload Statistics");
    System.out.println(HORIZONTAL_RULE);

    System.out.printf("Average throughput:            %,9d txns/sec\n", stats.getTxnThroughput());
    System.out.printf("Average latency:               %,9.2f ms\n", stats.getAverageLatency());
    System.out.printf("95th percentile latency:       %,9d ms\n", stats.kPercentileLatency(.95));
    System.out.printf("99th percentile latency:       %,9d ms\n", stats.kPercentileLatency(.99));

    System.out.print("\n" + HORIZONTAL_RULE);
    System.out.println(" System Server Statistics");
    System.out.println(HORIZONTAL_RULE);

    if (config.autotune) {
      System.out.printf("Targeted Internal Avg Latency: %,9d ms\n", config.latencytarget);
    }
    System.out.printf(
        "Reported Internal Avg Latency: %,9.2f ms\n", stats.getAverageInternalLatency());

    // 3. Write stats to file if requested
    client.writeSummaryCSV(stats, config.statsfile);
  }