Index: jmeter/src/main/resources/byteman/CommitStatistics.txt =================================================================== --- jmeter/src/main/resources/byteman/CommitStatistics.txt (revision 109446) +++ jmeter/src/main/resources/byteman/CommitStatistics.txt (working copy) @@ -29,10 +29,9 @@ # Commit stats rule. RULE CommitStatistics -CLASS org.h2.engine.Session -METHOD commit(boolean) +INTERFACE org.hsqldb.TransactionManager +METHOD commitTransaction AT EXIT IF TRUE DO incrementCounter("transaction commits") ENDRULE - Index: jmeter/src/main/resources/byteman/ModifyHelperRMIConfiguration.txt =================================================================== --- jmeter/src/main/resources/byteman/ModifyHelperRMIConfiguration.txt (revision 109446) +++ jmeter/src/main/resources/byteman/ModifyHelperRMIConfiguration.txt (working copy) @@ -31,3 +31,11 @@ IF TRUE DO RETURN TRUE ENDRULE + +RULE enable-rmi-server-port +CLASS JMXHelper +METHOD rmiPort() +AT EXIT +IF TRUE +DO RETURN 1099 +ENDRULE Index: jmeter/src/main/resources/jca-local-h2-ds.xml =================================================================== --- jmeter/src/main/resources/jca-local-h2-ds.xml (revision 109446) +++ jmeter/src/main/resources/jca-local-h2-ds.xml (working copy) @@ -23,9 +23,9 @@ - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 + jdbc:hsqldb:mem:test - org.h2.Driver + org.hsqldb.jdbcDriver 5 Index: jmeter/src/main/resources/jmeter/Direct-JDBC.jmx =================================================================== --- jmeter/src/main/resources/jmeter/Direct-JDBC.jmx (revision 109446) +++ jmeter/src/main/resources/jmeter/Direct-JDBC.jmx (working copy) @@ -11,11 +11,194 @@ + + H2DB-Pool1 + 5000 + 5000 + 6000 + false + true + 4000 + SELECT 1 FROM Customer WHERE ID=1; + jdbc:hsqldb:hsql://localhost;ifexists=true + org.hsqldb.jdbcDriver + sa + + + + + stopthread + + false + 1 + + 1 + 1 + 1290526715000 + 1290526715000 + false + + + + + + + + H2DB-Pool1 + Update Statement + DROP TABLE Item IF EXISTS; + + + + + + + H2DB-Pool1 + Update Statement + DROP TABLE Invoice IF EXISTS; + + + + + + + H2DB-Pool1 + Update Statement + DROP TABLE Product IF EXISTS; + + + + + + + H2DB-Pool1 + Update Statement + DROP TABLE Customer IF EXISTS; + + + + + + + H2DB-Pool1 + Update Statement + CREATE TABLE Customer(ID INTEGER PRIMARY KEY,FirstName VARCHAR(20),LastName VARCHAR(20),Street VARCHAR(20),City VARCHAR(20)); + + + + + + + H2DB-Pool1 + Update Statement + CREATE TABLE Invoice(ID INTEGER PRIMARY KEY,CustomerID INTEGER,Total DECIMAL(10,2), FOREIGN KEY (CustomerId) REFERENCES Customer(ID) ON DELETE CASCADE); + + + + + + + H2DB-Pool1 + Update Statement + CREATE TABLE Product(ID INTEGER PRIMARY KEY,Name VARCHAR(20),Price DECIMAL(10,2)); + + + + + + + H2DB-Pool1 + Update Statement + CREATE TABLE Item(InvoiceID INTEGER,Item INTEGER,ProductID INTEGER,Quantity INTEGER,Cost DECIMAL(10,2),PRIMARY KEY(InvoiceID,Item), FOREIGN KEY (InvoiceId) REFERENCES Invoice (ID) ON DELETE CASCADE, FOREIGN KEY (ProductId) REFERENCES Product(ID) ON DELETE CASCADE); + + + + + + + H2DB-Pool1 + Update Statement + INSERT INTO Customer VALUES(0,'Laura','Steel','429 Seventh Av.','Dallas'); + + + + + + + H2DB-Pool1 + Update Statement + INSERT INTO Product VALUES(0,'Iron Iron',54); + + + + + + + H2DB-Pool1 + Update Statement + INSERT INTO Invoice VALUES(0,0,0.0); + + + + + + + H2DB-Pool1 + Update Statement + INSERT INTO Item VALUES(0,10,0,22,1.5); + + + + + + + H2DB-Pool1 + Commit + commit; + + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + true + false + false + false + false + false + 0 + true + + + + + + stopthread false - 10000 + 1000000 20 10 @@ -26,27 +209,20 @@ - - HSQLDB-Pool1 - 5000 - 5000 - 6000 - false - true - 4000 - SELECT 1 FROM Customer WHERE ID=1; - jdbc:hsqldb:hsql://localhost - org.hsqldb.jdbcDriver - sa - - - + + + + 1000 + This timer allows the database to be prepared with test data. + + + true - HSQLDB-Pool1 + H2DB-Pool1 Prepared Select Statement SELECT FirstName FROM Customer WHERE ID=?; 1 @@ -55,7 +231,7 @@ - HSQLDB-Pool1 + H2DB-Pool1 Prepared Update Statement UPDATE Customer SET firstname=? WHERE id=?; Jeremy,1 @@ -64,7 +240,7 @@ - HSQLDB-Pool1 + H2DB-Pool1 Commit @@ -72,102 +248,6 @@ - - - - - Sleep_Time - 100 - = - - - Sleep_Mask - 0xFF - = - - - Label - - = - - - ResponseCode - - = - - - ResponseMessage - - = - - - Status - OK - = - - - SamplerData - - = - - - ResultData - - = - - - - org.apache.jmeter.protocol.java.test.JavaTest - - - - - - - Sleep_Time - 100 - = - - - Sleep_Mask - 0xFF - = - - - Label - - = - - - ResponseCode - - = - - - ResponseMessage - - = - - - Status - OK - = - - - SamplerData - - = - - - ResultData - - = - - - - org.apache.jmeter.protocol.java.test.JavaTest - - false Index: jmeter/src/main/resources/jmeter/Http-Test.jmx =================================================================== --- jmeter/src/main/resources/jmeter/Http-Test.jmx (revision 109446) +++ jmeter/src/main/resources/jmeter/Http-Test.jmx (working copy) @@ -17,8 +17,8 @@ false 80000 - 30 - 10 + 20 + 15 1286896125000 1286896125000 false @@ -107,7 +107,6 @@ - true Index: jmeter/build.xml =================================================================== --- jmeter/build.xml (revision 109386) +++ jmeter/build.xml (working copy) @@ -41,16 +41,30 @@ - + + + + + + + + + + + + + + + - + @@ -62,16 +76,16 @@ + + + + - - - - - - - + + + @@ -79,7 +93,7 @@ - + @@ -131,7 +145,7 @@ - + @@ -140,9 +154,10 @@ + index="true"> - + + @@ -154,8 +169,8 @@ + webxml="src/main/resources/WEB-INF/web.xml" + index="true"> @@ -177,79 +192,150 @@ - - + + + + + + + + + + - - - - - - - - - - - - - - - - + + classpathref="jmeter.classpath" classname="org.apache.jmeter.NewDriver" + dir="${jmeter.tools.dir}/lib"> + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + - - + + - - + + - - + + - + - - + + - + + - + + @@ -261,18 +347,54 @@ - + + + + + + + + + + SHUTDOWN; + + + + + + + + + + + + - + - + Index: doc/perfguide/en/modules/benchmark.xml =================================================================== --- doc/perfguide/en/modules/benchmark.xml (revision 109386) +++ doc/perfguide/en/modules/benchmark.xml (working copy) @@ -20,26 +20,47 @@
IronJacamar and JMeter - - JMeter has been setup to benchmark the IronJacama server for HTTP and JDBC loads. Using JMeter has the benefit of using it's flexible test configuration, results sampling and graphing capabilities. - Before using JMeter to benchmark you will need to run the following Ant targets only once. Execute these in the root directory of the performance branch. This will retrieve the sever distribution(s) needed and configures the file permissions necessary to start the server. + Initial setup + JMeter has been setup to benchmark the IronJacama server for HTTP and JDBC loads. + Before using JMeter to benchmark run the following Ant targets only once. Execute these in the root directory of the checked out performance branch. ant download-servers ant benchmark - - To start JMeter call the following Ant target. Calling this target starts a the IronJacmar server with an embedded H2 database required for benchmarking. The database is populated with sample data. - ant jmeter - + Test Plans With the JMeter integration comes several Test Plans. Test Plans are JMeter test configurations containing the sequence of requests to create the desired load. The default test plan is the first listed below and will be loaded when JMeter is started. To load one of the other test plans select "File - Open" from the JMeter menu. src/main/resources/jmeter/Http-Test.jmx -src/main/resources/jmeter/Direct-JDBC.jmx -src/main/resources/jmeter/Monitor-Test-Plan.jmx +src/main/resources/jmeter/Direct-JDBC.jmx
The number of concurrent threads executing the requests can be configured in JMeter. See the JMeter User Manual for step-by-step instructions. - To view the performance graph during a test run select the "Graph Results" node in the Http/Direct-JBDC Test Plan. - The Monitor Test Plan provides runtime statistics for the rate of transactions completed per second. The test plan uses JMX to gather the metrics. To open the monitoring test plan execute the following command. + + Monitoring + This test plan monitors the transaction rate. + src/main/resources/jmeter/Monitor-Test-Plan.jmx + + The Monitor Test Plan provides runtime statistics for the rate of transactions completed per second. It uses JMX to gather the metrics. To open the monitoring test plan execute the following command. ant jmeter.monitoring - Run the Monitor test plan at the same time as one of the other plans. To operate using JMX you will need to configure the JAVA_HOME environment property. It needs setting with the home directory of a Java Development Kit. The included rmiregistry service is started to expose the MBean to JMX clients. - Note, overhead when running JMeter and the Graph Results can be reduced. Try un-selecting the check boxes labeled 'Average', 'Median', 'Deviation' and 'Threshold' leaving the 'Data' checkbox selected. + + Use the Monitor test plan alongside one of the other plans. You will need to configure the JAVA_HOME environment property. This needs setting to the home directory of a Java Development Kit. The rmiregistry service is started to expose the MBean to JMX clients (JMeter). + + Startup order + To use monitoring the sequence of starting each component is important. + To monitor Direct-JDBC.jmx test plan + ant database +ant jmeter.monitoring +ant jmeter + +To monitor the Http-Test.jmx test plan + ant server +ant jmeter.monitoring +ant jmeter + + + Monitoring of either test plan is exclusive. You will need to shutdown the server or database before starting the other test plan. The following Ant targets will shutdown the respective jvm process. + ant shutdown-database +ant shutdown-server + + JMeter overhead + Note, the overhead of running JMeter and the Graph Results can be reduced. Try un-selecting the check boxes labeled 'Average', 'Median', 'Deviation' and 'Threshold' leaving the 'Data' checkbox selected. +