ch.qos.logback.classic.control
Class ScenarioRandomUtil
java.lang.Object
ch.qos.logback.classic.control.ScenarioRandomUtil
public class ScenarioRandomUtil
- extends Object
Method Summary |
static int |
gaussianAsPositiveInt(int average,
int stdDeviation)
Approximate a gaussian distrib with only only positive integer values |
static boolean |
oneInFreq(int freq)
|
static int |
randomChildrenCount(String name)
Returns 3 for root, 3 for children of root, 9 for offspring of generation 2
and 3, and for generations 4 and later, return 0 with probability 0.5 and a
gaussian (average=AVERAGE_CHILDREN_COUNT) with probability 0.5. |
static String |
randomId()
|
static Level |
randomLevel()
|
static String |
randomLoggerName(int average,
int stdDeviation)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScenarioRandomUtil
public ScenarioRandomUtil()
oneInFreq
public static boolean oneInFreq(int freq)
randomLevel
public static Level randomLevel()
randomLoggerName
public static String randomLoggerName(int average,
int stdDeviation)
randomId
public static String randomId()
gaussianAsPositiveInt
public static int gaussianAsPositiveInt(int average,
int stdDeviation)
- Approximate a gaussian distrib with only only positive integer values
- Parameters:
average
- stdDeviation
-
- Returns:
randomChildrenCount
public static int randomChildrenCount(String name)
- Returns 3 for root, 3 for children of root, 9 for offspring of generation 2
and 3, and for generations 4 and later, return 0 with probability 0.5 and a
gaussian (average=AVERAGE_CHILDREN_COUNT) with probability 0.5.
- Parameters:
name
-
- Returns:
Copyright © 2005-2009 QOS.ch. All Rights Reserved.