softlab-ntua/bencherl — pull request #2 by francesquini (2012-10-15 09:14:08+00:00)
Title: BenchErl - Big benchmark leaks resources

Hello,

I've been experimenting with BenchErl for a while now. However after several executions of different load sizes I was always getting an error regarding the number of created processes. After looking for the reason, I found it. The "big" benchmark does not release its resources after it is finished.

Processes do not die at the end of the benchmark, therefore leaking resources.

Before patch:

1> erlang:system_info(process_count).
25
2> big:run([1000],foo,bar).
ok
3> erlang:system_info(process_count).
1025

After patch:

1> erlang:system_info(process_count).
25
2> big:run([1000], foo, bar).
ok
3>
3> erlang:system_info(process_count).
25

The modification was quite simple, I just exchanged an exit(...) for a message send and the reciprocal receive.