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

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

Issue 2391823006: [Findit] Add iterator and crash_iterator for delta test (Closed)
Patch Set: Change wording in README. 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 argparse
6 from datetime import date
7 from datetime import timedelta
8 import os
9
10 from crash_queries.crash_printer import crash_printer
11
12 _DATETIME_FORMAT = '%Y-%m-%d'
13 _TODAY = date.today().strftime(_DATETIME_FORMAT)
14 _A_YEAR_AGO = (date.today() - timedelta(days=365)).strftime(_DATETIME_FORMAT)
15
16
17 if __name__ == '__main__':
18 argparser = argparse.ArgumentParser(
19 description='Print crashes.')
20
21 argparser.add_argument(
22 '--since',
23 default=_A_YEAR_AGO,
24 help=('Query data since this date (including this date). '
25 'Should be in YYYY-MM-DD format. E.g. 2015-09-31. '
26 'Defaults to a year ago.'))
27
28 argparser.add_argument(
29 '--until',
30 default=_TODAY,
lijeffrey 2016/10/20 15:35:46 nit: is there a reason you include the -c shortcut
Sharu Jiang 2016/10/20 20:38:21 Done.
31 help=('Query data until this date (not including this date). '
32 'Should be in YYYY-MM-DD format. E.g. 2015-09-31. '
33 'Defaults to today.'))
34
35 argparser.add_argument(
36 '--client',
37 '-c',
38 default='fracas',
39 help=('Possible values are: fracas, cracas, clusterfuzz. Right now, only '
40 'fracas is supported.'))
41
42 args = argparser.parse_args()
43
44 crash_printer.CrashPrinter(args.client, os.getenv('APP_ID'),
45 start_date=args.since, end_date=args.until)
OLDNEW
« no previous file with comments | « appengine/findit/util_scripts/crash_queries/crash_printer/crash_printer.py ('k') | appengine/findit/util_scripts/iterator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698