Module Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call Call AttributeLoad NameLoad attr keyword NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str Assign NameStore Str Assign NameStore Dict FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr Str Dict attr Call AttributeLoad NameLoad attr Dict If Call NameLoad NameLoad Str body For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareLt Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareGt Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr Str body Raise Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list Call NameLoad keyword Str keyword Num keyword NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Return Call NameLoad Call NameLoad Lambda arguments args NameParam defaults Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr ListLoad For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BoolOpOr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr For NameStore SubscriptLoad NameLoad Slice Num body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Raise decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A abc N/A copy N/A jsonschema N/A six rally.common logging rally.common.plugin plugin rally.common utils rally exceptions rally.task functional N/A LOG N/A N/A logging getLogger __name__ configure N/A N/A name order hidden N/A False N/A N/A Context class wrapper.

    Each context class has to be wrapped by configure() wrapper. It
    sets essential configuration of context classes. Actually this wrapper just
    adds attributes to the class.

    :param name: Name of the class, used in the input task
    :param order: As far as we can use multiple context classes that sometimes
                  depend on each other we have to specify order of execution.
                  Contexts with smaller order are run first
    :param hidden: If it is true you won't be able to specify context via
                   task config
     wrapper N/A N/A cls N/A N/A N/A cls N/A N/A N/A plugin configure name name cls N/A N/A N/A cls _meta_set order order N/A N/A N/A cls _meta_set hidden hidden N/A cls N/A N/A wrapper N/A Context N/A N/A plugin Plugin N/A functional FunctionalMixin N/A utils RandomNameGeneratorMixin N/A N/A This class is a factory for context classes.

    Every context class should be a subclass of this class and implement
    2 abstract methods: setup() and cleanup()

    It covers:
        1) proper setting up of context config
        2) Auto discovering & get by name
        3) Validation by CONFIG_SCHEMA
        4) Order of context creation

     N/A RESOURCE_NAME_FORMAT c_rally_XXXXXXXX_XXXXXXXX N/A CONFIG_SCHEMA N/A __init__ N/A N/A self ctx N/A N/A N/A N/A self config N/A N/A N/A N/A ctx get config N/A get N/A N/A self get_name N/A N/A N/A hasattr self DEFAULT_CONFIG N/A N/A N/A key value N/A N/A N/A self DEFAULT_CONFIG items N/A N/A N/A N/A N/A self config setdefault key value N/A N/A self context ctx N/A N/A self task N/A N/A N/A self context get task N/A N/A __lt__ N/A N/A self other N/A N/A N/A N/A N/A N/A self get_order N/A N/A other get_order N/A __gt__ N/A N/A self other N/A N/A N/A N/A N/A N/A self get_order N/A N/A other get_order N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A N/A self get_order N/A N/A other get_order N/A validate N/A N/A cls config non_hidden N/A False N/A N/A N/A non_hidden N/A N/A cls _meta_get hidden N/A N/A N/A N/A exceptions PluginNotFound name N/A N/A cls get_name namespace context N/A N/A N/A jsonschema validate config N/A cls CONFIG_SCHEMA N/A classmethod get_order N/A N/A cls N/A N/A N/A N/A N/A cls _meta_get order N/A classmethod setup N/A N/A self N/A N/A N/A Prepare environment for test.

        This method is executed only once before load generation.

        self.config contains input arguments of this context
        self.context contains information that will be passed to scenario

        The goal of this method is to perform all operation to prepare
        environment and store information to self.context that is required
        by scenario.
         N/A N/A abc abstractmethod cleanup N/A N/A self N/A N/A N/A Clean up environment after load generation.

        This method is run once after load generation is done to cleanup
        environment.

        self.config contains input arguments of this context
        self.context contains information that was passed to scenario
         N/A N/A abc abstractmethod map_for_scenario N/A N/A self context_obj N/A N/A N/A Maps global context to context that is used by scenario.

        This method is run each time to create scenario context which is
        actually just sub set of global context.

        One of sample where this method is useful is users context.
        We have set of users and tenants but each scenario should have access
        to context of single user in single tenant.
         N/A context_obj N/A __enter__ N/A N/A self N/A N/A N/A self N/A __exit__ N/A N/A self exc_type exc_value exc_traceback N/A N/A N/A N/A N/A self cleanup N/A N/A N/A configure name base_context order 0 hidden True ContextManager N/A object N/A N/A Create context environment and run method inside it. __init__ N/A N/A self context_obj N/A N/A N/A N/A self _visited N/A N/A N/A self context_obj context_obj N/A validate N/A N/A ctx non_hidden N/A False N/A N/A N/A name config N/A N/A six iteritems ctx N/A N/A N/A N/A N/A N/A Context get name validate config non_hidden non_hidden N/A staticmethod _get_sorted_context_lst N/A N/A self N/A N/A N/A ctxlst N/A map N/A Context get N/A N/A self context_obj N/A config N/A N/A sorted N/A map N/A N/A N/A ctx N/A N/A ctx N/A self context_obj ctxlst N/A setup N/A N/A self N/A N/A N/A Creates benchmark environment from config. N/A N/A self _visited N/A N/A ctx N/A N/A self _get_sorted_context_lst N/A N/A N/A N/A N/A self _visited append ctx N/A N/A N/A ctx setup N/A N/A self context_obj N/A cleanup N/A N/A self N/A N/A N/A Destroys benchmark environment. N/A ctxlst N/A N/A self _visited N/A N/A self _get_sorted_context_lst N/A ctx N/A ctxlst N/A -1 N/A N/A N/A N/A N/A N/A ctx cleanup N/A N/A N/A Exception N/A e N/A N/A N/A N/A LOG error N/A Context %s failed during cleanup. N/A N/A ctx get_name N/A N/A N/A LOG exception e N/A map_for_scenario N/A N/A self N/A N/A N/A Returns scenario's specific context from full context.

        Each context class is able to map context object data as it want.
        E.g. users context will pick one user and it's tenant for each
        scenario run.

        This method iterates over all context classes used in task
        and performs transformation of each of them to full context, order of
        transformation is the same as order of context creation.
         N/A context_obj N/A N/A copy deepcopy N/A self context_obj N/A ctx N/A N/A self _get_sorted_context_lst N/A N/A context_obj N/A N/A ctx map_for_scenario context_obj N/A context_obj N/A __enter__ N/A N/A self N/A N/A N/A N/A N/A N/A N/A self setup N/A N/A N/A Exception N/A N/A N/A N/A self cleanup N/A N/A __exit__ N/A N/A self exc_type exc_value exc_traceback N/A N/A N/A N/A N/A self cleanup N/A N/A