Configuring the LCDS Load Test Tool for Flash Builder 4 David Collie Draft Version TODO Clean up Appendices and also Where to Go From Here section Page 1
Contents Configuring the LCDS Load Test Tool for Flash Builder 4 Introduction... 3 Requirements... 3 Finding out more about Flex and LCDS... 3 Obtaining the required software... 3 Load Test Tool Overview... 4 Load Test Tool Files... 4 Notes On The Supplied Web Applications... 4 Configuring the Load Test Tool Projects... 5 The Server Side Project... 5 Associating with a Server Runtime... 7 Configuring the Flex Properties of the Project... 8 Porting the Perf Web Application... 10 Running the Load Test Tool Server... 14 What to do if it doesn t work first time... 16 Configuring the Client Side Java Project... 17 Creating a Eclipse Java Project... 17 Porting the JavaClientExamples code... 19 Testing the Load Test Tool Client... 20 Changing the Load Test Tool Client Properties... 21 Configuration Parameters for Server and Client... 24 Server: Flex Client... 24 Client: Properties File... 25 Where to go from here... 27 Running a full test... 27 Extending the Default Load Test Tool... 27 Points of Note... 27 Appendix A: Configuring a New Target Runtime... 28 Appendix B: Changing Project Configuration for Portability... 31 Page 2
Introduction The purpose of this document is to show how to set up a local version of the LiveCycle Data Services 3 Load Testing Tool within a Flash Builder environment. This allows the developer to both easily step through and understand the code using the Debugger environment of Eclipse for Java and Flash Builder for Flex. From this starting point, you can gather the necessary knowledge to start extending the Load Test Tool to fit the needs of your specific scenario and also extend it to fit in with the RIA/JEE application s needs with regards to load testing. NOTE: The Load Test Tool comes ready to deploy, to demonstrate the capabilities of LCDS 3, this exercise is only necessary if you wish to explore the code further in the Flash Builder 4 IDE. Requirements Finding out more about Flex and LCDS To get the most from this excercise, a cursory knowledge of Flex and LiveCycle Data Services (LCDS). You can find out more about these Adobe products from their respective DevNet centres, linked to below: Flex http://www.adobe.com/devnet/flex/ LCDS http://www.adobe.com/devnet/livecycle/ Obtaining the required software You must first obtain the necessary software and install it. For Flash Builder, there are many ways that this can be installed and configured within Eclipse, this is not covered within this document and instructions on this can be found on the Adobe site. The Servlet container used in this document is Tomcat 6.0.24, although it will work with almost all JEE servers without much change in configuration. The table below details the necessary software that should be installed on your system: Name Download Notes Flash Builder 4 Download FB4 Flex SDK 3.5 and 4 included with download 60 day trial version available Install as per instructions Live Cycle Data Download LCDS 3 Current version is LCDS 3.1 Services 3 Includes Load Test Tool Code Install as JEE Application when asked during the installation routine Tomcat 6 Download Tomcat Freely available Most other industry standard JEE servers would also be acceptable Check LCDS System Requirements for supported JEE servers Eclipse Web Tools How to get WTP Necessary to install into FB4 to allow Page 3
Platform integration of Tomcat/Java code If using FB4 as a plugin, may already be installed in your Eclipse. Charles HTTP Proxy Download Charles Optional component Helps with troubleshooting Trial version available Load Test Tool Overview Load Test Tool Files The Load Test Tool that comes with the LiveCycle Data Services 3 product after installation can be found at the following location: <lcdsinstall>/resources/loadtesttool/ When you uncompress the file in the location above, you should have the following folders: Folder JavaClientExamples javadoc lib webapps Description Contains example Java source code that allows for the creation of Virtual Consumers that will mimic connections from Flash Player clients Contains the Javadocs for the following JAR files: nioload.jar; and javaclient.jar. The required JAR files for dependencies that are needed to be satisfied to create the Virtual Consumers. This folder contains two further folders: perf; and pef edge. These are two ready to run web applications that are configured to allow for quick load testing of the LCDS product. The Load Test Tool is split into two parts, with the following functional behaviour: Client Side o Virtual Consumers to mimic Flash Player clients Server Side o Server Side Java Message Generator o Flex Based Controller for Message Generator NOTE: The compressed file contains various readme.txt files for each section of the tool and these should be read, as they will allow you to perform a quick deployment of the Load Test Tool without the need for any Flash Builder configuration. Notes On The Supplied Web Applications The Load Test Tool comes with two web application, namely perf and perf-edge. These web apps are configured to test the LCDS Edge/Server configuration. This document will not demonstrate the powerful feature that is now available with LCDS, but you can read up more about it on the documentation for Edge Server configuration. For the purposes of this demonstration, only the perf web application is used. Page 4
Configuring the Load Test Tool Projects The first step in creating the integrated environment within the Flash Builder IDE is to create a hybrid Flex and J2EE project that will allow for the server side Java and Flex to be ran within the context of Flash Builder 4. The Server Side Project Select New > Flex Project... from the File menu of Flash Builder 4. If you do not have that option, choose New > Other... and you will be presented with the screen below. Upon clicking next create Flex Project Properties the following screen will be presented. The Project Name used is arbitrary, but is used by default as the context root that your Web Application will be deployed to Tomcat as. Page 5
NOTE: If you do not see the screen as it is above, then it is most likely that Web Tools Platform for Eclipse is not installed. Please see the introduction section for a link on how to get WTP installed. The settings above are required, the MXML that ships with the Load Test Tool was ran with the 3.5 SDK when creating this demonstration. There is no restrictions on the Flex Message Controller being written using Flex 4. Click Next when the settings have been completed. Page 6
Associating with a Server Runtime The next step is to associate the Flex/LCDS project with a Target Runtime. This is the server that the project should deploy the Web Application to for running/debugging. Select the Target Runtime of your Server from the dropdown that you wish to target the Web Application produced by the project LCDS WAR file. Page 7
If you find this dropdown is blank, follow the steps in Appendix A: Configuring a New Target Runtime to associate the Tomcat that was installed in the Requirements section. The Context Root setting by default is the name of the project, and it may be changed here if required. The recommendation is to keep it as the same name as the The Content Folder is normally called WebContent in a WTP associated project, this is changeable at this step if required. The LCDS WAR File should link to the lcds.war file that was created when installing LCDS as a JEE application. Please see the introduction for details on where to download the LiveCycle Data Services product if needed. For the Output folder, leave as the default bin debug. Due to this being a combined Flex/LCDS project, the compiled SWF from the MXML is automatically copied to the Web Application on the Tomcat Server so you can browse it from the server. Click on Next when you have finished. Configuring the Flex Properties of the Project This step allows us to configure the Flex Project Properties. See the screenshot below. Page 8
Press Finish to create the project. NOTE: Whilst the project as is will function, it has a lot of hard coded paths which can makes it difficult to move from machine to machine or redistribute the full project set. At this point, you can follow the steps in Appendix B: Changing Project Configuration for Portability to free the project from any system specific information. Page 9
Porting the Perf Web Application With the previous steps, we have created a shell project that allows you to run your Flex and LCDS Application from within the Eclipse Environment. The next steps are to take the existing perf Web Application and place it into this newly created project. INFO: In this section, we will refer to shorthand paths to keep the locations brief. These are detailed below. It assumes that you have named your LCDSLoadTestServer, simply substitute your name where needed if you changed it. LCDS_LOAD_TEST_PROJECT = <workspace>/lcdsloadtestserver LCDS_LOAD_TEST_TOOL = <install>/resources/load testing tool/webapps The first step is to locate the uncompressed Load Test Tool and find the webapps folder. NOTE : Please see Notes On The Supplied Web Applications for more information on the differences of these folders. Navigate into the perf folder and carry out the following steps to drop into your new Flex/LCDS project: Copy LCDS_LOAD_TEST_TOOL/webapps/perf/messaging folder to LCDS_LOAD_TEST_PROJECT/flex_src Page 10
Copy LCDS_LOAD_TEST_TOOL/webapps/perf/WEB-INF/src folder to LCDS_LOAD_TEST_PROJECT/java_src Page 11
Move LCDS_LOAD_TEST_PROJECT/WebContent/WEB-INF/flex/*.xml to a backed up location Copy LCDS_LOAD_TEST_TOOL/webapps/perf/WEB-INF/flex/servicesconfig.xml file to LCDS_LOAD_TEST_PROJECT/WebContent/WEB INF/flex Page 12
NOTE: The lcds load test tool.zip services config.xml does not have Context Root token defined and is hardcoded to be /perf, for the HTTP channels, Open the services config.xml in your favourite text editor, and change them to use the {context.root} token. For example: <channel-definition class="mx.messaging.channels.amfchannel" id="perf-amf"> <endpoint class="flex.messaging.endpoints.amfendpoint" url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"/> <channel-definition class="mx.messaging.channels.streamingamfchannel" id="perfstreaming-amf"> <endpoint class="flex.messaging.endpoints.streamingamfendpoint" url="http://{server.name}:{server.port}/{context.root}/messagebroker/streaming-amf"/> <channel-definition id="perf-rtmp" class="mx.messaging.channels.rtmpchannel" > <endpoint class="flex.messaging.endpoints.rtmpendpoint" url="rtmp://{server.name}:2155/{context.root}/rtmp"/> NOTE: Since we are not using the Edge server here, you can comment out the following line in the services config.xml <channel-definition id="gateway-endpoint" server-only="true" > <endpoint class="flex.messaging.endpoints.gatewayendpoint" url="amfsocket://localhost:9807"/> </channel-definition> Page 13
NOTE: For the first run of the tool, we d like to see things working, so change the logging to DEBUG level in the services config.xml for the purposes of testing. <logging> <target class="flex.messaging.log.consoletarget" level="debug"> <properties> <prefix>[lcds-perf]</prefix> <includedate>true</includedate> <includetime>true</includetime> <includelevel>true</includelevel> <includecategory>true</includecategory> </properties> <filters> Running the Load Test Tool Server With the previous configuration steps, you should run a Project > Clean... to ensure all code compiles correctly. You should have no errors in your Problems View of eclipse, as shown below: With no errors being reported, to run the Server part of the project do the following: 1. Ensure you have the Console View showing in Eclipse 2. Launch from Eclipse (Run As... > Run on Server) 3. Choose the Server Runtime you created before 4. Server Console should show no errors when starting up A screenshot is shown below of where to start the server from, by right clicking on the project: The server should then start up, and the Web Application be deployed to the Server. In the Servers View you can confirm this by showing the Server and the LCDSLoadTestServer Web Application deployed: Page 14
The next step to carry out is to run the Flex Message Controller, this can be done by right clicking on the MessageGeneratorROByteArray.mxml and choosing to Run As... > Web Application (shown below) This will then launch the browser configured within your Flash Builder installation and you should see a screen such as the following one. Page 15
Change the values in form to the following (): Target Rate to Send Messages: 1000 No of Generator Threads: 2 Base Name for Subtopics: PerfSubtopic No of Subtopics: 10 No of Subtopic Subtopics: 10 The meanings of these settings are discussed later, but for now we just wish to test that the server is working as intended. Press Start, no channel faults should occur and in the Console view you should see logging being produced. NOTE There are no clients connected at this point, so there is no throughput of messages. What to do if it doesn t work first time Check with Charles, see what requests are being made Often have to hand edit the.flexproperties to set the correct context root, restart Eclipse and clean project Ensure that you have delete the precompiled MessageGeneratorByteArray.swf that comes with the LCDS load test tool Page 16
Configuring the Client Side Java Project As discussed in the Introduction, the Load Test Tool comes in two functional parts: The Server Side (configured in previous section) The Client Side, containing Virtual Consumers that connect to the LCDS destinations to mimic Flash Player clients. NOTE: This section details how to configure a simple Java project within Flash Builder so that you can explore the client side code. This is by no means the only way to set the project up and if you are comfortable in Eclipse/Java then you can use your own favourite method. If you do this, you can skip directly to the section on how to configure the Load Test Tool Clients. Creating a Eclipse Java Project Select New > Java Project... from the File menu of Flash Builder 4. If you do not have that option, choose New > Other... and you will be presented with the screen below. Press Next. Page 17
You can then accept all the defaults on the next screen, with the Project Name value being an arbitrary value of your own choosing. Press Next. On the next screen pertaining to Java Settings, change output folder to LCDSLoadTestClient/classes, this makes the Java project fit in with the scripts that come with the Load Test Tool but this could be changed if you so wish. Page 18
Press Finish and change to Java Perspective Porting the JavaClientExamples code The Load Test Tool comes with a sample Java Client for creating Virtual Consumers for the LCDS Application. In this step, we will import the same code into the Eclipse project, this is done by the following steps: 1. Copy files from LCDS_LOAD_TEST_TOOL/JavaClientExamples/ to LCDS_LOAD_TEST_CLIENT/src 2. Create a folder called lib in the root of your java project (LCDS_LOAD_TEST_CLIENT) Page 19
3. Copy files from LCDS_LOAD_TEST_TOOL/lib to LCDS_LOAD_TEST_CLIENT/lib 4. Select the LCDSLoadTestClient Project properties > Java Buid Path and add the lib JARS to your Libraries tab, as shown below: 5. Copy LCDS_LOAD_TEST_TOOL/rundriverexample.* to root of your Java project. 6. Edit the rundriverexample.* file and add the LCDS_LOAD_TEST_CLIENT/classes to the classpath, an example is shown below for the Windows batch file: java -cp lib\flex-messaging-common.jar;lib\flex-messagingcore.jar;lib\flex-messagingdata.jar;lib\nioload.jar;lib\javaclient.jar;lib\javaclientexamples.j ar;classes javaclientexamples.lcdsdriver %1 The Client project is now configured. Testing the Load Test Tool Client NOTE: You can now edit and run from Eclipse, but showing on Command Prompt the first few times is a bit more informative/intuitive for the purpose of the document. Page 20
Open up a command prompt and CD to the LCDS_LOAD_TEST_CLIENT directory. Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\dcollie>cd C:\Users\dcollie\Documents\Code\Eclipse\lcdsloadtesttool\LCDSLoadTestClient C:\Users\dcollie\Documents\Code\Eclipse\lcdsloadtesttool\LCDSLoadTestClient>rundriverexample.b at "Example usage: rundriverexample.bat JavaClientExamples\src\javaclientexamples\rtmp.properties" C:\Users\dcollie\Documents\Code\Eclipse\lcdsloadtesttool\LCDSLoadTestClient>rundriverexample.b at src\javaclientexamples\rtmp.properties The sample should run, but should fail immediately, as we haven t edited the rtmp.properties to match our server set up, something like the following: Exception in thread "main" java.lang.runtimeexception: Consumer '0' failed to subscribe: Flex Message (flex.messaging.messages.errormessage) clientid = null correlationid = AE0A7782-C60C-360A-5495-493E522BF0A0 destination = null messageid = AE0A8188-B109-24BA-3DCA-39172CB4D480 timestamp = 1274870270529 timetolive = 0 body = null code = Client.Error.MessageSend message = Send failed because a connection could not be established. details = null rootcause = javaclient.events.channelfaultevent[source=javaclient.channelset@92e78c] body = null extendeddata = null at javaclientexamples.lcdsdriver.setupconsumers(lcdsdriver.java:820) at javaclientexamples.lcdsdriver.domain(lcdsdriver.java:349) at javaclientexamples.lcdsdriver.main(lcdsdriver. Changing the Load Test Tool Client Properties To edit the rtmp.properties to have the correct settings to match with the server, follow thse steps: Copy the file : 1. Copy LCDS_LOAD_TEST_CLIENT/src/javaclientexamples/rtmp.properties to the root of LCDS_LOAD_TEST_CLIENT 2. Open the rtmp.properties file in your favourite Text Editor 3. Change to the following values, these ensure it is matched up with the channel and destination as set in the services config.xml of the Server: CHANNEL_ID=perf-rtmp Page 21
CHANNEL_TYPE=rtmp HOST=localhost PORT=2155 DESTINATION_ID=MyTopic_Subtopic DESTINATION_SUBTOPIC= PerfSubtopic.[0-20] CONSUMERS=10 MESSAGE_RECEIVE_COUNT=0 MESSAGE_RECEIVE_TIME=1m MESSAGE_SEND_COUNT=0 MESSAGE_SEND_SIZE_BYTES=0 REPORT_LATENCY=true LOG_CATEGORY=RtmpTest LOG_LEVEL=debug NOTE: Launch the Flex Client from the Server and client on the start button at this point. Change the values in form to match the properties file for the Virtual consumers (more later on the meanings) Target Rate to Send Messages: 1000 No of Generator Threads: 2 Base Name for Subtopics: PerfSubtopic No of Subtopics: 10 No of Subtopic Subtopics: 10 We are no in a position to run the sample again, but as follows to pick up the new properties file, you should see output on the rundriverexample.bat similar to show the virtual java consumers subscribing to the message destination: C:\Users\dcollie\Documents\Code\Eclipse\lcdsloadtesttool\LCDSLoadTestClient>rundriverexample.b at rtmp.properties... [INFO] [RtmpTest] Virtual Consumers are sending subscribe requests. [DEBUG] [RtmpTest] Virtual Consumer 0 sending subscribe request to destination MyTopic_Subtopic' and subtopic 'null' [DEBUG] [RtmpTest] Virtual Consumer 0 is subscribed. [DEBUG] [RtmpTest] Virtual Consumer 1 sending subscribe request to destination MyTopic_Subtopic' and subtopic 'null' [DEBUG] [RtmpTest] Virtual Consumer 1 is subscribed. [DEBUG] [RtmpTest] Virtual Consumer 2 sending subscribe request to destination MyTopic_Subtopic' and subtopic 'null' [DEBUG] [RtmpTest] Virtual Consumer 2 is subscribed. [DEBUG] [RtmpTest] Virtual Consumer 3 sending subscribe request to destination... The test should then run for 1 minute, and looking at the console log of the Server, you should see the messages being generated. The following shows a sample output with the server and clients connected up (with LOG_LEVEL changed to info debug for brevity): Page 22
------------------------------- [INFO] [RtmpTest] Host and port: localhost:2155 [INFO] [RtmpTest] Channel type: rtmp [INFO] [RtmpTest] Channel id: perf-rtmp [INFO] [RtmpTest] Destination id: MyTopic_Subtopic [INFO] [RtmpTest] Destination subtopic: PerfSubtopic.[0-20] [INFO] [RtmpTest] Number of consumers: 10 [INFO] [RtmpTest] Test duration: '1' minute(s) [INFO] [RtmpTest] Report latency: true (Important: For latency reporting to work correctly, make sure times on client machines sending and receiving messages are in sync) [INFO] [RtmpTest] Virtual Consumers are sending subscribe requests. [INFO] [RtmpTest] Virtual Consumers are all subscribed and waiting for '1' minute(s). [INFO] [RtmpTest] Total receive time for all virtual Consumers for test duration of '1' minute(s) is 60.0 seconds. [INFO] [RtmpTest] Virtual Consumers are all disconnected. [INFO] [RtmpTest] Virtual Consumer 0 receive rate: 19.06 msg/s (1239 msgs in 65.02s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 0 latency avg: 9356.83 ms, min: 3 ms, max: 19035 ms. [INFO] [RtmpTest] Virtual Consumer 1 receive rate: 18.98 msg/s (1227 msgs in 64.64s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 1 latency avg: 9451.56 ms, min: 3 ms, max: 18774 ms. [INFO] [RtmpTest] Virtual Consumer 2 receive rate: 18.81 msg/s (1219 msgs in 64.81s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 2 latency avg: 11620.91 ms, min: 2 ms, max: 20186 ms. [INFO] [RtmpTest] Virtual Consumer 3 receive rate: 18.85 msg/s (1220 msgs in 64.72s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 3 latency avg: 11510.8 ms, min: 3 ms, max: 20036 ms. [INFO] [RtmpTest] Virtual Consumer 4 receive rate: 18.79 msg/s (1213 msgs in 64.56s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 4 latency avg: 9547.65 ms, min: 3 ms, max: 18914 ms. [INFO] [RtmpTest] Virtual Consumer 5 receive rate: 18.62 msg/s (1191 msgs in 63.96s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 5 latency avg: 9768.96 ms, min: 2 ms, max: 18998 ms. [INFO] [RtmpTest] Virtual Consumer 6 receive rate: 18.65 msg/s (1191 msgs in 63.87s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 6 latency avg: 11870.35 ms, min: 2 ms, max: 20112 ms. [INFO] [RtmpTest] Virtual Consumer 7 receive rate: 18.59 msg/s (1181 msgs in 63.54s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 7 latency avg: 11899.5 ms, min: 4 ms, max: 20109 ms. [INFO] [RtmpTest] Virtual Consumer 8 receive rate: 18.5 msg/s (1161 msgs in 62.77s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 8 latency avg: 10060.89 ms, min: 4 ms, max: 19149 ms. [INFO] [RtmpTest] Virtual Consumer 9 receive rate: 18.6 msg/s (1152 msgs in 61.95s with 0 faults) [INFO] [RtmpTest] Virtual Consumer 9 latency avg: 10130.39 ms, min: 5 ms, max: 18934 ms. [INFO] [RtmpTest] Virtual Consumer avg receive rate: 18.74 msg/s [INFO] [RtmpTest] Virtual Consumer min receive rate: 18.5 msg/s (1161 msgs in 62.77s) [INFO] [RtmpTest] Virtual Consumer max receive rate: 19.06 msg/s (1239 msgs in 65.02s) [INFO] [RtmpTest] Virtual Consumer avg latency: 10521.79 ms [INFO] [RtmpTest] Virtual Consumer min latency: 2 ms [INFO] [RtmpTest] Virtual Consumer max latency: 20186 ms [INFO] [RtmpTest] Virtual consumer std latency: 6861.68 ms [INFO] [RtmpTest] ************************************************* ------------------------------- Note the latency times are quite bad, but this is due to running on a laptop, with all Debug logging enabled. Please see the LCDS Capacity Planning Guide for more accurate figures when running on Enterprise class machines http://www.adobe.com/devnet/livecycle/pdfs/lcdses2_performance_brief.pdf Page 23
Configuration Parameters for Server and Client For the server and clients to function correctly they must have co ordinated parameters, the parameters are described in the following sections, along with their relationship to each other. Server: Flex Client Parameter Meaning Typical Values Relates To on Client Props File Destination to send messages to Specifiy Message Size Send Small Messages Tag Messages Target Send Rate Per Second Suggested Passes Per Second Number of Threads to Use Base Name for Subtopic No of Subtopics No of Subtopic Subtopics Destination id as specified in the services config.xml Specific to the default MessageGeneratorROByteArray and sets the size of the message payload as a byte array. 1k N/a See config files. N/a N/a Adds the generator id that send the message to the Message body This is a calculated property, depending on the number of consumers, the number of subtopics and the number of subtopic subtopics. This is the no of passes a generator should try per second, it effectively enables throttling. No of Generators to use This is the simple name to use for the subtopics that the Consumers will use. The number of subtopics, generally used to target a message per individual consumer. If each consumer should subscribe to another level of subtopic, you can configure the number here. N/a N/a If: Consumers=10 Subtopics=10 Sub Subtopics=10 No Messages/sec: 1 Then: Target Send Rate=1000 (10 * 10 * 10 * 1) Variable, depends on the size of the load testing. Can set via running tests and ensuring each consumer gets the necessary messages per second. 2, but at higher levels of generation, need to use more generators PerfSubtopic N/a dependant on test N/a dependant on test DESTINATION _ID N/a N/a N/a DESTINATION _SUBTOPIC DESTINATION _SUBTOPIC & CONSUMERS DESTINATION _SUBTOPIC Page 24
Client: Properties File Parameter Meaning Typical Values Relates To on Server Client Controller CHANNEL_ID The id of the channel From servicesconfig.xml N/a to be used CHANNEL_TYPE The type of channel See LCDSDriver.java: N/a that is being used. polling_amf rtmp streaming_amf HOST The server that is hosting the LCDS Load Test Web App N/a PORT DESTINATION_ID DESTINATION_SUBTOPIC CONSUMERS MESSAGE_RECEIVE_COUNT MESSAGE_RECEIVE_TIME MESSAGE_SEND_COUNT MESSAGE_SEND_SIZE_BYTES REPORT_LATENCY The port that the Channel is running on. The destination that the messges are being published to. This controls how the consumers subscribe to subtopics. See note 1 below. The number of consumers the tool should subscribe The number of messages that a consumer will receive during the test. See Note 2. The time period that the consumers should be subscribed for. See Note 2. The number of messages that the load test tool should send to the destination. See Note 2. The size of the message being sent in bytes. See Note 2. Whether the latency reporting should be enabled. From servicesconfig.xml PerfSubtopic.[0 10] True/false LOG_CATEGORY The name to output (Anything) N/a N/a Destination to send messages to. Base Name for Subtopic Typically: No of Subtopics N/a N/a N/a N/a N/a Page 25
as a identifier when logging LOG_LEVEL The level of logging Standard: error, warning, info, debug N/a NOTE 1: The DESTINATION_SUBTOPIC property needs to follow a specific format. For example, if you want 10 consumers to subscribe to 10 further subtopics, each receiving individual messages per sub subtopic the following string will be required: PerfSubtopic.[0 10] This breaks down to the following using the Server Client values: < Base Name for Subtopic>< No of Subtopics>.[0 > No of Sub Sub topics] The code that does this is found in LCDSDriver in the setupconsumers() method. For example: Consumer 1 subscribes to following: PerfSubtopic1.0 PerfSubtopic1.1 PerfSubtopic1.2... PerfSubtopic1.9 Consumer 2 subscribes to following: PerfSubtopic2.0 PerfSubtopic2.1 PerfSubtopic2.2... PerfSubtopic2.9 NB The bracketed section in the Client Props file must match up with the No of Sub Subtopics NOTE 2: MESSAGE_RECEIVE_COUNT or MESSAGE_RECEIVE_TIME The following properties in the Client Properties file are in part mutually exclusive. You must either set MESSAGE_RECEIVE_COUNT or MESSAGE_RECEIVE_TIME. Blank the one that you are not wishing to use. Values for MESSAGE_RECEIVE_TIME are in following format: 20s = 20 second 60m = 60 minutes 24h = 24 hours 5d = 5 days Page 26
MESSAGE_SEND_COUNT and MESSAGE_SEND_SIZE_BYTES These are used when you wish for the client load test tool to send the messages to the destination. If you are using the MessageGenerator Web Application, these values are not needed and both should be set to 0 or omitted. Where to go from here Running a full test <TODO Detail the steps now set up on how to run and change for a full test> Extending the Default Load Test Tool Testing for different message payloads 7. XML 8. Objects (must put objects on Load Test Clients classpath) Extending the LCDSDriver.java file 9. Different channel types can be added 10. See javadocs for nioload.jar and javaclient.jar for supported channels Create the Clients as a runnable JAR file 11. Ant Build file to create a JAR file that can distribute easily without having to recompile clients Points of Note 12. Debug logging adds high overhead 13. For reporting Latency, Server and Clients must be on same machine, or if on different ones must be linked via a Time Server. This is because it compares timestamps 14. Java Args for GC important for both Server and Client if measuring high throughput 15. No SSL Support, not trivial to implement Page 27
Appendix A: Configuring a New Target Runtime If you have not associated a Server with your Flash Builder environment, then use the following steps to carry this out. Example shown for created Tomcat Page 28
Next Page 29
Finish Page 30
Appendix B: Changing Project Configuration for Portability Remove the LCDS flex lib paths Press Finish to create the project Page 31
Move all the *swc files from <server>/web INF/flex into the <project>/libs To Page 32
Change the reference to the services config.xml to a Linked Resource in Eclipse From services "C:/Users/dcollie/Documents/Code/Eclipse/lcdsloadtesttool/LCDSLoadTestServer/WebContent/WE B INF/flex/services config.xml" locale en_gb Page 33
To services "${DOCUMENTS}/LCDSLoadTestServer/WebContent/WEB INF/flex/services config.xml" locale en_us Page 34
NOTE Remove the following string from the web.xml if you get errors xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/xmlschemainstance" xsi:schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web app_2_4.xsd" Remove all ACROBAT related WEB INF/lib JAR files to reduce size of web app (unless needed in Web App!) Acrobat core charset.jar Acrobat core.jar Cfdataservicesadapter.jar Cfgatewayadapter.jar Flex acrobat.jar NOTE See http://cornelcreanga.com/2009/01/blazeds lcds and integration with existingapplication/ Page 35