Contributing BasherContexts

Basher comes with a couple of default contexts, which provide basic functionality:

    <contribution configuration-id="net.sourceforge.basher.BasherContexts">
        <basher-context name="default" start-collection-from="0"
                        stop-collection-after="0" initial-number-threads="5"
                        max-number-threads="5" thread-increment-count="0"
                        thread-increment-interval="0" mark-average-interval="10"
                        task-min-delay="0" task-max-delay="1" run-duration="20"
                />

        <basher-context name="default-with-warmup" start-collection-from="60"
                        stop-collection-after="0" initial-number-threads="5"
                        max-number-threads="5" thread-increment-count="0"
                        thread-increment-interval="0" mark-average-interval="10"
                        task-min-delay="0" task-max-delay="1"
                />
    </contribution>

The above snippet of XML shows how the default contexts are registered in Gaderian. To register a new context, the above XML can be re-used within your own Gaderian module.xml and only the name of the context need to be changed.

When using Basher with Maven, the Basher context can also be defined within the configuration of the plugin (in the pom.xml). See the Maven Basher Plugin example for more information.

The contexts can also be created programatically if embedding Basher in your application.