public final class Synthetic extends Object
| Modifier and Type | Method and Description |
|---|---|
static LongStream |
counter(int start,
int events)
Returns a sequence of unique integers.
|
static LongStream |
exponential(double mean,
int events)
Returns a sequence of events based on an exponential distribution.
|
static TraceReader.KeyOnlyTraceReader |
generate(BasicSettings.TraceSettings settings)
Returns a sequence of events based on the setting's distribution.
|
static LongStream |
hotspot(int lowerBound,
int upperBound,
double hotsetFraction,
double hotOpnFraction,
int events)
Returns a sequence of events resembling a hotspot distribution where x% of operations access y%
of data items.
|
static LongStream |
scrambledZipfian(int items,
double constant,
int events)
Returns a sequence of events where some items are more popular than others, according to a
zipfian distribution.
|
static LongStream |
skewedZipfianLatest(int items,
int events)
Returns a zipfian sequence with a popularity distribution of items, skewed to favor recent
items significantly more than older items
|
static LongStream |
uniform(int lowerBound,
int upperBound,
int events)
Returns a sequence of events where items are selected uniformly randomly from the interval
inclusively.
|
static LongStream |
zipfian(int items,
double constant,
int events)
Returns a sequence of events where some items are more popular than others, according to a
zipfian distribution.
|
public static TraceReader.KeyOnlyTraceReader generate(BasicSettings.TraceSettings settings)
public static LongStream counter(int start, int events)
start - the number that the counter starts fromevents - the number of events in the distributionpublic static LongStream exponential(double mean, int events)
mean - mean arrival rate of gamma (a half life of 1/gamma)events - the number of events in the distributionpublic static LongStream hotspot(int lowerBound, int upperBound, double hotsetFraction, double hotOpnFraction, int events)
lowerBound - lower bound of the distributionupperBound - upper bound of the distributionhotsetFraction - percentage of data itemhotOpnFraction - percentage of operations accessing the hot setevents - the number of events in the distributionpublic static LongStream scrambledZipfian(int items, double constant, int events)
zipfian(int, double, int), the generated sequence scatters the "popular"
items across the item space. Use if you don't want the head of the distribution (the popular
items) clustered together.items - the number of items in the distributionconstant - the skew factor for the distributionevents - the number of events in the distributionpublic static LongStream skewedZipfianLatest(int items, int events)
items - the number of items in the distributionevents - the number of events in the distributionpublic static LongStream zipfian(int items, double constant, int events)
items - the number of items in the distributionconstant - the skew factor for the distributionevents - the number of events in the distributionpublic static LongStream uniform(int lowerBound, int upperBound, int events)
lowerBound - lower bound of the distributionupperBound - upper bound of the distributionevents - the number of events in the distribution