Created
July 6, 2016 10:21
-
-
Save Dexterp37/6cbb85fdff83c6c5903af7962fd13647 to your computer and use it in GitHub Desktop.
Bug 1274975 - Validate moving the clientId loading earlier during startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# In[1]: | |
import datetime as dt | |
import matplotlib.pyplot as plt | |
import ujson as json | |
import pandas as pd | |
import numpy as np | |
import copy as cp | |
from moztelemetry import get_pings, get_pings_properties, get_one_ping_per_client, get_clients_history | |
# ### How many crash pings with no client id the week before 1233986 landed? | |
# In[13]: | |
build_ids = ("20160622000000", "20160628999999") | |
submission_dates = ("20160622", "20160628") | |
crash_pings = get_pings(sc, | |
app="Firefox", | |
channel="nightly", | |
build_id=build_ids, | |
submission_date=submission_dates, | |
doc_type="crash", | |
schema="v4", | |
fraction=1.0) | |
# In[14]: | |
crash_pings_count = crash_pings.count() | |
crash_pings_count | |
# In[15]: | |
subset = get_pings_properties(crash_pings, ["meta/clientId", | |
"meta/submissionDate"]) | |
# In[16]: | |
crash_pings_no_clientid = subset.filter(lambda p: not p.get("meta/clientId", None)) | |
# In[17]: | |
no_clientid_count = crash_pings_no_clientid.count() | |
no_clientid_count | |
# ### How many crash pings with no client id the after 1233986 landed? | |
# In[18]: | |
build_ids = ("20160629000000", "20160705030222") | |
submission_dates = ("20160629", "20160706") | |
crash_pings = get_pings(sc, | |
app="Firefox", | |
channel="nightly", | |
build_id=build_ids, | |
submission_date=submission_dates, | |
doc_type="crash", | |
schema="v4", | |
fraction=1.0) | |
# In[19]: | |
crash_pings_count = crash_pings.count() | |
crash_pings_count | |
# In[20]: | |
subset = get_pings_properties(crash_pings, ["meta/clientId", | |
"meta/submissionDate"]) | |
# In[21]: | |
crash_pings_no_clientid = subset.filter(lambda p: not p.get("meta/clientId", None)) | |
# In[22]: | |
no_clientid_count = crash_pings_no_clientid.count() | |
no_clientid_count | |
# In[ ]: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment