* Gauss key generator
* @return byte[] representation of the key string
*/
private static byte[] generateGaussKey()
{
Session session = Stress.session;
String format = "%0" + session.getTotalKeysLength() + "d";
for (;;)
{
double token = nextGaussian(session.getMean(), session.getSigma());
if (0 <= token && token < session.getNumKeys())
{
return String.format(format, (int) token).getBytes(UTF_8);
}
}
}