I'm not sure of your exact requirements for why you would do that
there, but have you thought about putting the delay in the network
instead?
http://stackoverflow.com/questions/614795/simulate-delayed-and-dropped-packets-on-linux

That SO page has a pretty good description of how you can do it on the
network level without having to modify any source(assuming you are on
linux).

Scott

On Wed, Apr 6, 2011 at 11:20 AM, A J <s5a...@gmail.com> wrote:
> I want to run some tests where I incorporate random latency in some of
> the nodes (that varies over time). I think the best place is to place
> a 'sleep (random(10 to 50 seconds)) function' somewhere in the source
> code of cassandra.
> Or maybe the sleep is not random but the seconds to sleep are read
> from an external file on that node. (that I will modify as the tests
> are going on)
>
> What would be a good spot in the source code to include this sleep function ?
>
> Thanks.
>

Reply via email to