stresstest

command module
v0.0.0-...-6222ca5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

Stresstest

Abstract

Use this tool to quicky insert a massive number of key/value pairs into immudb. You can use it to profile your installation or perform resilience test.

Settings and usage

Usage of ./stresstest:
  -addr string
        IP address of immudb server
  -batchnum int
        Number of batches (default 5)
  -batchsize int
        Batch size (default 1000)
  -db string
        Name of the database to use (default "defaultdb")
  -pass string
        Password for authenticating to immudb (default "immudb")
  -port int
        Port number of immudb server (default 3322)
  -user string
        Username for authenticating to immudb (default "immudb")
  -workers int
        Concurrent insertions (default 1)

Point -addr, -port to address and port of your immudb installation. By default, this tool connects to 127.0.0.1 on port 3322.

Use -user and -pass to specify the credentials you want to use and -db for selecting the database.

This tools writes data in batches. Every batch is mapped to a immudb transaction. You can specify the batch size with the parameter -batchsize. By default, 1000 key/values pairs are generated per transaction. You can then specify how many batches (or transaction, it's the same) you want to generate with -batchnum.

All these transactions are generated by a worker. By default, only one worker is active, but you can have more than that by specifying the parameter -workers. For every worker, a goroutine is started in parallel with the others.

So to summarise, if you wantto configure 5 workers, doing 200 batches of 1000 key/value pairs, you will use these parameters:

stresstest -workers 5 -batchnum 200 -batchsize 1000

And this will generate a grand total of 1_000_000 (5 * 200 * 1000) key/values.

Key/values size

Every key and every value is a randomly generated string of length 64 characters.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL