Skip to content

Commit

Permalink
woops -- missing signals
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed May 17, 2023
1 parent 7a9a8ff commit c21744b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/fetch_crashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
for event in ["crash-panic", "crash-signal"]:
params = {
"properties": json.dumps(properties),
"event": "crash-panic",
"event": event,
"orderBy": '["-timestamp"]',
}
if args.date_after_included:
Expand Down Expand Up @@ -134,7 +134,9 @@ def count_uniques(backtrace):
for backtrace, props in backtraces:
n = count_uniques((backtrace, props))
event = "panic" if props[0]["event"] == "crash-panic" else "signal"
file_line = props[0]["file_line"]
file_line = props[0].get("file_line")
signal = props[0].get("signal")
title = file_line if file_line is not None else signal

timestamps = sorted(list(set([prop["timestamp"] for prop in props])))
first_occurrence = timestamps[0]
Expand All @@ -145,10 +147,10 @@ def count_uniques(backtrace):
rerun_versions = sorted(list(set([prop["rerun_version"] for prop in props])))

print(
f"## {n} {event} crash(es) in `{file_line}`\n"
f"## {n} {event} crash(es) in `{title}`\n"
"\n"
f"- First occurrence: {first_occurrence}\n"
f"- Last occurrence: {last_occurrence}\n"
f"- First occurrence: `{first_occurrence}`\n"
f"- Last occurrence: `{last_occurrence}`\n"
f"- Affected Rust versions: `{rust_versions}`\n"
f"- Affected Rerun versions: `{rerun_versions}`\n"
f"- Affected Targets: `{targets}`\n"
Expand Down

0 comments on commit c21744b

Please sign in to comment.