Module ImportFrom alias alias alias alias Import alias ImportFrom alias alias alias alias alias Import alias Import alias Import alias Import alias ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad keyword Str keyword Str keyword NameLoad keyword Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpDiv Num BinOpDiv AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr While CompareGt NameLoad Num body Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Expr Yield NameLoad Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpSub AttributeLoad NameLoad attr NameLoad AugAssignSub NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list Call NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad
N/A __future__ absolute_import division print_function unicode_literals N/A app splunklib.searchcommands dispatch GeneratingCommand Configuration Option validators N/A random N/A csv N/A sys N/A time SimulateCommand N/A GeneratingCommand N/A N/A  Generates a sequence of events drawn from a CSV file using repeated random sampling

    ##Syntax

    .. code-block::
        simulate csv=<path> rate=<expected_event_count> interval=<sampling_period> duration=<execution_period>
        [seed=<string>]

    ##Description

    The :code:`simulate` command uses repeated random samples of the event records in :code:`csv` for the execution
    period of :code:`duration`. Sample sizes are determined for each time :code:`interval` in :code:`duration`
    using a Poisson distribution with an average :code:`rate` specifying the expected event count during
    :code:`interval`.

    ##Example

    .. code-block::
        | simulate csv=population.csv rate=50 interval=00:00:01
            duration=00:00:05 | countmatches fieldname=word_count
            pattern="\w+" text | stats mean(word_count) stdev(word_count)

    This example generates events drawn from repeated random sampling of events from :code:`tweets.csv`. Events are
    drawn at an average rate of 50 per second for a duration of 5 seconds. Events are piped to the example
    :code:`countmatches` command which adds a :code:`word_count` field containing the number of words in the
    :code:`text` field of each event. The mean and standard deviation of the :code:`word_count` are then computed by
    the builtin :code:`stats` command.


     N/A csv_file N/A Option doc **Syntax:** **csv=***<path>*
        **Description:** CSV file from which repeated random samples will be
        drawn name csv require True validate N/A N/A validators File N/A duration N/A Option doc **Syntax:** **duration=***<time-interval>*
        **Description:** Duration of simulation require True validate N/A N/A validators Duration N/A interval N/A Option doc **Syntax:** **interval=***<time-interval>*
        **Description:** Sampling interval require True validate N/A N/A validators Duration N/A rate N/A Option doc **Syntax:** **rate=***<expected-event-count>*
        **Description:** Average event count during sampling `interval` require True validate N/A N/A validators Integer 1 N/A seed N/A Option doc **Syntax:** **seed=***<string>*
        **Description:** Value for initializing the random number generator  generate N/A N/A self N/A N/A N/A N/A N/A self records N/A N/A N/A N/A self seed None N/A N/A N/A N/A random seed N/A self seed N/A N/A self records N/A record N/A record N/A N/A csv DictReader N/A self csv_file N/A N/A self lambda_value N/A 1.0 N/A N/A self rate N/A float N/A self interval N/A duration N/A self duration N/A N/A duration 0 N/A N/A count N/A long N/A round N/A N/A random expovariate N/A self lambda_value N/A start_time N/A N/A time clock N/A record N/A N/A random sample N/A self records count N/A N/A N/A record N/A interval N/A N/A N/A time clock start_time N/A N/A interval N/A self interval N/A N/A N/A N/A time sleep N/A N/A self interval interval N/A duration N/A max interval N/A self interval N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super SimulateCommand self __init__ N/A N/A self lambda_value None N/A N/A self records None N/A N/A N/A Configuration N/A N/A dispatch SimulateCommand N/A sys argv N/A sys stdin N/A sys stdout __name__