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

Unified Diff: appengine/findit/util_scripts/crash_queries/delta_test/delta_test.py

Issue 2432203003: [Predator] Run predator. (Closed)
Patch Set: . Created 4 years, 1 month 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
Index: appengine/findit/util_scripts/crash_queries/delta_test/delta_test.py
diff --git a/appengine/findit/util_scripts/crash_queries/delta_test/delta_test.py b/appengine/findit/util_scripts/crash_queries/delta_test/delta_test.py
index b4f4a6d13cc21f752202eade8cc4efab1c42f75f..d8e825c0abba6614d822f7e22fc38c40bffcf38e 100644
--- a/appengine/findit/util_scripts/crash_queries/delta_test/delta_test.py
+++ b/appengine/findit/util_scripts/crash_queries/delta_test/delta_test.py
@@ -11,9 +11,12 @@ import subprocess
from crash_queries import crash_iterator
from crash_queries.delta_test import delta_util
-AZALEA_RESULTS_DIRECTORY = os.path.join(os.path.dirname(__file__),
- 'azalea_results')
+PREDATOR_RESULTS_DIRECTORY = os.path.join(os.path.dirname(__file__),
+ 'predator_results')
DELTA_TEST_DIRECTORY = os.path.dirname(__file__)
+CRASH_FIELDS = ['crashed_version', 'stack_trace', 'signature',
+ 'platform', 'client_id', 'regression_range',
+ 'customized_data', 'historical_metadata']
class Delta(object):
@@ -103,12 +106,14 @@ def GetDeltasFromTwoSetsOfResults(set1, set2):
return deltas
-def GetResults(crashes, client_id, git_hash, result_path, verbose=False):
+def GetResults(crashes, client_id, app_id,
+ git_hash, result_path, verbose=False):
"""Returns an evaluator function to compute delta between 2 findit githashes.
Args:
crashes (list): A list of crash infos.
client_id (str): Possible values - fracas/cracas/clustefuzz.
+ app_id (str): Appengine app id to query.
git_hash (str): A git hash of findit repository.
result_path (str): file path for subprocess to write results on.
verbose (bool): If True, print all the findit results.
@@ -121,7 +126,7 @@ def GetResults(crashes, client_id, git_hash, result_path, verbose=False):
return {}
if verbose:
- logging.info('\n\n***************************')
+ logging.info('***************************')
logging.info('Switching to git %s', git_hash)
logging.info('***************************\n\n')
@@ -133,7 +138,7 @@ def GetResults(crashes, client_id, git_hash, result_path, verbose=False):
shell=True)
if not os.path.exists(result_path):
- args = ['python', 'run-predator.py', result_path, '--client', client_id]
+ args = ['python', 'run-predator.py', result_path, client_id, app_id]
if verbose:
args.append('--verbose')
p = subprocess.Popen(args, stdin=subprocess.PIPE)
@@ -185,6 +190,7 @@ def DeltaEvaluator(git_hash1, git_hash2,
crash_count = 0
for index, crashes in enumerate(
crash_iterator.IterateCrashes(client_id, app_id,
+ fields=CRASH_FIELDS,
property_values=property_values,
start_date=start_date,
end_date=end_date,
@@ -194,10 +200,11 @@ def DeltaEvaluator(git_hash1, git_hash2,
results = []
for git_hash in [git_hash1, git_hash2]:
result_path = os.path.join(
- AZALEA_RESULTS_DIRECTORY, delta_util.GenerateFileName(
+ PREDATOR_RESULTS_DIRECTORY, delta_util.GenerateFileName(
client_id, property_values, start_date, end_date,
batch_size, index, git_hash))
- results.append(GetResults(crashes, client_id, git_hash, result_path,
+ results.append(GetResults(crashes, client_id, app_id,
+ git_hash, result_path,
verbose=verbose))
crash_count += len(crashes)

Powered by Google App Engine
This is Rietveld 408576698