Skip to content

Instantly share code, notes, and snippets.

@ddurst
Created May 22, 2017 21:06
Show Gist options
  • Save ddurst/660759d11d4d4e883ef6c32fac2e8a18 to your computer and use it in GitHub Desktop.
Save ddurst/660759d11d4d4e883ef6c32fac2e8a18 to your computer and use it in GitHub Desktop.
Plugin Safety addon ping count
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# coding: utf-8
# In[1]:
from moztelemetry import get_pings_properties
from moztelemetry import Dataset
start_date_str = '20170504'
pings = Dataset.from_source("telemetry") .where(docType='flash_shield_study') .where(submissionDate=lambda b: (b == start_date_str or b > start_date_str)) .where(appUpdateChannel="release") .records(sc, sample=1.0)
pings_props = get_pings_properties(pings, ["payload/clientID", "payload/version"])
(pings_props
# .filter(lambda p: p['payload/version'] == 1)
.groupBy(lambda p: p['payload/clientID'])
.count()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment