Module Import alias Import alias Import alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv Num NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpDiv BinOpMult NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Num While BoolOpAnd CompareLt NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Assign NameStore TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp NameLoad BinOpDiv NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad While BoolOpOr CompareGt BinOpDiv NameLoad BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad CompareGtE Call NameLoad NameLoad NameLoad body If NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num If UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Num While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Dict Str Str Str Str Str AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Dict Str Str Dict Str Str Str Num Dict Str Str Str Str NameLoad Num Dict Str Str Dict Str Str Str Num Dict Str Str Str Num NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore BinOpDiv Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str While NameLoad body Expr Yield TupleLoad NameLoad NameLoad NameLoad NameLoad BinOpAdd NameLoad BoolOpAnd NameLoad Num BinOpAdd NameLoad BoolOpAnd NameLoad Num NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr If NameLoad body AugAssignSub NameStore Num If NameLoad body AugAssignSub NameStore Num decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list Call AttributeLoad NameLoad attr keyword Str
N/A N/A collections N/A multiprocessing N/A threading N/A time six.moves queue Queue rally.common logging rally.common utils rally consts rally.task runner N/A LOG N/A N/A logging getLogger __name__ _worker_process N/A N/A queue iteration_gen timeout rps times max_concurrent context cls method_name args aborted info N/A N/A N/A Start scenario within threads.

    Spawn N threads per second. Each thread runs the scenario once, and appends
    result to queue. A maximum of max_concurrent threads will be ran
    concurrently.

    :param queue: queue object to append results
    :param iteration_gen: next iteration number generator
    :param timeout: operation's timeout
    :param rps: number of scenario iterations to be run per one second
    :param times: total number of scenario iterations to be run
    :param max_concurrent: maximum worker concurrency
    :param context: scenario context object
    :param cls: scenario class
    :param method_name: scenario method name
    :param args: scenario args
    :param aborted: multiprocessing.Event that aborts load generation if
                    the flag is set
    :param info: info about all processes count and counter of runned process
     N/A pool N/A N/A collections deque N/A sleep N/A 1.0 rps N/A N/A N/A runner _log_worker_info times times rps rps timeout timeout cls cls method_name method_name args args N/A N/A N/A time sleep N/A N/A sleep N/A info N/A processes_counter N/A info N/A processes_to_start N/A start N/A N/A time time N/A timeout_queue N/A N/A Queue Queue N/A timeout N/A N/A collector_thr_by_timeout N/A N/A threading Thread target N/A utils timeout_thread args N/A timeout_queue N/A N/A N/A collector_thr_by_timeout start N/A i 0 N/A N/A N/A i times N/A N/A N/A aborted is_set N/A N/A scenario_context N/A N/A runner _get_scenario_context N/A next iteration_gen context N/A worker_args N/A queue cls method_name scenario_context args N/A thread N/A N/A threading Thread target N/A runner _worker_thread args worker_args N/A i 1 N/A N/A N/A thread start N/A timeout N/A N/A N/A N/A timeout_queue put N/A N/A thread ident N/A N/A N/A time time timeout N/A N/A N/A pool append thread N/A time_gap N/A N/A N/A time time start N/A real_rps N/A time_gap N/A i time_gap Infinity N/A N/A N/A LOG debug N/A Worker: %s rps: %s (requested rps: %s) N/A i real_rps rps N/A N/A N/A N/A i N/A N/A N/A time time start rps N/A N/A len pool max_concurrent N/A N/A pool N/A N/A N/A N/A N/A pool N/A 0 join 0.001 N/A N/A N/A N/A N/A pool N/A 0 isAlive N/A N/A N/A N/A pool popleft N/A N/A N/A N/A time sleep 0.001 N/A pool N/A N/A thr N/A N/A pool popleft N/A N/A N/A thr join N/A timeout N/A N/A N/A N/A timeout_queue put N/A None None N/A N/A N/A collector_thr_by_timeout join N/A RPSScenarioRunner N/A N/A runner ScenarioRunner N/A N/A Scenario runner that does the job with specified frequency.

    Every single benchmark scenario iteration is executed with specified
    frequency (runs per second) in a pool of processes. The scenario will be
    launched for a fixed number of times in total (specified in the config).

    An example of a rps scenario is booting 1 VM per second. This
    execution type is thus very helpful in understanding the maximal load that
    a certain cloud can handle.
     N/A CONFIG_SCHEMA N/A type $schema properties additionalProperties object N/A consts JSON_SCHEMA N/A type times rps timeout max_concurrency max_cpu_count N/A type string N/A type minimum integer 1 N/A type exclusiveMinimum minimum number True 0 N/A type number N/A type minimum integer 1 N/A type minimum integer 1 False _run_scenario N/A N/A self cls method_name context args N/A N/A N/A Runs the specified benchmark scenario with given arguments.

        Every single benchmark scenario iteration is executed with specified
        frequency (runs per second) in a pool of processes. The scenario will
        be launched for a fixed number of times in total (specified in the
        config).

        :param cls: The Scenario class where the scenario is implemented
        :param method_name: Name of the method that implements the scenario
        :param context: Benchmark context that contains users, admin & other
                        information, that was created before benchmark started.
        :param args: Arguments to call the scenario method with

        :returns: List of results fore each single scenario iteration,
                  where each result is a dictionary
         N/A times N/A N/A self config N/A times N/A timeout N/A N/A N/A self config get timeout 0 N/A iteration_gen N/A N/A utils RAMInt N/A cpu_count N/A N/A multiprocessing cpu_count N/A max_cpu_used N/A min cpu_count N/A N/A N/A self config get max_cpu_count cpu_count N/A processes_to_start N/A min max_cpu_used times N/A N/A N/A self config get max_concurrency times N/A rps_per_worker N/A N/A float N/A N/A self config N/A rps processes_to_start N/A N/A times_per_worker times_overhead N/A divmod times processes_to_start N/A N/A concurrency_per_worker concurrency_overhead N/A divmod N/A N/A N/A self config get max_concurrency times processes_to_start N/A N/A N/A self _log_debug_info times times timeout timeout max_cpu_used max_cpu_used processes_to_start processes_to_start rps_per_worker rps_per_worker times_per_worker times_per_worker times_overhead times_overhead concurrency_per_worker concurrency_per_worker concurrency_overhead concurrency_overhead N/A result_queue N/A N/A multiprocessing Queue worker_args_gen N/A N/A times_overhead concurrency_overhead N/A N/A N/A Generate arguments for process worker.

            Remainder of threads per process division is distributed to
            process workers equally - one thread per each process worker
            until the remainder equals zero. The same logic is applied
            to concurrency overhead.
            :param times_overhead: remaining number of threads to be
                                   distributed to workers
            :param concurrency_overhead: remaining number of maximum
                                         concurrent threads to be distributed
                                         to workers
             N/A True N/A N/A N/A N/A result_queue iteration_gen timeout rps_per_worker N/A times_per_worker N/A times_overhead 1 N/A concurrency_per_worker N/A concurrency_overhead 1 context cls method_name args N/A self aborted N/A times_overhead N/A N/A times_overhead 1 N/A concurrency_overhead N/A N/A concurrency_overhead 1 N/A N/A process_pool N/A N/A self _create_process_pool processes_to_start _worker_process N/A worker_args_gen times_overhead concurrency_overhead N/A N/A N/A self _join_processes process_pool result_queue N/A N/A N/A N/A runner configure name rps