[Tsung] Dynamic vars and module initialization
bernat at luffy.cx
Wed Nov 27 21:30:52 CET 2013
❦ 27 novembre 2013 21:26 CET, Vincent Bernat <bernat at luffy.cx> :
>>> I cannot
>>> afford to put the whole requests in memory because they are pretty
>>> big. I need to initiliaze ODBC, prepare and execute the request and then
>>> each time the function is called, pop a result. I have come with this
>>> code to do this:
>>> However, how could I tell Tsung to call `elasticsearch:start()` at the
>>> beginning of the test to spawn the processes?
>> What about patch the tunsg bash script used to launch tsung or just do
>> an alias which will start elastic search and start tsung just after ?
>> You can have a look to escript may be.
> Maybe you think that `elasticsearch:start()` is to start Elasticsearch,
> but no, it is to initialize my elasticsearch module that is used through
> dynamic variables `%%elasticsearch:search%%` and
> `%%elasticsearch:autocomplete%%`. The `start()` function will spawn two
> SQL processes that will give a JSON request to be executed at each call
> to `search()` or `autocomplete()`.
I have updated the gist to include the XML file that I am willing to use
Don't patch bad code - rewrite it.
- The Elements of Programming Style (Kernighan & Plauger)
More information about the Tsung-users