Skip to content

Instantly share code, notes, and snippets.

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 cpearce/00d26c4a00b0681e827014f408e2efd7 to your computer and use it in GitHub Desktop.
Save cpearce/00d26c4a00b0681e827014f408e2efd7 to your computer and use it in GitHub Desktop.
How many clients in WR study aren't reporting a set pref
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[17]:
import ujson as json
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from moztelemetry.dataset import Dataset
from moztelemetry import get_pings_properties, get_one_ping_per_client
get_ipython().magic(u'matplotlib inline')
Dataset.from_source('telemetry').schema
# In[18]:
pings = (
Dataset.from_source('telemetry')
.where(docType='main')
.where(submissionDate=lambda x: int(x) >= 20181010)
.where(appUpdateChannel="nightly")
.select(experiments='environment.experiments',
settings='environment.settings')
.records(sc, sample=1.0)
)
# In[19]:
pings_in_exp = pings.filter(lambda p: "experiments" in p and p["experiments"]).filter(lambda p: "prefflip-webrender-v1-2-1492568" in p["experiments"])
num_pings = pings_in_exp.count()
# In[20]:
num_pings
# In[21]:
pings_without_pref = pings_in_exp.filter(lambda p: 'gfx.webrender.all.qualified' not in p['settings']['userPrefs'])
num_pings_without_pref = pings_without_pref.count()
num_pings_without_pref
# In[22]:
float(num_pings_without_pref) / float(num_pings) * 100.0
# In[ ]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment