◆ __init__()
def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.__init__ | ( | self, | |
interval = 1200 ,
|
|||
requested_package_size = 10 ,
|
|||
cookie = None ,
|
|||
query_whitelist = [] ,
|
|||
header_blacklist = [] ,
|
|||
share_percentage = 1 ,
|
|||
endpoint = "https://devices-v4.51degrees.com/new.ashx"
|
|||
) |
Constructor for ShareUsage element.
@type interval: int
- Parameters
-
- interval - If exactly the same evidence values are seen multiple times within this time limit (in seconds) then they will only be shared once. @type requested_package_size: int
- requested_package_size - The usage element will group data into single requests before sending it. This setting controls the minimum number of entries before data is sent. If you are sharing large amounts of data, increasing this value is recommended in order to reduce the overhead of sending HTTP messages. For example, the 51Degrees cloud service uses a value of 2500. @type cookie: string
- cookie - If a cookie is being used to identify user sessions, it can be specified here in order to reduce the sharing of duplicated data. @type query_whitelist: list
- query_whitelist - By default query string and HTTP form parameters are not shared unless prefixed with '51D_'. If you need to share query string parameters, a list can be specified here. @type query_blacklist: list
- query_blacklist - By default, all HTTP headers (except a few, such as Cookies) are shared. Individual headers can be excluded from sharing by adding them to this list. @type share_percentage : float
- share_percentage - approximate proportion of requests to be shared. 1 = 100%, 0.5 = 50%, etc..
Member Function Documentation
◆ add_to_share_usage()
def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.add_to_share_usage ( self, data ) Internal method which adds to the share usage bundle (generating XML) @type key: dict.
- Parameters
-
- key - data value store of current evidence in FlowData
◆ get_data_from_evidence()
def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.get_data_from_evidence ( self, flow_data ) Creates a ShareUsageData instance populated from the evidence within the flow data provided.
- Parameters
-
- {FlowData} - flowData the flow data containing the evidence to use
- Returns
- a new ShareUsageData instance, populated from the evidence provided
◆ get_evidence_key_filter()
def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.get_evidence_key_filter ( self ) The share useage element comes with its own evidence key filter that uses the whitelists and blacklists to determine which evidence to share.
◆ process_internal()
def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.process_internal ( self, flow_data ) Internal process method which uses the ShareUsageTracker to determine whether to add usage data to a batch and adds it if necessary.
@type flow_data: FlowData
- Parameters
-
- flow_data - FlowData to process