Difference between revisions of "TagStreamerUseCaseScenarios"

From RifidiWiki

Jump to: navigation, search
(Components)
(Batch)
Line 110: Line 110:
  
 
== Batch ==
 
== Batch ==
 +
The batch is a sequence of commands that should be executed on a reader when it is being processed on a reader.  The batch is made up of one or more of the following kinds of commands: a waitAction is a time that the batch should wait.  The TagAction is a set of tags that should be exposed to the reader.  TH GPI Action toggles the reader's GPI.  The TagAction consists of an execDuration (how long the tags should be on the reader), a number (the number of tags in this tag action), a tagType, a prefix, and a tag Generation.  Also it contains a boolean regeration variable that will force the set of tags to be regenerated each time it is exposed to a reader.
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Revision as of 19:44, 6 February 2008

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

The batch is a sequence of commands that should be executed on a reader when it is being processed on a reader. The batch is made up of one or more of the following kinds of commands: a waitAction is a time that the batch should wait. The TagAction is a set of tags that should be exposed to the reader. TH GPI Action toggles the reader's GPI. The TagAction consists of an execDuration (how long the tags should be on the reader), a number (the number of tags in this tag action), a tagType, a prefix, and a tag Generation. Also it contains a boolean regeration variable that will force the set of tags to be regenerated each time it is exposed to a reader.

<?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