Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

What is the Scenario Thread Engine?

Description

The Scenario Thread Engine is specifically designed to decrease the time it takes to execute a Scenario Chain or Scenario Chain Set by simultaneously executing multiple Scenarios within a Scenario Chain or Scenario Chain Set across multiple threads.

Please note: The Scenario Thread Engine runs its threads in any order it chooses. Thus, only use the Scenario Thread Engine on Scenario Chains or Scenario Chain Sets, where the order in which Scenarios are executed is insignificant.

When To Use

It would be good to thread Scenarios that contain the SegmentDataCreatorReceiver because it is used on two or more segment files (often hundreds of segment files) that are then merged into a single heavily nested document. Here, the order in which the segment files are created is insignificant. The Scenario Thread Engine also checks for Merge Receivers and knows to execute a Merge Receiver only after all segment threads have been executed.

When Not To Use

It would not be a good idea to thread Scenarios that contain any SQLInsertReceiver. Here, the order in which Scenarios are executed is significant due to the referential integrity of the data being validated on each row insertion.

Command-Line Example Threading a Scenario Chain

Syntax: genrocket -r ScenarioChain.grs -threaded <# of threads>

Example: genrocket -r JSONScenarioChain.grs -threaded 10

Command-Line Example Threading a Scenario Chain Set

Syntax: genrocket -r ScenarioChainSet.grs -threaded <# of threads>

Example: genrocket -r EDI87PSceanrioChainSet.grs -threaded 15

How Much Faster is the Scenario Thread Engine?

  • The following tests were run on an EDI837ScenarioChainsSet
  • The time stats also include the merge time after the segment threads have been completed
  • The merging of the segments is not currently threaded
  • The hardware specs on which the test was run are the following
    • Processor - 4 GHz Quad-Core Intel Core i7
    • Memory - 16 GB 1867 MHz DDR3
    • Storage - 1 TB SSD

Test Run 1000

The following tests generated 1,000 EDI837I documents using 1, 10, 15, and 20 threads.

  • genrocket -r EDI87ISceanrioChainSet.grs -tdc EDI837ILoadCases.gtdc:Load.load1000 -threaded 15
Number Of Threads Execution Time
1 4 Minutes 12 Seconds
10 1 Minute 45 Seconds
15 1 Minute 34 Seconds
20 1 Minute 31 Seconds

Test Run 10000

The following tests generated 10,000 EDI837I documents using 1 and 20 threads.

  • genrocket -r EDI87ISceanrioChainSet.grs -tdc EDI837ILoadCases.gtdc:Load.load10000 -threaded 20
Number Of Threads Execution Time
1 53 Minutes 20 Seconds
20 23 Minute 50 Seconds