I have used this technique in some other tests as well. Have a look at
RehashAfterPartitionMergeTest, for example, on line 39:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/infinispan/trunk/core/src/test...
Perhaps it makes sense to wrap this stuff up in a helper method on TestingUtil so it can
be reused easily, perhaps something like:
public DISCARD addDISCARD(Cache c) { ... }
and
public DELAY addDELAY(Cache c) { ... } ?
We'd probably want the reverse as well:
public void removeDISCARD(Cache c) { ... }
public void removeDELAY(Cache c) { ... }
On 6 Jul 2010, at 13:54, Bela Ban wrote:
Sanne Grinovero wrote:
> Hello,
> I'm running some performance tests; my goal is to alter the code for
> the Lucene Directory to use optimal batching and Flags, but to make
> sure I'm improving performance for DIST and REPL configurations the
> only option I'm having is to run it on a real cluster, which is not
> doable right now.
>
> So as I'm running tests on my laptop, network IO is not real and I
> suppose it's not representative of real life bottlenecks.
>
> Is there some option I could set in the jgroups configuration to
> introduce an arbitrary delay,
Yes, DELAY ! :-)
Options in_delay and out_delay add some ms to every incoming or outgoing
message. Take a look at the code, DELAY is only ~ 80 lines, so you could
also write your own, which introduces varying delays.
> or even some degree of random packet losses?
Yes, DISCARD ! Use 'up' and 'down' to introduce random discards, e.g.
DISCARD up=".4" means that 40% of incoming messages are discarded.
--
Bela Ban
Lead JGroups / Clustering Team
JBoss
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org