Skip to content

Instantly share code, notes, and snippets.

@chutten
Last active August 2, 2016 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chutten/18c2381855e05a2b6c7e3fe924bd2ada to your computer and use it in GitHub Desktop.
Save chutten/18c2381855e05a2b6c7e3fe924bd2ada to your computer and use it in GitHub Desktop.
e10s_release
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
# ### e10sCohort from main pings on Release
#
# Or, "How many people on release-48 were running e10s when last we heard from them?"
# In[1]:
import ujson as json
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import plotly.plotly as py
from plotly.graph_objs import *
from moztelemetry import get_pings, get_pings_properties, get_one_ping_per_client, get_clients_history, get_records
get_ipython().magic(u'pylab inline')
# In[2]:
sc.defaultParallelism
# In[3]:
pings = get_pings(sc, app="Firefox", channel="release", version="48.0", fraction=1, doc_type="main")
# In[4]:
subset = get_pings_properties(pings, ["clientId",
"environment/settings/e10sCohort",
])
# In[5]:
subset = get_one_ping_per_client(subset)
# In[6]:
subset_count = subset.count()
subset_count
# In[7]:
counts = subset.map(lambda p: (p["environment/settings/e10sCohort"], p)).countByKey()
counts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment