Events User Manual: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
m (Ovidiu moved page Event User Manual to Events User Manual without leaving a redirect)
No edit summary
Line 19: Line 19:
Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> First Page -> First request in the page -> Advanced -> Request headers:
Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> First Page -> First request in the page -> Advanced -> Request headers:


Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in [https://github.com/NovaOrdis/esa/blob/master/src/main/java/io/novaordis/esa/extensions/bscenarios/BusinessScenario.java BusinessScenario.java]). The value of the header should be business scenario type.
Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in [https://github.com/NovaOrdis/events/blob/master/src/main/java/io/novaordis/events/extensions/bscenarios/BusinessScenario.java BusinessScenario.java]). The value of the header should be business scenario type.


Mark the end of the target business scenarios.
Mark the end of the target business scenarios.
Line 25: Line 25:
Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> RequestHandler_16 -> First request in page -> Advanced -> Request headers:
Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> RequestHandler_16 -> First request in page -> Advanced -> Request headers:


Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in [https://github.com/NovaOrdis/esa/blob/master/src/main/java/io/novaordis/esa/extensions/bscenarios/BusinessScenario.java BusinessScenario.java]). '''Do Not use an empty value''' - NeoLoad does not send that or the undertow logging does not log it. Use the same string used to mark the scenario start (the business scenario type).
Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in [https://github.com/NovaOrdis/events/blob/master/src/main/java/io/novaordis/events/extensions/bscenarios/BusinessScenario.java BusinessScenario.java]). '''Do Not use an empty value''' - NeoLoad does not send that or the undertow logging does not log it. Use the same string used to mark the scenario start (the business scenario type).


Save.
Save.
Line 93: Line 93:


<pre>
<pre>
esa < ./access_log.log --input-format-file=./access_log.def  
events < ./access_log.log --input-format-file=./access_log.def  


esa < ./access_log.log --input-format-file=./access_log.def  describe
events < ./access_log.log --input-format-file=./access_log.def  describe
</pre>
</pre>


Line 101: Line 101:


<pre>
<pre>
esa < ./access_log.log --input-format-file=./access_log.def business-scenario > business-scenarios.csv
events < ./access_log.log --input-format-file=./access_log.def business-scenario > business-scenarios.csv
</pre>
</pre>


Scatter plot the results.
Scatter plot the results.

Revision as of 02:08, 23 April 2016

Internal

Overview

A HttpEvent contains all the query parameters under a “query” MapProperty.

A HttpEvent contains all the incoming headers under a “incoming-headers” MapProperty.

Business Scenario Measurement Procedure

Record the Load Scenarios

Record interaction with a load generator. This example was based on NeoLoad.

Mark the start of the target business scenarios.

Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> First Page -> First request in the page -> Advanced -> Request headers:

Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in BusinessScenario.java). The value of the header should be business scenario type.

Mark the end of the target business scenarios.

Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> RequestHandler_16 -> First request in page -> Advanced -> Request headers:

Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in BusinessScenario.java). Do Not use an empty value - NeoLoad does not send that or the undertow logging does not log it. Use the same string used to mark the scenario start (the business scenario type).

Save.

Prepare the Target Environment

Configure the Access Log Output

This is necessary to be done once.

Stop the server.

cd /c/ovidiu/bin
./environment.sh stop

Update the application server configuration file <access-log> section (if you copy and paste, open this in edit mode to correctly copy quots):

       ...
       <subsystem xmlns="urn:jboss:domain:undertow:1.1">
            ...
            <server name="default-server" >
                ...
                <host name="default-host" alias="localhost">
                    ...
                    <access-log pattern=""%I" %h %u [%t] "%r" "%q" %s %b %D %{i,Business-Scenario-Start-Marker} %{i,Business-Scenario-Stop-Marker} %{c,JSESSIONID}"/>
                    ...
                </host>
            </server>
      </subsystem>
      ...

Start the Environment

On the target environment, reset the application server node:

cd /c/ovidiu/bin
./environment.sh start

The start script will also clean the previous logs.

Run the Test

Shut Down and Collect Data

cd /c/ovidiu/bin
./environment.sh stop

All log data is collected and zipped under /c/ovidiu/data/load-data-yy-mm-dd-hh-mm-ss...zip

Download the test data locally via the QLB-APP02-Redirected-Folder on NOMBP2.

Unzip it in its own separated directory.

The data export script keeps the access log as “access_log.log” and places the definition of the access log fields in access_log.def.

Data Processing

Do initial parsing:

events < ./access_log.log --input-format-file=./access_log.def 

events < ./access_log.log --input-format-file=./access_log.def  describe

Extract per-scenario statistics:

events < ./access_log.log --input-format-file=./access_log.def business-scenario > business-scenarios.csv

Scatter plot the results.