<commit_before>// build_options: 
Java Performance Tuning - Benchmarking tools
============================================
<NAME> <<EMAIL>>
v1.0, 15-Nov-2015: First version
:backend: slidy
//:theme: volnitsky
:data-uri:
:copyright: Creative-Commons-Zero (<NAME>)
:icons:
:br: pass:[<br>]
:nil: pass:[</>]


Content
-------

* <<_rtri_requirements,Requirements>>
// GUI (heavy client) testing (p38-41)
// Regression testing (p42)
* <<_rtri_market_overview,Market overview>>
// injectors (p37)
// Standard APi testing (p43-44) + Gattling, LoadRunner ...
* <<_rtri_jmeter,JMeter>>
// Jmeter ... (pp45...83, 89...97)
** <<_jmeter_structure,Structure>>
** <<_jmeter_lifecycle,Lifecycle>>
** <<_jmeter_components,Components>>
// Threading model (p84-89)
* <<_randomization,Randomization>>
// ! _random_ parameters
// ! randomize _before_ run
// randomize timers
//** duration
// statistical representativeness
//** caching!
// p27-28
//** https://regex101.com
* <<_advanced_data_analysis,Advanced Data Analysis>>
* <<_mock_ups,Mock-Ups>>
// (p98-99)

_(link:../0-extra/1-training_plan.html#_presentations[back to course plan])_


&rtri; Requirements
-------------------

An injector is a tool that is able to _reproducibly_ generate a _well-defined_ load.

* Submit (receive) any kind of HTTP request (response)
* Submit other kind of requests (JDBC, RMI, (SOAP), execute Java code for specific cases)
* Represent complex scenario logic 
* Management of high number of virtual users
* _'Parameterizable'_
* Recording of results

Optional:

* real time display
* analysis, reporting


Kinds of testing tools
----------------------

[style="asciidoc",cols="^10,^1,^10,^1,^10",grid="none",frame="none"]
|=====
|GUI testing
|>
|*Protocol level testing*
|>
|Unit testing
|=====

* GUI testing
** fragile
** e.g. FAT client testing
* *Protocol (or API) level testing*
** HTTP, FTP, SOAP, SMTP, JDBC...
** robust, good isolation level -> best for performance testing
** e.g. web based
* Unit testing = Non-regression testing
** closer to micro-benchmarking
** e.g. JUnit


&rtri; Market Overview
----------------------

OpenSource software:

* *JMeter*: extended GUI, many protocols, scenario = XML tree
* Gatling: scenario = Groovy code
* Grinder: distributed testing with many injectors
* ...

Commercial software:

* HP LoadRunner (very complex)
* IBM Rational Performance Tester
* Borland Silk Performer
* ...

Commercial online services (cloud based):

* BlazeMeter
* Blitz
* ...


&rtri; JMeter
-------------

image::jmeter-images/jmeter.jpg[]

* image:jmeter-images/icon-apache.png[] Apache project: https://jmeter.apache.project<commit_msg>fix(benchmark tools): Gatlign is Scala, not Groovy<commit_after>// build_options: 
Java Performance Tuning - Benchmarking tools
============================================
<NAME> <<EMAIL>>
v1.0, 15-Nov-2015: First version
:backend: slidy
//:theme: volnitsky
:data-uri:
:copyright: Creative-Commons-Zero (Arnauld Van Muysewinkel)
:icons:
:br: pass:[<br>]
:nil: pass:[</>]


Content
-------

* <<_rtri_requirements,Requirements>>
// GUI (heavy client) testing (p38-41)
// Regression testing (p42)
* <<_rtri_market_overview,Market overview>>
// injectors (p37)
// Standard APi testing (p43-44) + Gattling, LoadRunner ...
* <<_rtri_jmeter,JMeter>>
// Jmeter ... (pp45...83, 89...97)
** <<_jmeter_structure,Structure>>
** <<_jmeter_lifecycle,Lifecycle>>
** <<_jmeter_components,Components>>
// Threading model (p84-89)
* <<_randomization,Randomization>>
// ! _random_ parameters
// ! randomize _before_ run
// randomize timers
//** duration
// statistical representativeness
//** caching!
// p27-28
//** https://regex101.com
* <<_advanced_data_analysis,Advanced Data Analysis>>
* <<_mock_ups,Mock-Ups>>
// (p98-99)

_(link:../0-extra/1-training_plan.html#_presentations[back to course plan])_


&rtri; Requirements
-------------------

An injector is a tool that is able to _reproducibly_ generate a _well-defined_ load.

* Submit (receive) any kind of HTTP request (response)
* Submit other kind of requests (JDBC, RMI, (SOAP), execute Java code for specific cases)
* Represent complex scenario logic 
* Management of high number of virtual users
* _'Parameterizable'_
* Recording of results

Optional:

* real time display
* analysis, reporting


Kinds of testing tools
----------------------

[style="asciidoc",cols="^10,^1,^10,^1,^10",grid="none",frame="none"]
|=====
|GUI testing
|>
|*Protocol level testing*
|>
|Unit testing
|=====

* GUI testing
** fragile
** e.g. FAT client testing
* *Protocol (or API) level testing*
** HTTP, FTP, SOAP, SMTP, JDBC...
** robust, good isolation level -> best for performance testing
** e.g. web based
* Unit testing = Non-regression testing
** closer to micro-benchmarking
** e.g. JUnit


&rtri; Market Overview
----------------------

OpenSource software:

* *JMeter*: extended GUI, many protocols, scenario = XML tree
* Gatling: scenario = DSL (Scala code)
* Grinder: distributed testing with many injectors
* ...

Commercial software:

* HP LoadRunner (very complex)
* IBM Rational Performance Tester
* <NAME> Performer
* ...

Commercial online services (cloud based):

* BlazeMeter
* Blitz
* ...


&rtri; JMeter
-------------

image::jmeter-images/jmeter.jpg[]

* image:jmeter-images/icon-apache.png[] Apache project: https://jmeter.apache.project
{'fraction_non_alphanumeric': 0.19042253521126762, 'fraction_numerical': 0.019906103286384976, 'mean_word_length': 4.00093896713615, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 57, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2643622', 'n_tokens_mistral': 1848, 'n_tokens_neox': 1702, 'n_words': 481}