Skip to content

Commit

Permalink
Add missing reference material on report-splitting (#652)
Browse files Browse the repository at this point in the history
Adds docstring for `get_reports`, add more `@docs`.
  • Loading branch information
timholy authored Aug 22, 2024
1 parent 68dea56 commit ff5bcd0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/optanalysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ JET.@test_opt
JET.test_opt
```

### [Splitting and filtering reports](@id optanalysis-splitting)

The output of `JET.@report_opt` can be split into individual failures for integration with tools like Cthulhu:
```@docs
JET.get_reports
JET.reportkey
```

### [Top-level Entry Points](@id optanalysis-toplevel-entry)

By default, JET doesn't offer top-level entry points for the optimization analysis, because it's usually used for only a
Expand Down
6 changes: 6 additions & 0 deletions src/JET.jl
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ function get_result(result::JETCallResult)
return result.result.result
end
end

"""
rpts = JET.get_reports(result::JETCallResult)
Split `result` into a vector of reports, one per issue.
"""
function get_reports(result::JETCallResult)
reports = get_reports(result.analyzer, result.result)
return configured_reports(reports; result.jetconfigs...)
Expand Down

0 comments on commit ff5bcd0

Please sign in to comment.