I'm working on a simple load testing library. Basically, it provides macro 
`@runtimes` that takes number of parallel users, number of iterations and 
expression to execute, and repeats that expression specified number of 
times in different threads / tasks. In code, it looks something like this: 

macro runtimes(nusers::Int, ntimes::Int, ex::Expr)
    return quote 
        @sync for uid=1:$nusers
            @async for itr=1:$ntimes
                t = @elapsed $ex
                report(t)         # report elapsed time somewhere
            end
        end
    end
end



The problem is in `report` function which should save elapsed time 
somewhere. My current approach is to create short-living ZMQ-based 
collector and send metrics to it. However, ZMQ doesn't seem to be very well 
suited for this task (you can see my current code for reporting [1], which 
is already several times larger then the main `runtimes` macro, and it 
still doesn't work properly). 

So before I dive deeper into ZMQ I would like to know if there's a better 
fit for this task or even ready-to-use metric collector in Julia ecosystem. 


[1]: https://github.com/dfdx/Woody.jl/blob/master/src/collector.jl


Reply via email to