New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Querying stack traces given a signature #16
Changes from 1 commit
4febd0b
6e64847
bb4f348
39347a0
6c88865
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,18 +68,19 @@ def get_stack_trace_from_crashid(crash_id): | |
|
||
|
||
def get_stack_traces_for_signature(fnames, signature): | ||
traces = set() | ||
traces = set() | ||
|
||
#query stack traces online | ||
url = 'https://crash-stats.mozilla.com/api/SuperSearch' | ||
params = { | ||
'signature': '=' + signature, | ||
'_columns': 'proto_signature' | ||
'_facets': ['proto_signature'], | ||
'_results_number' : 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PEP8: no spaces before |
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am trying using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The result will be in Also, you can add |
||
res = utils.get_with_retries(url, params) | ||
records = res.json()['hits'] | ||
for i in range(len(records)): | ||
traces.add(records[i]['proto_signature']) | ||
records = res.json()['facets']['proto_signature'] | ||
for record in records: | ||
traces.add(record['term']) | ||
|
||
#query stack traces from downloaded data | ||
for fname in fnames: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a parameter,
traces_num
, with a default of 100, and use it in the request with_facets_size
?