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

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: Seperate --date argument. 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 from crash_queries import crash_iterator
6
7 CRASH_INFO_FIELDS = ['signature', 'platform']
8
9
10 def PrintCrashInfo(crash):
11 print '\nCrash %s' % crash['id']
12 for crash_info_field in CRASH_INFO_FIELDS:
13 print '%s: %s' % (crash_info_field, crash[crash_info_field])
14
15
16 def CrashPrinter(client_id,
17 start_date, end_date,
18 print_func=PrintCrashInfo,
19 app_id=None):
20 for crash in crash_iterator.IterateCrashes(client_id,
21 fields=CRASH_INFO_FIELDS,
22 start_date=start_date,
23 end_date=end_date,
24 app_id=app_id):
25 print_func(crash)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698