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 Dexterp37/6cbb85fdff83c6c5903af7962fd13647 to your computer and use it in GitHub Desktop.
Save Dexterp37/6cbb85fdff83c6c5903af7962fd13647 to your computer and use it in GitHub Desktop.
Bug 1274975 - Validate moving the clientId loading earlier during startup
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]:
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