Categories
Web-Performance

SuperBenchmarker for Loadtest

SuperBenchmarker is similar to Apache Benchmark (ab.exe). It will display both ongoing real-time updates as well as a final result in HTML and on the command line. It can be easily installed with chocolatey.

With the ability to parameterize SuperBenchmarker it’s a quick and simple way to run a test right from your machine.

Basic Example

Real-time updates during test in your Browser.

This is how i did run the test.

PS D:\sb> sb -u "http://lia.example.com" -c 4 -N 360
Starting at 09.04.2022 09:15:40
[Press C to stop the test]
213005  (RPS: 586)
---------------Finished!----------------
Finished at 09.04.2022 09:21:44 (took 00:06:03.6677538)
Status 200:    213005

RPS: 589.8 (requests/second)
Max: 246ms
Min: 3ms
Avg: 5.9ms

  50%   below 6ms
  60%   below 6ms
  70%   below 6ms
  80%   below 6ms
  90%   below 7ms
  95%   below 9ms
  98%   below 12ms
  99%   below 15ms
99.9%   below 27ms

Once finished it also creates a folder in your current working directory storing the result .html file.

Folder content with the results from the test.

Installation & more details

choco install superbenchmarker

Using with parameters

SuperBenchmarker 4.5.1 with dynamic parameters
PS D:\sb> sb -u "http://lia.example.com{{{resource}}}" -c 4 -N 360 -U -f .\url.csv
Starting at 09.04.2022 09:42:32
[Press C to stop the test]
145396  (RPS: 400.4)
---------------Finished!----------------
Finished at 09.04.2022 09:48:35 (took 00:06:03.3199620)
Status 200:    36349
Status 404:    109047

RPS: 402.6 (requests/second)
Max: 1230ms
Min: 2ms
Avg: 9.1ms

  50%   below 5ms
  60%   below 6ms
  70%   below 6ms
  80%   below 8ms
  90%   below 13ms
  95%   below 22ms
  98%   below 44ms
  99%   below 69ms
99.9%   below 282ms

the url.csv

resource
/index.php
/index.html
/param.php
/health.php?is=true

SB Command-line options

PS D:\sb> sb
SuperBenchmarker 4.5.1
Copyright (C) 2022 Ali Kheyrollahi
ERROR(S):
Required option 'u, url' is missing.

  -c, --concurrency            (Default: 1) Number of concurrent requests

  -n, --numberOfRequests       (Default: 100) Total number of requests

  -N, --numberOfSeconds        Number of seconds to run the test. If specified, -n will be ignored.

  -y, --delayInMillisecond     (Default: 0) Delay in millisecond

  -u, --url                    Required. Target URL to call. Can include placeholders.

  -m, --method                 (Default: GET) HTTP Method to use

  -t, --template               Path to request template to use

  -p, --plugin                 Name of the plugin (DLL) to provide a type for replacing placeholders or one for
                               overriding status code.Must reside in the same folder.

  -l, --logfile                Path to the log file storing run stats

  -f, --file                   Path to CSV file providing replacement values for the test

  -a, --TSV                    If you provide a tab-separated-file (TSV) with -f option instead of CSV

  -d, --dryRun                 Runs a single dry run request to make sure all is good

  -e, --timedField             Designates a datetime field in data. If set, requests will be sent according to order
                               and timing of records.

  -g, --TlsVersion             Version of TLS used. Accepted values are 0, 1, 2 and 3 for TLS 1.0, TLS 1.1 and TLS 1.2
                               and SSL3, respectively

  -v, --verbose                Provides verbose tracing information

  -b, --tokeniseBody           Tokenise the body

  -k, --cookies                Outputs cookies

  -x, --useProxy               Whether to use default browser proxy. Useful for seeing request/response in Fiddler.

  -q, --onlyRequest            In a dry-run (debug) mode shows only the request.

  -h, --headers                Displays headers for request and response.

  -z, --saveResponses          saves responses in -w parameter or if not provided in\response_<timestamp>

  -w, --responsesFolder        folder to save responses in if and only if -z parameter is set

  -?, --help                   Displays this help.

  -C, --dontcap                Don't Cap to 50 characters when Logging parameters

  -R, --responseRegex          Regex to extract from response. If it has groups, it retrieves the last group.

  -j, --jsonCount              Captures number of elements under the path e.g. root/leaf1/leaf2 finds count of leaf2
                               children - stores in the log as another parameter. If the array is at the root of the
                               JSON, use space: -j ' '

  -W, --warmUpPeriod           (Default: 0) Number of seconds to gradually increase number of concurrent users. Warm-up
                               calls do not affect stats.

  -P, --reportSliceSeconds     (Default: 3) Number of seconds as interval for reporting slices. E.g. if chosen as 5,
                               report charts have 5 second intervals.

  -F, --reportFolder           Name of the folder where report files get stored. By default it is in
                               yyyy-MM-dd_HH-mm-ss.ffffff of the start time.

  -B, --dontBrowseToReports    By default it, sb opens the browser with the report of the running test. If specified,
                               it wil not browse.

  -U, --shuffleData            If specified, shuffles the dataset provided by -f option.

  --help                       Display this help screen.

  --version                    Display version information.

Error Code: CommandLine.MissingRequiredOptionError