TagStreamerUseCaseScenarios

From RifidiWiki

Revision as of 19:34, 6 February 2008 by Kyle (Talk | contribs)

Jump to: navigation, search

Use Case: Load Testing multiple readers one batch

This is describing a use case scenario for a load Testing with multiple readers and a batch insert every 1s.

Scenarios

The scenarios file is a list of one or more scenarios. Each scenario contains one or more readers on which batches will be executed. You can think of a scencario as a path along an assembly line: a certain group of tags gets executed on a particular reader, and then moves on to the next reader. In this case, three scenarios are defined, all of which have one reader only. The traveltime is the time that it takes for one tag to reach the next reader in a scenario once it has left the previous one. In this case, the traveTime for each of the scenarios is set to zero because there is only one reader in each scenario.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<scenarios>
	<scenario>
		<id>1</id>
		<pathUnit>
			<readerID>0</readerID>
			<travelTime>0</travelTime>
		</pathUnit>
	</scenario>
	<scenario>
		<id>2</id>
		<pathUnit>
			<readerID>1</readerID>
			<travelTime>0</travelTime>
		</pathUnit>
	</scenario>
	<scenario>
		<id>3</id>
		<pathUnit>
			<readerID>2</readerID>
			<travelTime>0</travelTime>
		</pathUnit>
	</scenario>
</scenarios>

Components

The components file contains one or more descriptions of readers. It matches a virtual reader up with an ID that is used in the scneario. In this example, we have defined three different LLRP readers for use in the scenarios.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<components>
    <readerComponents id="0">
        <reader>
            <numAntennas>1</numAntennas>
            <numGPIs>4</numGPIs>
            <numGPOs>4</numGPOs>
            <propertiesMap>
                <entry>
                    <key>llrp_inet_address</key>
                    <value>127.0.0.1:5084</value>
                </entry>
                <entry>
                    <key>inet_address</key>
                    <value>127.0.0.1:10101</value>
                </entry>
                <entry>
                    <key>servermode</key>
                    <value>true</value>
                </entry>
            </propertiesMap>
            <readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>
            <readerName>LLRPReader</readerName>
        </reader>
    </readerComponents>
    <readerComponents id="1">
        <reader>
            <numAntennas>1</numAntennas>
            <numGPIs>4</numGPIs>
            <numGPOs>4</numGPOs>
            <propertiesMap>
                <entry>
                    <key>llrp_inet_address</key>
                    <value>127.0.0.1:5085</value>
                </entry>
                <entry>
                    <key>inet_address</key>
                    <value>127.0.0.1:10102</value>
                </entry>
                <entry>
                    <key>servermode</key>
                    <value>true</value>
                </entry>
            </propertiesMap>
            <readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>
            <readerName>LLRPReader</readerName>
        </reader>
    </readerComponents>
    <readerComponents id="2">
        <reader>
            <numAntennas>1</numAntennas>
            <numGPIs>4</numGPIs>
            <numGPOs>4</numGPOs>
            <propertiesMap>
                <entry>
                    <key>llrp_inet_address</key>
                    <value>127.0.0.1:5086</value>
                </entry>
                <entry>
                    <key>inet_address</key>
                    <value>127.0.0.1:10103</value>
                </entry>
                <entry>
                    <key>servermode</key>
                    <value>true</value>
                </entry>
            </propertiesMap>
            <readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>
            <readerName>LLRPReader</readerName>
        </reader>
    </readerComponents>
</components>

Batch

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<batch id="1">
    <waitAction>
        <waitTime>100</waitTime>
    </waitAction>
    <tagAction>
        <execDuration>200</execDuration>
        <number>20</number>
        <prefix>eef</prefix>
        <tagGen>GEN2</tagGen>
        <tagType>CustomEPC96</tagType>
        <regenerate>false</regenerate>
    </tagAction>
    <waitAction>
        <waitTime>100</waitTime>
    </waitAction>
    <gpiAction>
        <port>0</port>
        <signal>true</signal>
    </gpiAction>
</batch>

LoadTestSuite

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loadTestSuite>
    <fileUnits>
        <fileName>scenario.xml</fileName>
        <fileType>SCENARIO</fileType>
    </fileUnits>
    <fileUnits>
        <fileName>batch.xml</fileName>
        <fileType>BATCH</fileType>
    </fileUnits>
    <fileUnits>
        <fileName>components.xml</fileName>
        <fileType>COMPONENT</fileType>
    </fileUnits>
    <testUnit>
        <batchID>1</batchID>
        <rampTime>1000</rampTime>
        <count>40</count>
        <scenarios>
            <id>1</id>
            <id>2</id>
            <id>3</id>
        </scenarios>
    </testUnit>
    <testUnit>
        <batchID>1</batchID>
        <rampTime>2000</rampTime>
        <count>10</count>
        <scenarios>
            <id>1</id>
        </scenarios>
    </testUnit>
</loadTestSuite>
Personal tools