Scenario:
I am building a simulator for client server system that enables my users to load test their Thread Pool Tuning strategy on the server i.e. the simulation tool will perform load testing of Thread Pool. My simulator will allow the performance tester to first set Average number of requests per second that the simulator will send to the server. The simulator will send the requests to the server according to Poisson distribution.
Problem Statement?
1)The only information i have is Average numbers of Requests per second. For example if user set this value to 10 then my simulator will have to send requests to the server on 10 requests per second on average. I want this pattern of requests to follow a Poisson distribution. Is my problem fit for Poisson distribution?
2) I am dummy in statistics and mathematics and i need a straight forward build in library or function in JAVA that can generate random Poisson numbers.I am using following code to generate 100 random Poisson numbers, where Lambda represents average requests per second. For example if Lambda is 10 then i need random numbers around 10 so that i can have pattern of request frequencies following Poisson Distribution. Is this a correct way of generating Poisson random numbers for my scenario?
import cern.jet.random.engine.*;
import cern.jet.random.Poisson;
import cern.jet.random.Normal;
public class Poisson1 {
public Poisson1() {
// TODO Auto-generated constructor stub
RandomEngine engine = new DRand();
for(int i=1;i<=100;i++){
Poisson poisson = new Poisson(10, engine);
int poissonObs = poisson.nextInt();
System.out.println(poissonObs);
}
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new Poisson1();
}
}
3) Is there any other better way of generating random Poisson numbers for my problem statement other than cult library, where the only information available is "Average requests per second".
Aucun commentaire:
Enregistrer un commentaire