Package org.voltdb.client.exampleutils

Examples of org.voltdb.client.exampleutils.AppHelper


        m_clientCon.close();
    }

    public MyTPCC(String args[])
    {
        m_helpah = new AppHelper(MyTPCC.class.getCanonicalName());
        m_helpah.add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 180);
        m_helpah.add("warehouses", "number_of_warehouses", "Number of warehouses", 256);
        m_helpah.add("scalefactor", "scale_factor", "Reduces per-warehouse data by warehouses/scalefactor", 22.0);
        m_helpah.add("skewfactor", "skew_factor", "Skew factor", 0.0);
        m_helpah.add("loadthreads", "number_of_load_threads", "Number of load threads", 4);
View Full Code Here


    private static final LinkedList<VoltTable> customerNamesTables = new LinkedList<VoltTable>();
    private static final Semaphore m_finishedLoadThreads = new Semaphore(0);

    public MyLoader(String args[], ClientConnection voltClient)
    {
        m_helpah = new AppHelper(MyTPCC.class.getCanonicalName());
        m_helpah.add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 180);
        m_helpah.add("warehouses", "number_of_warehouses", "Number of warehouses", 256);
        m_helpah.add("scalefactor", "scale_factor", "Reduces per-warehouse data by warehouses/scalefactor", 22.0);
        m_helpah.add("skew-factor", "skew_factor", "Skew factor", 0.0);
        m_helpah.add("load-threads", "number_of_load_threads", "Number of load threads", 4);
View Full Code Here

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Use the AppHelper utility class to retrieve command line application parameters

            // Define parameters and pull from command line
            AppHelper apph = new AppHelper(AsyncBenchmark.class.getCanonicalName())
                .add("displayinterval", "display_interval_in_seconds", "Interval for performance feedback, in seconds.", 10)
                .add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 120)
                .add("servers", "comma_separated_server_list", "List of VoltDB servers to connect to.", "localhost")
                .add("port", "port_number", "Client port to connect to on cluster nodes.", 21212)
                .add("poolsize", "pool_size", "Size of the record pool to operate on - larger sizes will cause a higher insert/update-delete rate.", 100000)
                .add("procedure", "procedure_name", "Procedure to call.", "JiggleExportSinglePartition")
                .add("ratelimit", "rate_limit", "Rate limit to start from (number of transactions per second).", 100000)
                .add("autotune", "auto_tune", "Flag indicating whether the benchmark should self-tune the transaction rate for a target execution latency (true|false).", "true")
                .add("latencytarget", "latency_target", "Execution latency to target to tune transaction rate (in milliseconds).", 10)
                .add("catalogswap", "Swap catalogs from the client", "true")
                .setArguments(args)
            ;

            config = new ConnectionConfig(apph);

            // Retrieve parameters
            final boolean catalogSwap  = apph.booleanValue("catalogswap");
            final String csv           = apph.stringValue("statsfile");

            TxnIdWriter writer = new TxnIdWriter("dude", "clientlog");

            // Validate parameters
            apph.validate("duration", (config.duration > 0))
                .validate("poolsize", (config.poolSize > 0))
                .validate("ratelimit", (config.rateLimit > 0))
                .validate("latencytarget", (config.latencyTarget > 0))
            ;

            // Display actual parameters, for reference
            apph.printActualUsage();

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Get a client connection - we retry for a while in case the server hasn't started yet
            createClient();
