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>
Clone this wiki locally