Skip to content
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

Don't crash when benchmark contains unknown metric #2985

Merged

Conversation

karkhaz
Copy link
Contributor

@karkhaz karkhaz commented Jan 26, 2024

Previously, the code assumed that all metrics of the benchmark results would be 'declared' in the "metrics" key of the parser output. This commit ensures that if a parser emits a benchmark containing a metric that hasn't been declared in the "metrics" key, that result is ignored and benchcomp does not crash.

Here's an example of a run where benchcomp crashes: https://github.com/diffblue/cbmc/actions/runs/7664661164/job/20889308681?pr=8171

Resolves N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Previously, the code assumed that all metrics of the benchmark results
would be 'declared' in the "metrics" key of the parser output. This
commit ensures that if a parser emits a benchmark containing a metric
that hasn't been declared in the "metrics" key, that result is ignored
and benchcomp does not crash.
@tautschnig tautschnig marked this pull request as ready for review February 1, 2024 09:05
@tautschnig tautschnig requested a review from a team as a code owner February 1, 2024 09:05
Copy link
Member

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Experiments confirmed that this works as intended.

@tautschnig tautschnig enabled auto-merge (squash) February 1, 2024 09:06
@tautschnig tautschnig merged commit e09993b into model-checking:main Feb 1, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants