logstash/tools/benchmark-cli
kaisecheng 1a5ef6ad13
pin snakeyaml to 1.33 (#14960)
Co-authored-by: Mashhur Sattorov <mashhur.sattorov@elastic.co>
2023-03-14 13:06:08 +00:00
..
src Fix LS benchmarking tool to work with releases >= 7.10.0 (#13052) (#13053) 2021-07-06 16:31:55 +02:00
build.gradle pin snakeyaml to 1.33 (#14960) 2023-03-14 13:06:08 +00:00
gradle.properties Add license reporting task 2018-05-02 15:35:42 +00:00
README.md BENCHMARK: Add Workercount and Batch size as configurable settings in benchmark 2017-09-13 13:27:16 +00:00

Benchmark CLI

Build

To build a self-contained archive of the benchmark tool simply run:

gradle clean assemble

which will create the output jar under build/libs/benchmark-cli.jar.

Running

$ java -cp 'benchmark-cli.jar:*' org.logstash.benchmark.cli.Main --help
Option                           Description                                    
------                           -----------                                    
--distribution-version <String>  The version of a Logstash build to download    
                                   from elastic.co.                             
--elasticsearch-export <String>  Optional Elasticsearch host URL to store       
                                   detailed results at. (default: )                       
--git-hash <String>              Either a git tree (tag/branch or commit hash), 
                                   optionally prefixed by a Github username,    
                                 if ran against forks.                          
                                 E.g.                                           
                                   'ab1cfe8cf7e20114df58bcc6c996abcb2b0650d7',  
                                 'user-                                         
                                   name#ab1cfe8cf7e20114df58bcc6c996abcb2b0650d7'
                                   or 'master'                                  
--local-path <String>            Path to the root of a local Logstash           
                                   distribution.                                
                                  E.g. `/opt/logstash`                          
--ls-batch-size <Integer>        Logstash batch size (-b argument) to           
                                   configure. (default: 128)                    
--ls-workers <Integer>           Number of Logstash worker threads (-w          
                                   argument) to configure. (default: 2)         
--repeat-data <Integer>          Sets how often the test's dataset should be    
                                   run. (default: 1)                            
--testcase <String>              Currently available test cases are 'baseline'  
                                   and 'apache'. (default: baseline)            
--workdir <File>                 Working directory to store cached files in.    
                                   (default: ~/.logstash-benchmarks)  
Example
$ java -cp 'benchmark-cli.jar:*' org.logstash.benchmark.cli.Main --workdir=/tmp/benchmark2 --testcase=baseline --distribution-version=5.5.0  
  ██╗      ██████╗  ██████╗ ███████╗████████╗ █████╗ ███████╗██╗  ██╗          
  ██║     ██╔═══██╗██╔════╝ ██╔════╝╚══██╔══╝██╔══██╗██╔════╝██║  ██║          
  ██║     ██║   ██║██║  ███╗███████╗   ██║   ███████║███████╗███████║          
  ██║     ██║   ██║██║   ██║╚════██║   ██║   ██╔══██║╚════██║██╔══██║          
  ███████╗╚██████╔╝╚██████╔╝███████║   ██║   ██║  ██║███████║██║  ██║          
  ╚══════╝ ╚═════╝  ╚═════╝ ╚══════╝   ╚═╝   ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝          
                                                                               
  ██████╗ ███████╗███╗   ██╗ ██████╗██╗  ██╗███╗   ███╗ █████╗ ██████╗ ██╗  ██╗
  ██╔══██╗██╔════╝████╗  ██║██╔════╝██║  ██║████╗ ████║██╔══██╗██╔══██╗██║ ██╔╝
  ██████╔╝█████╗  ██╔██╗ ██║██║     ███████║██╔████╔██║███████║██████╔╝█████╔╝ 
  ██╔══██╗██╔══╝  ██║╚██╗██║██║     ██╔══██║██║╚██╔╝██║██╔══██║██╔══██╗██╔═██╗ 
  ██████╔╝███████╗██║ ╚████║╚██████╗██║  ██║██║ ╚═╝ ██║██║  ██║██║  ██║██║  ██╗
  ╚═════╝ ╚══════╝╚═╝  ╚═══╝ ╚═════╝╚═╝  ╚═╝╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝
                                                                               
  ------------------------------------------
  Benchmarking Version: 5.5.0
  Running Test Case: baseline
  ------------------------------------------
  Start Time: Sat 7 22 21:28:45.4 2017 CEST
  Statistical Summary:
  
  Elapsed Time: 33s
  Num Events: 977816
  Throughput Min: 2000.00
  Throughput Max: 44500.00
  Throughput Mean: 37608.31
  Throughput StdDev: 8985.03
  Throughput Variance: 80730818.62
  Mean CPU Usage: 19.27%