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

Side by Side Diff: appengine/findit/util_scripts/crash_queries/crash_printer/crash_printer.py

Issue 2391823006: [Findit] Add iterator and crash_iterator for delta test (Closed)
Patch Set: Update doc strings. 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import os
6 import sys
7
8 from crash_queries import crash_iterator
9
10 CRASH_INFO_FIELDS = ['signature', 'platform']
11
12
13 def PrintCrashInfo(crash):
14 print '\nCrash %s' % crash['id']
15 for crash_info_field in CRASH_INFO_FIELDS:
16 print '%s: %s' % (crash_info_field, crash[crash_info_field])
17
18
19 def CrashPrinter(client_id, app_id,
20 start_date, end_date,
21 print_func=PrintCrashInfo):
22 for crash in crash_iterator.IterateCrashes(client_id, app_id,
23 fields=CRASH_INFO_FIELDS,
24 start_date=start_date,
25 end_date=end_date):
26 print_func(crash)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698