Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2495)

Unified Diff: appengine/findit/crash/detect_regression_range.py

Issue 2378133004: [Findit] Rerun if the regression range is different. (Closed)
Patch Set: Fix nits. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/crash/crash_pipeline.py ('k') | appengine/findit/crash/findit_for_chromecrash.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/detect_regression_range.py
diff --git a/appengine/findit/crash/detect_regression_range.py b/appengine/findit/crash/detect_regression_range.py
index a35530f8bb680ce02c4e365b23d219b37e42c3f9..a4be19a87cd70faf7fae09953f76bdc48cb6edc2 100644
--- a/appengine/findit/crash/detect_regression_range.py
+++ b/appengine/findit/crash/detect_regression_range.py
@@ -21,7 +21,7 @@ _SPIKINESS_THRESHOLD = 20
def GetSpikes(events, get_value, alpha=_DEFAULT_ALPHA,
threshold=_SPIKINESS_THRESHOLD):
"""Given a time series, detect regression ranges for anomalous spikes.
-
+
The time series is represented by a list of "events" together with
a function for computing the "value" of each event. We assume the
events are given in order, and the only thing we care about them is
@@ -30,7 +30,7 @@ def GetSpikes(events, get_value, alpha=_DEFAULT_ALPHA,
to the values we've seen previously), then we produce a tuple of the
events bracketing the spike. Since there can be many spikes, we return
a list of these tuples.
-
+
The model we use for detecting spikes is exponential smoothing. This
model is based on the running average of the events' values, and it has
two parameters: the alpha parameter determines how readily we update
@@ -44,7 +44,7 @@ def GetSpikes(events, get_value, alpha=_DEFAULT_ALPHA,
then we'll need to adjust the threshold to try and filter that noise
out). However, based on some preliminary tests, this naive model seems
to be good enough for our particular task.
-
+
Args:
events (list): A list of objects representing "events" in a time
series. The events themselves can be any sort of object (including
@@ -131,4 +131,3 @@ def DetectRegressionRange(historic_metadata, max_win_size=_MAXIMUM_WINDOW_SIZE):
# Only return the last/most-recent regression range.
last_good, first_bad = spikes[-1]
return last_good['chrome_version'], first_bad['chrome_version']
-
« no previous file with comments | « appengine/findit/crash/crash_pipeline.py ('k') | appengine/findit/crash/findit_for_chromecrash.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698