-2

I try to simulate http workload that obeys rayleigh distribution. I wish to use jmeter for that. I know how to utilize the Poisson and Gaussian Random Timers and I wonder if you have an idea of how to use a raleigh-based timer.

Thanks,

1 Answers1

0

You would need to implement the algorithm using for example:

EDIT 2/08/2016:

You used the BeanShell (JSR223+Groovy would perform much better) option to utilize the Apache commons.math3 library.

Sample code:

import org.apache.commons.math3.distribution.WeibullDistribution; 
alpha = Integer.parseInt(vars.get("alpha")); 
beta = Integer.parseInt(vars.get("beta")); 
rng= Integer.parseInt(bsh.args[0]); 
try { 
    WeibullDistribution g= new WeibullDistribution(rng, alpha,beta);    
    return g.sample(); 
} catch (Throwable ex) { 
    log.error("Something wrong", ex); 
    throw ex; 
}
Community
  • 1
  • 1
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • Thats is helpful! I used the BeanShell option to utilize the commons.math3 library. import org.apache.commons.math3.distribution.WeibullDistribution; alpha = Integer.parseInt(vars.get("alpha")); beta = Integer.parseInt(vars.get("beta")); rng= Integer.parseInt(bsh.args[0]); try { WeibullDistribution g= new WeibullDistribution(rng, alpha,beta); return g.sample(); } catch (Throwable ex) { log.error("Something wrong", ex); throw ex; } – Yahav Biran Aug 02 '16 at 21:17
  • If so, you should accept my answer and upvote it so that other users can use it. Feel free to amend it with your comment. Thx – UBIK LOAD PACK Aug 02 '16 at 21:22