Stress Test
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Stress Test

on

  • 739 views

 

Statistics

Views

Total Views
739
Views on SlideShare
739
Embed Views
0

Actions

Likes
0
Downloads
7
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Stress Test Document Transcript

  • 1. Software- und Organisations-Service GmbH Stress Test Stress Test User Guide Technical Documentation 24. November 2005 Software- und Organisations-Service GmbH Giesebrechtstr. 15 · D-10629 Berlin · Telephone +49 30 86 47 90-0 · Telefax (030) 8 61 33 35 Translation / Übersetzung: Alan Amos, www.alan-amos.de
  • 2. Stress Test: User Guide 2 Contact Information Software- und Organisations-Service GmbH Giesebrechtstr. 15 10629 Berlin Germany Telephone +49 30 86 47 90-0 Telefax +49 30 8 61 33 35 Mail info@sos-berlin.com Web www.sos-berlin.com Last updated: 24. November 2005 Software- und Organisations-Service GmbH 24. November 2005
  • 3. Stress Test: User Guide 3 Contents 1 Aims.............................................................................................................................................................4 2 Stress Test Functions..................................................................................................................................4 2.1 Introduction ............................................................................................................................................4 2.2 Test Procedure for Database Queries...................................................................................................4 2.3 Test Procedure for Java Programs........................................................................................................4 3 Stress Test Installation ................................................................................................................................5 3.1 System Requirements ...........................................................................................................................5 3.1.1 Java Runtime Environment (J2RE 1.4.1).......................................................................................5 3.1.2 JDBC Database Client ...................................................................................................................5 3.2 Files Delivered .......................................................................................................................................5 4 Stress Test Configuration ............................................................................................................................6 4.1 Creation of the Input Files for Database Tests ......................................................................................6 4.2 Starting the Stress Test .........................................................................................................................6 4.2.1 Standard Option Values .................................................................................................................7 4.2.2 Classpath .......................................................................................................................................7 4.2.3 Example of a Start Script for Unix Systems ...................................................................................8 4.2.4 Example of a Start Script for Windows Systems............................................................................8 5 Stress Test Java Program Interface............................................................................................................9 5.1 Example for the Use of the Program Interface ......................................................................................9 5.2 Methods of the StresstestSession Object............................................................................................10 5.2.1 executeChain() .............................................................................................................................10 5.2.2 execute( methodName )...............................................................................................................10 5.2.3 execute( methodName, fileName ) ..............................................................................................10 5.2.4 execute( url ) ................................................................................................................................10 5.2.5 get_current_file() ..........................................................................................................................11 5.2.6 get_param()..................................................................................................................................11 5.2.7 get_execute() ...............................................................................................................................11 5.2.8 get_stresstest() ............................................................................................................................11 5.2.9 get_connection()...........................................................................................................................11 5.2.10 get_logger() ..................................................................................................................................12 5.2.11 get_thread_index() .......................................................................................................................12 5.2.12 get_session_number() .................................................................................................................12 5.2.13 get_current_value() ......................................................................................................................12 5.2.14 get_next_value()...........................................................................................................................12 5.3 Methods of the StresstestResponse Object ........................................................................................13 5.3.1 get_response_code() ...................................................................................................................13 5.3.2 get_response_message() ............................................................................................................13 6 Log Information..........................................................................................................................................14 6.1 Standard Log .......................................................................................................................................14 6.2 Thread Log ..........................................................................................................................................14 6.3 Difference between the Thread Log and the Standard Log.................................................................14 7 Additional Tools .........................................................................................................................................15 7.1 Stress Test Import ...............................................................................................................................15 7.1.1 Starting StressTest Import ...........................................................................................................15 7.2 Stress Test Report...............................................................................................................................16 7.2.1 Starting the Stress Test Report....................................................................................................16 Software- und Organisations-Service GmbH 24. November 2005
  • 4. Stress Test: User Guide 4 1 Aims This User Guide describes the installation, configuration and use of the Stress Test software for load testing. It is intended for developers who have to install and use the components of this software. This document describes the installation and use of the Stress Test software on Unix and Windows operating systems. 2 Stress Test Functions 2.1 Introduction The Stress Test is a load test software for testing database intensive applications and Java programs. The software is intended to be used as a Java command line tool in conjunction with a program interface. The Stress Test is able to simulate different users accessing a database or a Java program simultaneously. This is achieved using Java Threads, where each thread represents a user accessing the database. The Stress Test can be used to determine how many users can simultaneously access the database with the current server configuration (hard and software) and the reaction times that can be expected under this load. This load test is not a substitute for a functional test – this means that developers should carry out a functional test of a database and program(s) before carrying out a load test. 2.2 Test Procedure for Database Queries A number of input files can be specified before the Stress Test is started. The SQL statements to be tested are written in these files. A file is used represent a block of statements to be executed by the application - e.g. in order to find a particular data set. The number of simultaneous threads – each representing a user accessing the database – can be varied, with each thread making its own connection to the database. Each thread re- peatedly processes every input file for the agreed duration of the test. A summary at the end of the Stress Test provides information about how often each file is processed by all threads during the test, as well as the slow- est, quickest and average reaction times for processing each input file. 2.3 Test Procedure for Java Programs Individual classes to be tested can be specified before starting the Stress Test software. These classes imple- ment an interface of the Stress Test API and test the methods used by an application. The number of threads that simultaneously access the application methods can be configured. The aim of the test is to determine the reaction times that can be expected for a given number of users simultaneously ac- cessing an application running on a particular server system. Further, the test shows if the application being tested is threadable or not. Many Java programs behave differently when running in parallel with multiple threads than when running singly. Every thread processes the methods of an application for the duration of the Stress Test. Information about the number of times each method is called and any errors that may have oc- curred is recorded in a summary available at the end of the test. Software- und Organisations-Service GmbH 24. November 2005
  • 5. Stress Test: User Guide 5 3 Stress Test Installation 3.1 System Requirements Stress Test is delivered as a Java command line tool – i.e. as a .jar archive - and can be run on Windows and Unix operating systems. The following software components are required for the installation of Stress Test: 3.1.1 Java Runtime Environment (J2RE 1.4.1) The Java Runtime Environment must be correctly installed and the JAVA_HOME environment variable point to the JRE installation folder. 3.1.2 JDBC Database Client A functional JDBC driver for MySQL, MS SQL Server or Oracle and which is compatible with the Java JRE 1.4.1 is necessary, should either a database test be carried out or the test results be processed using the Stress Test Import and Stress Test Report extension tools. A JDBC driver is not required should the stress tests carried out on applications which do not use a database. 3.2 Files Delivered The following files are included in the Stress Test package: /stresstest folder for the Stress Test Software stresstest.sh Stress Test start script for Unix stresstest.cmd Stress Test start script for Windows stresstest_import.sh Stress Test Import start script for Unix stresstest_import.cmd Stress Test Import start script for Windows stresstest_report.sh Stress Test Report start script for Unix stresstest_report.cmd Stress Test Report start script for Windows ./config folder for the configuration file sos_settings.ini example configuration file for stress tests using a database ./lib folder for the Java libraries sos.connection.jar Java classes from the SOS GmbH for database access sos.stresstest.jar Java classes from the SOS GmbH for the processing of settings sos.util.jar Java classes from the SOS GmbH for the help functions The following files are not included in the package: msbase.jar Java classes used by the MS SQL Server JDBC driver mssqlserver.jar Java classes for the MS SQL Server JDBC driver msutil.jar Java classes containing help functions for the MS SQL Server mysql*.jar the correct MySQL Java classes for the database version used must be downloaded from http://www.mysql.com ojdbc14.jar Java classes for the Oracle JDBC driver Software- und Organisations-Service GmbH 24. November 2005
  • 6. Stress Test: User Guide 6 4 Stress Test Configuration 4.1 Creation of the Input Files for Database Tests It is possible to improve the readability of SQL statements in the input files by writing them over a number of lines. An empty line is used to separate individual SQL statements from one another. Comments are allowed; each line of a comment must either start with ‘#’ or ‘;’. MySQL: Every input file must start with SET SESSION query_cache_type = OFF. This switches off the data- base query cache and is necessary as otherwise the database would cache the query results. This in turn would lead to incorrect test results as it is unlikely that in normal use the database would be able to cache que- ries. When the insertion or the actualization of records within transactions is to be tested, it is recommended that logically related SQL statements are executed for different records. This makes the test conditions more realis- tic, as it is unlikely that, for example, in a test with a large number of threads, all the threads would simultane- ously access the same records. To this end, it is possible to insert variables for the numerical fields of a record in the SQL statements. These variables are substituted during the test using the -start und –stop options. Example: SELECT "TEMPLATE", "TITLE", "QUEUE", "LANG", "USER", "STATUS_DATE", "STATUS", "STATUS_TEXT", "INBOUND_TYPE", "INBOUND_FILENAME", "FILENAME", "JOB_ID", "MODEL", "TASK", "REFERENCE" FROM LF_LETTERS WHERE "LETTER"=<%=nextval%> UPDATE LF_LETTERS SET "TEMPLATE"=5, "TITLE"='Documentorder Nr. 4209, external Order-Nr. 4711', "QUEUE"=0, "LANG"=0, "USER"=3, "STATUS_DATE"=NOW(), "STATUS"=0, "STATUS_TEXT"='ENQUEUED', "INBOUND_TYPE"=6, "INBOUND_FILENAME"='', "FILENAME"='', "JOB_ID"=9480, "MODEL"=3, "TASK"=47, "STARTDATE"='2004-08-26 14:38:39', "REFERENCE"='2190;4711' WHERE "LETTER"=<%=curval%> The <%=nextval%> variable causes the Stress Test to increment the internal variable counter used in an SQL statement. Subsequent SQL statements which are intended to access the same record can use the <%=curval%> variable. In the example above, a record is selected and then updated. 4.2 Starting the Stress Test Typical start arguments for the Stress Test are: java -classpath=./lib/mysql-connector-java-3.0.15-ga-bin.jar; ./lib/sos.connection.jar;./lib/sos.util.jar;./lib/sos.stresstest.jar sos.stresstest.Stresstest -config=config/sos_settings.ini -output=stresstest.log -threads=25 -time=30 -input=file1.sql+file2.sql -start=1 -stop=100 Note that the -classpath archives in the example above are separated on Windows systems using ";" and with ":" on Unix systems. The arguments have the following initial values as the Stress Test program is started: -config the file which contains the database access information -classpath the path used for the software Java archives -class the Name of the test class – the standard class is sos.stresstest.SOSStresstestSession. Note that individual classes can be developed for stress tests -output the name of the log file for the Stress Test output -append-output specifies whether the log files for several load tests should be written cumulatively or overwritten. The default setting is true, i.e. the log will be written cumulatively Software- und Organisations-Service GmbH 24. November 2005
  • 7. Stress Test: User Guide 7 -threads the number of users simultaneously represented in the test -time the test duration in seconds -param a parameter with an arbitrary value for use with the Stress Test API -execute selection of a test method to be used in the executeChain() method Several methods can be specified - separated using “+” -input the input file or a list of input files (separated using"+") -start a start counter incremented by specific SQL statements -stop the value at which the start counter is reset -v (verbosity) thread debug level possible values: 0 (no debug output), 1-9 (debug level) 4.2.1 Standard Option Values Not all options must be specified. Options with standard values are: -config standard value: an empty string -log-dir standard value: ./logs -output standard value: stdout -append-output append log output, standard value: true -threads number of simultaneous threads, standard value: 1 -time test duration in seconds, standard value: 60s -class standard value: SOSStresstestSession -start standard value: 0 -stop standard value:0 -v standard value:0 Either the –class or –input parameters must be specified; Should both be specified, then the –class parameter is only relevant when an individual class is developed for the Stress Test. The –start and –stop parameters are both optional. They must only be specified when the <%=nextval%> and <%=curval%> variables are used in the input file(s). The –start parameter specifies the value to which the vari- able counter should be set at the start of the test; the –stop parameter the value at which the variable counter should be reset to the start value. The values for –start and –stop should be selected so that no SQL statement returns an empty result set. 4.2.2 Classpath The following libraries are required: ./lib/sos.connection.jar ./lib/sos.stresstest.jar ./lib/sos.util.jar The following libraries are required according to the database system being used: MS SQL Server ./lib/msbase.jar ./lib/mssqlserver.jar ./lib/msutil.jar MySQL a suitable driver must be installed according to the database version being used, e.g. ./lib/mysql-connector-java-3.0.15-ga-bin.jar Oracle ./lib/ojdbc14.jar Software- und Organisations-Service GmbH 24. November 2005
  • 8. Stress Test: User Guide 8 4.2.3 Example of a Start Script for Unix Systems #!/bin/bash java -cp $CLASSPATH:./lib/msbase.jar:./lib/mssqlserver.jar:./lib/msutil.jar:./lib/mysql- connector-java-3.1.0-alpha-bin.jar:./lib/ojdbc14.jar:./lib/sos.connection.jar: ./lib/sos.util.jar:./lib/sos.stresstest.jar sos.stresstest.Stresstest -time=15 –threads=10 –input=stress1.sql+stress2.sql –output=stesstest.log In this example a stress test lasting for 15s (-time=15) is specified for 10 simultaneous users (-threads=10). The SQL-Statements are to be found in the stress1.sql und stress2.sql files and the output is to be written in the stresstest.log file. 4.2.4 Example of a Start Script for Windows Systems java -cp %CLASSPATH%;./lib/msbase.jar;./lib/mssqlserver.jar;./lib/msutil.jar;./lib/mysql- connector-java-3.1.0-alpha-bin.jar;./lib/ojdbc14.jar;./lib/sos.connection.jar; ./lib/sos.util.jar;./lib/sos.stresstest.jar sos.stresstest.Stresstest -time=15 –threads=10 –input=stress1.sql+stress2.sql –output=stesstest.log In this example a stress test lasting for 15s (-time=15) is specified for 10 simultaneous users (-threads=10). The SQL-Statements are to be found in the stress1.sql und stress2.sql files and the output is to be written in the stresstest.log file. Software- und Organisations-Service GmbH 24. November 2005
  • 9. Stress Test: User Guide 9 5 Stress Test Java Program Interface Individual Java programs can be tested alongside database queries. Stress Test has an interface with which the methods that are repeatedly called up in the course of a test are registered. A number of methods can be called one after the other in a “chain of actions” These methods are then individually logged by the Stress Test together with the time required for their processing. 5.1 Example for the Use of the Program Interface import sos.stresstest.*; /** * @author Andreas Püschel <andreas.pueschel@sos-berlin.com> * @since 2004-11-21 * @version 1.0 * * custom class for stresstest session implementation */ public class SampleStresstestSession extends SOSStresstestSession { /** * Constructor * * @param stresstest_thread Thread Identifier */ public SampleStresstestSession( StresstestThread stresstest_thread ) throws Exception { super( stresstest_thread ); } /** * runs the action chain */ public void executeChain() throws Exception { try { // execute test chain execute( "method_test" ); } catch (Exception e) { throw new Exception("..error in executeChain(): " + StresstestExceptionMes- sage.getExceptionMessage(e)); } } /** * runs the action */ public void method_test() throws Exception { for(int i=0; i<3; i++) { Thread.sleep(300); } } } In the example above the SampleStresstestSession class is derived from the basic SOSStresstestSession class, which, in turn, is delivered in the sos.stresstest.jar archive. The executeChain() method is implemented by the example class and calls the method specified as the ar- gument to execute(method) using one or more calls. A start script can be written to launch this example. The archive together with its class is then specified in the Classpath (sample.jar) of this script and the name of the class is handed over using the -class parameter: java -cp %CLASSPATH%;./sample.jar;./lib/sos.stresstest.jar sos.stresstest.Stresstest -class=SampleStresstestSession -time=15 –threads=10 –output=stesstest.log Software- und Organisations-Service GmbH 24. November 2005
  • 10. Stress Test: User Guide 10 5.2 Methods of the StresstestSession Object 5.2.1 executeChain() Method: public void executeChain() throws Exception Argument: none Return value: void Description: The method must be implemented from a single Stress Test class and usually contains calls of other test methods that are to be executed as a test chain. Each of these calls is then made using the exe- cute() method e.g.: public void executeChain() throws Exception { execute("myMethod"); } The -execute parameter can be used to restrict the methods executed on starting the program to those speci- fied in the parameter and not all the test methods listed in the executeChain() method. 5.2.2 execute( methodName ) Method: public StresstestResponse execute(String methodName) throws Exception Argument: name of the method to be tested Return value: an object belonging to the StresstestResponse class Description: The method is used in the executeChain() method described above to call one or more indi- vidual methods which form a part of the stress test. 5.2.3 execute( methodName, fileName ) Method: public StresstestResponse execute(String methodName, fileName) throws Exception Argument: name of the method to be tested; the file name of the –input parameter Return value: object belonging to the StresstestResponse class Description: This method is used in the executeChain() method described above to call one or more indi- vidual methods which in turn form a part of the stress test. The name of a file containing input data is expected in the second argument; the file name can be called with get_current_file() using the method specified in methodName. 5.2.4 execute( url ) Method: public StresstestResponse execute(URL url) throws Exception Argument: name of the method to be tested Return value: object belonging to the class StresstestResponse Description: The method is used in the executeChain() method described above to call one or more indi- vidual methods which in turn form a part of a stress test. A URL is expected as argument. This URL is then loaded by the execute() method, which in turn reads its content. Software- und Organisations-Service GmbH 24. November 2005
  • 11. Stress Test: User Guide 11 5.2.5 get_current_file() Method: public string get_current_file() throws Exception Argument: none Return value: name of the current input data file provided by the -input parameter at the start of the program Description: The method returns the value of the -input parameter which is handed over at the start of the Stress Test program. This parameter contains one or more file names – the method returns the name of the current input file. 5.2.6 get_param() Method: public string get_param() throws Exception Argument: none Return value: value of the -param parameter at the start of the Stress Test program Description: The value of the -param parameter which is handed over at the start of the Stress Test pro- gram is returned by this method. 5.2.7 get_execute() Method: public string get_execute() throws Exception Argument: none Return value: value of the -execute parameter at the start of the Stress Test program Description: The method returns the value of the -execute parameter which is handed over at the start of the Stress Test program. 5.2.8 get_stresstest() Method: public Stresstest get_stresstest() throws Exception Argument: none Return value: Stress Test object Description: This method returns the main Stress Test object which is used to access further test methods and parameters. 5.2.9 get_connection() Method: public SOSConnection get_connection() throws Exception Argument: none Return value: object belonging to the SOSConnection database connection class Description: The database connection class SOSConnection instance is returned by this method. A data- base connection is automatically returned for every thread instance when the name of a file containing valid settings for a database connection is provided in the -config parameter. Software- und Organisations-Service GmbH 24. November 2005
  • 12. Stress Test: User Guide 12 5.2.10 get_logger() Method: public SOSLogger get_logger() throws Exception Argument: none Return value: object belonging to the SOSLogger logging class object Description: The method returns the instance of the SOSLogger log class. A logger is automatically instanti- ated for each thread. 5.2.11 get_thread_index() Method: public int get_thread_index() throws Exception Argument: none Return value: current thread index Description: The method returns the index of the current thread. This index has a value between 1 and the value of simultaneous threads contained in the -threads parameter. The thread index returned here is used in log files. 5.2.12 get_session_number() Method: public int get_session_number() throws Exception Argument: none Return value: the sequential number of the current session in a thread Description: The sequential number set by the Stress Test for the current thread session is returned by this method. This number is incremented for each thread starting with 1. This session number is used in the log files. 5.2.13 get_current_value() Method: public static long get_Current_Value() throws Exception Argument: none Return value: current value of the counter starting with the value specified in the -start parameter Description: This method returns the current value of the -start parameter. This value can be handed over by the Stress Test program on starting. 5.2.14 get_next_value() Method: public static long get_next_value() throws Exception Argument: none Return value: incremented value of the counter starting with the value specified in the -start parameter Description: The incremented value of the -start parameter is returned by this method. The Stress Test program can hand over this value on starting. The value counter is incremented each time this method is called in a thread and returns a unique value for all active threads. Software- und Organisations-Service GmbH 24. November 2005
  • 13. Stress Test: User Guide 13 5.3 Methods of the StresstestResponse Object 5.3.1 get_response_code() Method: public int get_response_code() throws Exception Argument: none Return value: numerical return value Description: The execute() test method returns an object belonging to the StresstestResponse class. The get_response_code() method returns the HTTP status code after a URL has been loaded with the exe- cute() method. 5.3.2 get_response_message() Method: public String get_response_message() throws Exception Argument: none Return value: error message from the test method called Description: An object belonging to the StresstestResponse class is returned by the execute() test method. The get_response_message() method returns the HTTP status message after a URL has been loaded with the execute() method. Software- und Organisations-Service GmbH 24. November 2005
  • 14. Stress Test: User Guide 14 6 Log Information 6.1 Standard Log The standard log file that is generated during a test is to be found in the Stress Test working directory. As well as the exact running time of each thread, this file contains information about any errors that may have occurred during the test. Example of a Standard Log 2004-08-16 10:31:56 2004-08-16 10:31:57 0 1 union.sql 140 Entries have the following meanings: 2004-08-16 10:31:56 = date and time of the test start 2004-08-16 10:31:57 = date and time at which the log file entry is made 0 = consecutive thread number 1 = number of times the input file or function is processed union.sql = name of the input file or function 140 = database response time in milliseconds The Stress Test program continuously updates this log file – it is not automatically deleted at the start of a se- ries of tests. This allows results from more than one test series to be written to a single log file chich can then transferred to a database using the Stress Test Import tool. The standard log file can either be manually de- leted or overwritten when the –append-output parameter is set to false at the start of a new test series. 6.2 Thread Log This log file is either to be found in the ./logs sub-directory or in the directory specified on starting the Stress Test in the –log-dir parameter. Data from every thread is saved in – or, if –append-output=true, added to - the thread log file in the course of a test. Should a test be successful (error free) then only the thread start time is saved. In the event of an error, an extensive stack trace for the error is saved. Example of a Thread-Log 10:31:56.979 ---------- Monday August 16 10:31:56 2004 Meaning: 10:31:56.979 = time stamp of the thread start ---------- = no errors – otherwise [error] would be written here Monday August 16 10:31:56 2004 = date and time when thread was started In order to help keep the content of this file within manageable proportions, it is recommended that this file is deleted either before or after each series of tests. 6.3 Difference between the Thread Log and the Standard Log The difference is that the standard log is a summary of all the thread logs, sorted according to the thread num- ber. Logging of each thread is necessary as otherwise it would be necessary to use thread synchronization logic, which, in turn, would slow the Stress Test. The standard log can be used to import all the data collected into a database. Software- und Organisations-Service GmbH 24. November 2005
  • 15. Stress Test: User Guide 15 7 Additional Tools 7.1 Stress Test Import The Stress Test Import Tool reads log files created by Stress Test and save the results in a database. 7.1.1 Starting StressTest Import Stress Test Import can be started, for example, with the following arguments: java -classpath=./lib/mysql-connector-java-3.0.15-ga-bin.jar; ./lib/sos.connection.jar;./lib/sos.util.jar;./lib/sos.stresstest.jar sos.stresstest.StresstestImport -config=config/sos_settings.ini -log=stresstest.log Note in the example above that the archives specified in -classpath are separated using ";" on Windows sys- tems and with ":" on Unix. The arguments have the following values at the start of the program: -classpath Java class path containing the Stress Test Java archives -config file containing the database access data -log Log file for the Stress Test output, usually the value of the -output parameter set on starting the Stress Test -clean deletes all existing records in the database before importing the log, valid is true or false, default setting is false. Example of a Unix Import Script #!/bin/bash java -cp $CLASSPATH:./lib/msbase.jar:./lib/mssqlserver.jar:./lib/msutil.jar:./lib/ mysql- connector-java-3.0.15-ga-bin.jar:./lib/ojdbc14.jar:./lib/sos.connection.jar: ./lib/sos.util.jar:./lib/sos.stresstest.jar:./lib/sos.stresstest.jar sos.stresstest.StresstestImport $* Example of a Windows Import Script java -cp %CLASSPATH%;./lib/msbase.jar;./lib/mssqlserver.jar;./lib/msutil.jar;./lib/ mysql- connector-java-3.0.15-ga- bin.jar;./lib/ojdbc14.jar;./lib/sos.connection.jar;./lib/sos.util.jar;./lib/sos.stresstest .jar sos.stresstest.StresstestImport %* The jar files specified in –classpath vary depend on the database into which the results are to be imported (see Stress Test Configuration). The –config and –log parameters have as default values ./config/sos_settings.ini and stresstest.log respectively. The database table is automatically created after Stress Test Imports is started under the name specified in STRESSTEST. Software- und Organisations-Service GmbH 24. November 2005
  • 16. Stress Test: User Guide 16 7.2 Stress Test Report The Stress Test Report tool is used to evaluate test results that have been saved by the Stress Test Import tool in a database. The Stress Test Report tool enables results obtained using a newer version of a test function to be compared with results obtained with a previous version. This is possible when both sets of results are saved in the database using the same identifier. This is possible for a number of functions in parallel. In addition, it is possible to compare the results from several test series. 7.2.1 Starting the Stress Test Report The Stress Test Report can be started, for example, using the following arguments: java -classpath=./lib/mysql-connector-java-3.0.15-ga-bin.jar; ./lib/sos.connection.jar;./lib/sos.util.jar;./lib/sos.stresstest.jar sos.stresstest.StresstestReport -config=config/sos_settings.ini -compare=1 -functions=stress1.sql+stress2.sql Note in the example above that the archives specified in -classpath are separated using ";" on Windows sys- tems and with ":" on Unix. The arguments have the following values ??? at the start of the program: -classpath Java class path containing the Stress Test Java archives -config file containing the database access data -compare number of previous test series to be compared (standard value: 1) -functions functions which are to be compared. Multiple entries are to be separated by “+”; all functions will be compared when no entry is made here The files specified in –classpath depend on the database into which the results are to be imported (see Stress Test Configuration). The standard parameter values are: -config ./config/sos_settings.ini -functions no entry – this means that all functions will be compared -compare 1 – this means that only the last test series will be evaluated Example of a Report Script for Unix Systems #!/bin/bash java -cp $CLASSPATH:./lib/msbase.jar:./lib/mssqlserver.jar:./lib/msutil.jar:./lib/ mysql- connector-java-3.0.15-ga-bin.jar:./lib/ojdbc14.jar:./lib/sos.connection.jar: ./lib/sos.util.jar:./lib/sos.stresstest.jar:./lib/sos.stresstest.jar sos.stresstest.StresstestReport $* Example of a Report Script for Windows Systems java -cp %CLASSPATH%;./lib/msbase.jar;./lib/mssqlserver.jar;./lib/msutil.jar;./lib/ mysql- connector-java-3.0.15-ga- bin.jar;./lib/ojdbc14.jar;./lib/sos.connection.jar;./lib/sos.util.jar;./lib/sos.stresstest .jar sos.stresstest.StresstestReport %* Report Example ----------------------------------------------------------------------------------------------------------------------------------- | time | function | min ms | max ms | ave ms | threads | +- min | +- max | +- ave | % min | % max | % ave | Software- und Organisations-Service GmbH 24. November 2005
  • 17. Stress Test: User Guide 17 ----------------------------------------------------------------------------------------------------------------------------------- | 2004-08-25 19:06:01 | artikelstam | 630 | 995 | 673.3 | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | m.sql | | | artikelsuch | 7 | 24 | 9.5 | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | e.sql | | | auftragsbes | 7 | 10 | 8.0 | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | tand.sql | | 2004-08-25 18:29:28 | artikelstam | 625 | 1003 | 672.3 | 1 | -5.0 | 8.0 | -1.0 | -0.7 | 0.8 | -0.1 | | m.sql | | | artikelsuch | 7 | 27 | 10.6 | 1 | 0.0 | 3.0 | 1.0 | 0.0 | 12.5 | 11.1 | | e.sql | | | auftragsbes | 7 | 21 | 8.8 | 1 | 0.0 | 11.0 | 0.8 | 0.0 | 109.9 | 10.8 | | tand.sql | Software- und Organisations-Service GmbH 24. November 2005