Class Replayer

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    
    public class Replayer
    extends Distribution
                        

    A distribution that replays empirical data values from trace files.

    The Replayer distribution reads real-world trace data from files and reproduces the exact sequence of observations. This is essential for trace-driven simulation, workload characterization, and model validation against real data patterns.

    Key capabilities:

    • Reading trace data from text files (one value per line)
    • Sequential replay of empirical observations
    • Empirical CDF computation from trace data
    • Statistical moment calculation (mean, variance, skewness)
    • Support for both file paths and direct data arrays

    Common applications include reproducing real arrival processes, service time patterns, and validating analytical models against measurements from production systems.

    Since:

    1.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Replayer(Object data)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getFileName()
      double evalCDF(double t) Evaluates the cumulative distribution function (CDF) at the given point.
      double evalLST(double s) Evaluate the Laplace-Stieltjes Transform at s
      APH fitAPH()
      double getMean() Gets the mean (expected value) of this distribution.
      double getRate() Gets the rate of this distribution (inverse of mean).
      double getSCV() Gets the squared coefficient of variation (SCV) of this distribution.
      double getSkewness() Gets the skewness of this distribution.
      double getVar() Gets the variance of this distribution.
      Array<double> sample(int n) Generates random samples from this distribution using default random generator.
      Array<double> sample(int n, Random random) Generates random samples from this distribution using the specified random generator.
      • Methods inherited from class jline.lang.processes.Distribution

        evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, mean, name, numParams, param, rate, scv, setNumParams, setParam, skewness, support, var
      • Methods inherited from class jline.lang.Copyable

        copy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Replayer

        Replayer(Object data)
    • Method Detail

      • evalCDF

         double evalCDF(double t)

        Evaluates the cumulative distribution function (CDF) at the given point.

        Parameters:
        t - the point at which to evaluate the CDF
        Returns:

        the CDF value at point t

      • evalLST

         double evalLST(double s)

        Evaluate the Laplace-Stieltjes Transform at s

        Parameters:
        s - the Laplace domain variable
        Returns:

        the LST value at s

      • getMean

         double getMean()

        Gets the mean (expected value) of this distribution.

        Returns:

        the mean value

      • getRate

         double getRate()

        Gets the rate of this distribution (inverse of mean).

        Returns:

        the rate value (1/mean)

      • getSCV

         double getSCV()

        Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.

        Returns:

        the squared coefficient of variation

      • getSkewness

         double getSkewness()

        Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.

        Returns:

        the skewness value

      • getVar

         double getVar()

        Gets the variance of this distribution. Computed as SCV * mean^2.

        Returns:

        the variance

      • sample

         Array<double> sample(int n)

        Generates random samples from this distribution using default random generator.

        Parameters:
        n - the number of samples to generate
        Returns:

        array of random samples

      • sample

         Array<double> sample(int n, Random random)

        Generates random samples from this distribution using the specified random generator.

        Parameters:
        n - the number of samples to generate
        random - the random number generator to use
        Returns:

        array of random samples