Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
One day of beta crash pings and their display versions
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[7]:
from moztelemetry import get_pings_properties, get_one_ping_per_client
from moztelemetry.dataset import Dataset
import csv
import json
# In[2]:
Dataset.from_source("telemetry").schema
sc.defaultParallelism
# In[25]:
pings = Dataset.from_source("telemetry") .select( displayVersion='application.displayVersion',
pingSenderVersion='meta."X-PingSender-Version"',
processType='payload.processType',
osName='environment.system.os.name') \
.where(docType='crash') \
.where(submissionDate="20180401") \
.where(appUpdateChannel="beta") \
.records(sc)
# In[26]:
versions = {}
pingsender_versions = set()
for p in pings.collect():
pingsender_version = p['pingSenderVersion'] or 'none'
osname = p['osName']
version = str(p['displayVersion']) + '/' + pingsender_version
if p['processType'] != 'main':
continue
if not versions.get(osname):
versions[osname] = {}
if not versions[osname].get(version):
versions[osname][version] = 0
versions[osname][version] += 1
print json.dumps(versions, sort_keys=True,
indent=4, separators=(',', ': '))
# In[ ]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.