View Full Code Here

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Use the AppHelper utility class to retrieve command line application parameters

            // Define parameters and pull from command line
            AppHelper apph = new AppHelper(MemcachedInterfaceServer.class.getCanonicalName())
                .add("mport", "memcached_port_number", "Port against which the interface will listen for connection of Memcache clients.", 11211)
                .add("vservers", "comma_separated_voltdb_server_list", "List of VoltDB servers to connect to.", "localhost")
                .setArguments(args)
            ;

            // Retrieve parameters
            String vservers = apph.stringValue("vservers");
            int mport       = apph.intValue("mport");

            // Display actual parameters, for reference
            apph.printActualUsage();

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            final ServerSocket socket        = new ServerSocket(mport);
View Full Code Here

    {
        try
        {
            // Use the AppHelper utility class to retrieve command line application parameters
            // Define parameters and pull from command line
            AppHelper apph = new AppHelper(AsyncBenchmark.class.getCanonicalName())
                .add("displayinterval", "display_interval_in_seconds", "Interval for performance feedback, in seconds.", 10)
                .add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 120)
                .add("servers", "comma_separated_server_list", "List of VoltDB servers to connect to.", "localhost")
                .add("port", "port_number", "Client port to connect to on cluster nodes.", 21212)
                .add("pool-size", "pool_size", "Size of the record pool to operate on - larger sizes will cause a higher insert/update-delete rate.", 100000)
                .add("procedure", "procedure_name", "Procedure to call.", "UpdateKey")
                .add("wait", "wait_duration", "Wait duration (only when calling one of the Wait procedures), in milliseconds.", 0)
                .add("ratelimit", "rate_limit", "Rate limit to start from (number of transactions per second).", 100000)
                .add("autotune", "auto_tune", "Flag indicating whether the benchmark should self-tune the transaction rate for a target execution latency (true|false).", "true")
                .add("latency-target", "latency_target", "Execution latency to target to tune transaction rate (in milliseconds).", 10.0d)
                .add("run-loader", "Run the leveldb loader", "true")
                .setArguments(args)
            ;

            // Retrieve parameters
            final long displayInterval = apph.longValue("displayinterval");
            final long duration        = apph.longValue("duration");
            final String servers       = apph.stringValue("servers");
            final int port             = apph.intValue("port");
            final int poolSize         = apph.intValue("pool-size");
            final String procedure     = apph.stringValue("procedure");
            final long wait            = apph.intValue("wait");
            final long rateLimit       = apph.longValue("ratelimit");
            final boolean autoTune     = apph.booleanValue("autotune");
            final double latencyTarget = apph.doubleValue("latency-target");
            final String csv           = apph.stringValue("stats");
            final boolean runLoader    = apph.booleanValue("run-loader");

            // Validate parameters
            apph.validate("duration", (duration > 0))
                .validate("pool-size", (duration > 0))
                .validate("wait", (wait >= 0))
                .validate("ratelimit", (rateLimit > 0))
                .validate("latency-target", (latencyTarget > 0))
            ;

            // Display actual parameters, for reference
            apph.printActualUsage();

            // Get a client connection - we retry for a while in case the server hasn't started yet
            Con = ClientConnectionPool.getWithRetry(servers, port);

            // Create a Timer task to display performance data on the procedure
View Full Code Here

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Use the AppHelper utility class to retrieve command line application parameters

            // Define parameters and pull from command line
            AppHelper apph = new AppHelper(SyncBenchmark.class.getCanonicalName())
                .add("threads", "thread_count", "Number of concurrent threads attacking the database.", 1)
                .add("displayinterval", "display_interval_in_seconds", "Interval for performance feedback, in seconds.", 10)
                .add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 120)
                .add("servers", "comma_separated_server_list", "List of VoltDB servers to connect to.", "localhost")
                .add("port", "port_number", "Client port to connect to on cluster nodes.", 21212)
                .add("poolsize", "pool_size", "Size of the record pool to operate on - larger sizes will cause a higher insert/update-delete rate.", 100000)
                .add("procedure", "procedure_name", "Procedure to call.", "JiggleSinglePartition")
                .add("wait", "wait_duration", "Wait duration (only when calling one of the Wait procedures), in milliseconds.", 0)
                .setArguments(args)
            ;

            // Retrieve parameters
            final int threadCount      = apph.intValue("threads");
            final long displayInterval = apph.longValue("displayinterval");
            final long duration        = apph.longValue("duration");
            final String servers       = apph.stringValue("servers");
            final int port             = apph.intValue("port");
            final int poolSize         = apph.intValue("pool-size");
            final String procedure     = apph.stringValue("procedure");
            final long wait            = apph.intValue("wait");
            final String csv           = apph.stringValue("statsfile");

            // Validate parameters
            apph.validate("duration", (duration > 0))
                .validate("threads", (threadCount > 0))
                .validate("poolsize", (poolSize > 0))
                .validate("wait", (wait >= 0))
            ;

            // Display actual parameters, for reference
            apph.printActualUsage();

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Get a client connection - we retry for a while in case the server hasn't started yet
            Con = ClientConnectionPool.getWithRetry(servers, port);
View Full Code Here

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Use the AppHelper utility class to retrieve command line application parameters

            // Define parameters and pull from command line
            AppHelper apph = new AppHelper(JDBCBenchmark.class.getCanonicalName())
                .add("threads", "thread_count", "Number of concurrent threads attacking the database.", 1)
                .add("displayinterval", "display_interval_in_seconds", "Interval for performance feedback, in seconds.", 10)
                .add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 120)
                .add("servers", "comma_separated_server_list", "List of VoltDB servers to connect to.", "localhost")
                .add("port", "port_number", "Client port to connect to on cluster nodes.", 21212)
                .add("poolsize", "pool_size", "Size of the record pool to operate on - larger sizes will cause a higher insert/update-delete rate.", 100000)
                .add("procedure", "procedure_name", "Procedure to call.", "JiggleSinglePartition")
                .add("wait", "wait_duration", "Wait duration (only when calling one of the Wait procedures), in milliseconds.", 0)
                .setArguments(args)
            ;

            // Retrieve parameters
            final int threadCount      = apph.intValue("threads");
            final long displayInterval = apph.longValue("displayinterval");
            final long duration        = apph.longValue("duration");
            final String servers       = apph.stringValue("servers");
            final int port             = apph.intValue("port");
            final int poolSize         = apph.intValue("poolsize");
            final String procedure     = apph.stringValue("procedure");
            final long wait            = apph.intValue("wait");
            final String csv           = apph.stringValue("statsfile");

            // Validate parameters
            apph.validate("duration", (duration > 0))
                .validate("threads", (threadCount > 0))
                .validate("poolsize", (poolSize > 0))
                .validate("wait", (wait >= 0))
            ;

            // Display actual parameters, for reference
            apph.printActualUsage();

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // We need only do this once, to "hot cache" the JDBC driver reference so the JVM may realize it's there.
            Class.forName("org.voltdb.jdbc.Driver");
View Full Code Here

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Use the AppHelper utility class to retrieve command line application parameters

            // Define parameters and pull from command line
            AppHelper apph = new AppHelper(AdhocSmash.class.getCanonicalName())
                .add("displayinterval", "display_interval_in_seconds", "Interval for performance feedback, in seconds.", 10)
                .add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 120)
                .add("servers", "comma_separated_server_list", "List of VoltDB servers to connect to.", "localhost")
                .add("port", "port_number", "Client port to connect to on cluster nodes.", 21212)
                .add("ratelimit", "rate_limit", "Rate limit to start from (number of transactions per second).", 100000)
                .setArguments(args)
            ;

            // Retrieve parameters
            long displayInterval = apph.longValue("displayinterval");
            long duration        = apph.longValue("duration");
            String servers       = apph.stringValue("servers");
            int port             = apph.intValue("port");
            long rateLimit       = apph.longValue("ratelimit");

            Random rand = new Random();

            // Validate parameters
            apph.validate("duration", (duration > 0))
                .validate("displayinterval", (displayInterval > 0))
                .validate("ratelimit", (rateLimit > 0))
            ;

            // Display actual parameters, for reference
            apph.printActualUsage();

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Get a client connection - we retry for a while in case the server hasn't started yet
            Con = ClientConnectionPool.getWithRetry(servers, port);
View Full Code Here

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Use the AppHelper utility class to retrieve command line application parameters

            // Define parameters and pull from command line
            AppHelper apph = new AppHelper(AsyncBenchmark.class.getCanonicalName())
                .add("displayinterval", "display_interval_in_seconds", "Interval for performance feedback, in seconds.", 10)
                .add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 120)
                .add("servers", "comma_separated_server_list", "List of VoltDB servers to connect to.", "localhost")
                .add("port", "port_number", "Client port to connect to on cluster nodes.", 21212)
                .add("poolsize", "pool_size", "Size of the record pool to operate on - larger sizes will cause a higher insert/update-delete rate.", 100000)
                .add("procedure", "procedure_name", "Procedure to call.", "JiggleSinglePartition")
                .add("wait", "wait_duration", "Wait duration (only when calling one of the Wait procedures), in milliseconds.", 0)
                .add("ratelimit", "rate_limit", "Rate limit to start from (number of transactions per second).", 100000)
                .add("autotune", "auto_tune", "Flag indicating whether the benchmark should self-tune the transaction rate for a target execution latency (true|false).", "true")
                .add("latencytarget", "latency_target", "Execution latency to target to tune transaction rate (in milliseconds).", 10.0d)
                .setArguments(args)
            ;

            // Retrieve parameters
            final long displayInterval = apph.longValue("displayinterval");
            final long duration        = apph.longValue("duration");
            final String servers       = apph.stringValue("servers");
            final int port             = apph.intValue("port");
            final int poolSize         = apph.intValue("poolsize");
            final String procedure     = apph.stringValue("procedure");
            final long wait            = apph.intValue("wait");
            final long rateLimit       = apph.longValue("ratelimit");
            final boolean autoTune     = apph.booleanValue("autotune");
            final double latencyTarget = apph.doubleValue("latencytarget");
            final String csv           = apph.stringValue("statsfile");


            // Validate parameters
            apph.validate("duration", (duration > 0))
                .validate("poolsize", (duration > 0))
                .validate("wait", (wait >= 0))
                .validate("ratelimit", (rateLimit > 0))
                .validate("latencytarget", (latencyTarget > 0))
            ;

            // Display actual parameters, for reference
            apph.printActualUsage();

// ---------------------------------------------------------------------------------------------------------------------------------------------------

            // Get a client connection - we retry for a while in case the server hasn't started yet
            Con = ClientConnectionPool.getWithRetry(servers, port);
View Full Code Here

    public static void main(String[] args)
    {
        // Use the AppHelper utility class to retrieve command line application parameters
        // Define parameters and pull from command line
        AppHelper apph = new AppHelper(DeletesClient.class.getCanonicalName())
            .add("duration", "run_duration_in_seconds", "Benchmark duration, in seconds.", 240)
            .add("average-batch-size", "average_batch_size", "Average batch size", 150000)
            .add("batches", "num_batches_to_keep", "Number of batches to keep", 5)
            .add("cleanup-freq", "cleanup_frequency", "Cleanup frequency, in seconds.", 6)
            .add("snapshot-freq", "cycles_between_snapshots", "Snapshot frequency, in seconds. -1 to turn off snapshots", -1)
            .add("block-snapshots", "use_blocking_snapshots_snapshots", "Blocking snapshots (true|false)", "false")
            .add("small-strings", "use_inline_strings", "Forces all the strings to be inlined strings (true|false)", "false")
            .add("servers", "comma_separated_server_list", "List of VoltDB servers to connect to.", "localhost")

            .setArguments(args)
            ;

        m_averageBatchSize = apph.intValue("average-batch-size");
        m_batchesToKeep = apph.intValue("batches");
        m_deceasedCleanupFreq = apph.intValue("cleanup-freq");
        m_snapshotFreq = apph.intValue("snapshot-freq");
        m_blockingSnapshots = apph.booleanValue("block-snapshots");
        m_smallStrings = apph.booleanValue("small-strings");
        long duration = apph.longValue("duration");
        String commaSeparatedServers = apph.stringValue("servers");

        apph.validate("average-batch-size", (m_averageBatchSize > 0));
        apph.validate("batches", (m_batchesToKeep >= 0));
        apph.validate("duration", (duration >= 0));
        apph.validate("cleanup-freq", (m_deceasedCleanupFreq > 0));

        apph.printActualUsage();

        System.out.println("Starting Deletes app with:");
        System.out.printf("\tAverage batch size of %d\n", m_averageBatchSize);
        System.out.printf("\tKeeping %d batches\n", m_batchesToKeep);
        System.out.printf("\tCleaning up deceased every %d batches\n", m_deceasedCleanupFreq);
View Full Code Here

TOP

Related Classes of org.voltdb.client.exampleutils.AppHelper

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.