processone/tsung — pull request #99 by tisba (2014-08-09 20:03:52+00:00)
Title: Add custom code distribution

**WARNING: This is work in progress, expect rebasing and force-pushes! Feedback is very welcome!**

This pull request adds the ability to distribute compiled or uncompiled erlang modules to all nodes. The goal is to *significantly simplify* the usage of custom code/modules especially in a distributed setup to be used in sessions e.g. via ``.

The proposed option to specify modules is the following:

```xml

```

Module type `beam` will be loaded, so they have to be on the controllers load path (see command line option `-X` added in https://github.com/processone/tsung/pull/92). Modules of type `source` are compiled via `compile:file(Path, [binary, compressed, return])`. Compilation errors and warnings will be logged, where compilation errors will result in tsung termination.

Any module is distributed to all nodes, including remote beams, via `rpc:multicall(Nodes, code, load_binary, [Module, Filename, Binary], ?RPC_TIMEOUT)` so that they are usable right away.