Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad decorator_list Expr Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Raise Call NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad Num Num body Expr Str Return Call NameLoad NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list
N/A N/A 
Read request load scenario for the control service benchmarks.
 N/A random zope.interface implementer twisted.internet.defer CancelledError flocker.common timeout _interfaces IRequest _request_load RequestLoadScenario NoNodesFound _rate_measurer DEFAULT_SAMPLE_SIZE DatasetCreationTimeout N/A Exception N/A N/A 
    The dataset could not be created within the specified time.
     N/A WriteRequest N/A object N/A N/A 
    Implementation of the write setup.
    :ivar reactor: Reactor to use.
    :ivar control_service: provider of the ``IFlockerAPIV1Client`` interface.
    :ivar timeout: Maximum time in seconds to wait until the dataset is
        created.
    :ivar nodes: list of nodes of the cluster.
    :ivar dataset_node: node where the dataset is.
    :ivar dataset_id: id of the dataset.
     __init__ N/A N/A self reactor control_service timeout N/A 10 N/A N/A N/A self control_service control_service N/A N/A self reactor reactor N/A N/A self timeout timeout N/A N/A self nodes None N/A N/A self dataset_node None N/A N/A self dataset_id N/A _create_dataset N/A N/A self node N/A N/A N/A 
        Creates a dataset in the node given.

        :param node: node where we want the dataset.

        :return: A ``Deferred`` that fires when the dataset has been created.

        :raise DatasetCreationTimeout: if the creation goes wrong.
         N/A N/A self dataset_node node N/A creating N/A N/A N/A self control_service create_dataset primary N/A node uuid handle_timeout_and_errors N/A N/A failure N/A N/A N/A N/A N/A failure trap CancelledError N/A N/A DatasetCreationTimeout N/A N/A N/A timeout N/A self reactor creating N/A self timeout N/A N/A N/A creating addErrback handle_timeout_and_errors N/A creating N/A _get_dataset_node N/A N/A self nodes N/A N/A N/A 
        Selects the node where the dataset will be created.

        :param nodes: list of ``Node`` where we will chose one
            to create the dataset.

        :return: the selected ``Node``.
        :raise: ``NoNodesFound`` if the given list of nodes was empty.
         N/A N/A nodes N/A N/A N/A NoNodesFound N/A N/A N/A random choice nodes N/A _set_dataset_id N/A N/A self dataset N/A N/A N/A 
        Function to set the value of the dataset id once the dataset
        has been created.
        :param nodes: listed nodes.
         N/A N/A self dataset_id N/A dataset dataset_id N/A run_setup N/A N/A self N/A N/A N/A 
        Executes the setup and starts running the write scenario.

        :return: A ``Deferred`` that fires when the desired scenario is
            established (e.g. that a certain load is being applied).
         N/A d N/A N/A N/A self control_service list_nodes N/A N/A N/A d addCallback N/A self _get_dataset_node N/A N/A N/A d addCallback N/A self _create_dataset N/A N/A N/A d addCallback N/A self _set_dataset_id N/A d N/A make_request N/A N/A self N/A N/A N/A 
        Makes a single write request.
        It will try to move the dataset to the same location where it
        is right now, so no real changes will be made to the config.

        :return: A ``Deferred`` that fires when the dataset has been moved.

        :raise DatasetCreationTimeout: if there is no dataset to be moved.
         N/A N/A N/A self dataset_node None N/A N/A N/A DatasetCreationTimeout N/A N/A N/A N/A self control_service move_dataset N/A N/A self dataset_node uuid N/A self dataset_id N/A run_cleanup N/A N/A self N/A N/A N/A N/A N/A N/A self control_service delete_dataset N/A self dataset_id N/A N/A N/A implementer IRequest write_request_load_scenario N/A N/A reactor cluster request_rate sample_size timeout tolerance_percentage N/A 10 DEFAULT_SAMPLE_SIZE 45 0.2 N/A N/A 
    Factory that will initialise and return a scenario that places load on
    the cluster by performing write requests at a specified rate.

    :param reactor: Reactor to use.
    :param cluster: ``BenchmarkCluster` containing the control service.
    :param request_rate: The target number of requests per second.
    :param sample_size: The number of samples to collect when measuring
        the rate.
    :param timeout: Maximum time in seconds to wait for the requested
        rate to be reached.
    :param tolerance_percentage: error percentage in the rate that is
        considered valid. For example, if we request a ``request_rate``
        of 20, and we give a tolerance_percentage of 0.2 (20%), anything
        in [16,20] will be a valid rate.

    :return: a ``RequestLoadScenario`` initialised to be a write load
        scenario.
     N/A N/A RequestLoadScenario reactor N/A WriteRequest reactor N/A N/A cluster get_control_service reactor request_rate request_rate sample_size sample_size timeout timeout tolerance_percentage tolerance_percentage N/A