Skip to content

Workload Generation

joesephz edited this page May 17, 2012 · 30 revisions

#Workload Generation

To start working with Jagger you have to define configuration, a list of tasks that will be executed one-by-one. Jagger at nutshell is an extensible tool that can execute tasks of different nature.

To be able to execute the task special object called Distributor should be defined is spring configuration. Distributor is responsible for distributes tasks across the nodes.

One of the tasks shipped with Jagger out of the box is a workload task. WorkloadTask is used to configure workload on a system under test.

Example of workload task that creates workload on http://google.com server is listed below:

<bean id="googleHomePageWorkload" class="com.griddynamics.jagger.engine.e1.scenario.WorkloadTask">
        <property name="name" value="google-home-page-workload"/>
        <property name="version" value="1"/>
        <property name="scenarioFactory">
	    <bean class="com.griddynamics.jagger.invoker.QueryPoolScenarioFactory">

		<property name="loadBalancer">
		    <bean class="com.griddynamics.jagger.invoker.SimpleLoadBalancer">

		        <constructor-arg index="0">
				<value type="com.griddynamics.jagger.util.Nothing">INSTANCE</value>
			</constructor>
		        <constructor-arg index="1" value="http://google.com" />
		    </bean>
		</property>
		<property name="invokerClass" value="com.griddynamics.jagger.invoker.http.HttpVisitorInvoker"/>
	    </bean>
	</property>
        <property name="collectors">
            <list>
			<ref bean="durationCollector"/>
	                <ref bean="informationCollector"/>
	    </list>
	</property>
	<property name="clockConfiguration">
		<bean class="com.griddynamics.jagger.engine.e1.scenario.VirtualUsersClockConfiguration">
	        	<property name="tickInterval" value="1000"/>
			<property name="users" value="50"/>
	            </bean>
	</property>
	<property name="terminateStrategyConfiguration">
    		<bean class="com.griddynamics.jagger.engine.e1.scenario.TerminateByDuration">
        		<property name="seconds" value="30"/>
                </bean>
	</property>
    </bean>
  • name and version – Task is named as "google-home-page-workload" and it's version is "1". Name and version are used for report generation and session comparation
  • scenarioFactory – Defines algorithm of workload. Invocation of google.com page via http protocol is specified. See invokers API.
  • collectors – List of collectors responsible for gathering information during workload. Duration and inforamtion collectors are specified.
  • clockConfiguration – Workload clock configuration. Jagger will simulate 50 virtual users workload.
  • terminateStrategyConfiguration – Termination strategy configuration. Workload will be terminated after 30 seconds.
Clone this wiki locally