Search in sources :

Example 56 with ClientStats

use of org.voltdb.client.ClientStats in project voltdb by VoltDB.

the class JDBCBenchmark method printStatistics.

/**
     * Prints a one line update on performance that can be printed
     * periodically during a benchmark.
     */
public static 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());
    System.out.printf("Avg/95%% Latency %.2f/%.2fms\n", stats.getAverageLatency(), stats.kPercentileLatencyAsDouble(0.95));
}
Also used : ClientStats(org.voltdb.client.ClientStats)

Example 57 with ClientStats

use of org.voltdb.client.ClientStats in project voltdb by VoltDB.

the class NbboBenchmark method printResults.

/**
     * 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", 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");
    System.out.printf("Reported Internal Avg Latency: %,9.2f ms\n", stats.getAverageInternalLatency());
    // 4. Write stats to file if requested
    client.writeSummaryCSV(stats, config.statsfile);
}
Also used : ClientStats(org.voltdb.client.ClientStats)

Example 58 with ClientStats

use of org.voltdb.client.ClientStats in project voltdb by VoltDB.

the class PositionsBenchmark method printResults.

/**
     * 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());
    // cast stats.getAverateLatency from long to double
    System.out.printf("Average latency:               %,9.2f ms\n", stats.getAverageLatency());
    //System.out.printf("Average latency:               %,9d 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));
    printHeading("System Server Statistics");
    // cast stats.getAverageInternalLatency from long to double
    System.out.printf("Reported Internal Avg Latency: %,9.2f ms\n", stats.getAverageInternalLatency());
    //System.out.printf("Reported Internal Avg Latency: %,9d ms\n", stats.getAverageInternalLatency());
    // 4. Write stats to file if requested
    client.writeSummaryCSV(stats, config.statsfile);
}
Also used : ClientStats(org.voltdb.client.ClientStats)

Example 59 with ClientStats

use of org.voltdb.client.ClientStats in project voltdb by VoltDB.

the class OfferBenchmark method printResults.

/**
     * 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", 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");
    System.out.printf("Reported Internal Avg Latency: %,9.2f ms\n", stats.getAverageInternalLatency());
    // 4. Write stats to file if requested
    client.writeSummaryCSV(stats, config.statsfile);
}
Also used : ClientStats(org.voltdb.client.ClientStats)

Example 60 with ClientStats

use of org.voltdb.client.ClientStats in project voltdb by VoltDB.

the class OfferBenchmark method printStatistics.

/**
     * 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", stats.getAverageLatency(), stats.kPercentileLatency(0.95));
}
Also used : ClientStats(org.voltdb.client.ClientStats)

Aggregations

ClientStats (org.voltdb.client.ClientStats)65 VoltTable (org.voltdb.VoltTable)8 FileWriter (java.io.FileWriter)4 IOException (java.io.IOException)4 ArrayList (java.util.ArrayList)4 Date (java.util.Date)4 CallableStatement (java.sql.CallableStatement)3 ClientStatsContext (org.voltdb.client.ClientStatsContext)3 IVoltDBConnection (org.voltdb.jdbc.IVoltDBConnection)3 PreparedStatement (java.sql.PreparedStatement)2 Timer (java.util.Timer)2 TimerTask (java.util.TimerTask)2 ClientAffinityStats (org.voltdb.client.ClientAffinityStats)2 NoConnectionsException (org.voltdb.client.NoConnectionsException)2 BoneCPConfig (com.jolbox.bonecp.BoneCPConfig)1 BoneCPDataSource (com.jolbox.bonecp.BoneCPDataSource)1 ComboPooledDataSource (com.mchange.v2.c3p0.ComboPooledDataSource)1 HikariConfig (com.zaxxer.hikari.HikariConfig)1 HikariDataSource (com.zaxxer.hikari.HikariDataSource)1 File (java.io.File)1