## -*- mode: python; coding: utf-8 -*-

## wlan retries

AGGREGATOR='timeseries'
TOTAL_LENGTH=LENGTH
DESCRIPTION="Capture wlan retries"
DEFAULTS={'PLOT': 'retries'}


DATA_SETS = o([
    ('retry_count',
     {'interval': STEP_SIZE,
      'length': LENGTH,
      'units': 'count',
      'filename': '/sys/kernel/debug/ieee80211/{}/statistics/retry_count'.format(TEST_PARAMETERS.get('phy', 'phy0')),
      'data_transform': 'cumulative_to_events',
      'runner': 'file_monitor',}),
    ('multiple_retry_count',
     {'interval': STEP_SIZE,
      'length': LENGTH,
      'units': 'count',
      'data_transform': 'cumulative_to_events',
      'filename': '/sys/kernel/debug/ieee80211/{}/statistics/multiple_retry_count'.format(TEST_PARAMETERS.get('phy', 'phy0')),
      'runner': 'file_monitor',}),
])

PLOTS = o([
    ('retries',
     {'description': 'Wlan retries',
      'type': 'timeseries',
      'axis_labels': ['Retries'],
      'series': [
          {'data': 'retry_count',
           'label': 'Retries',
           'linestyle': '',
           'marker': '.'},
          {'data': 'multiple_retry_count',
           'label': 'Multi-retries',
           'linestyle': '',
           'marker': 'x'},
      ]}),
])
