-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add a Binary format to store test aggregates #51
Conversation
8432c94
to
bad2ad5
Compare
833ab8f
to
24806c1
Compare
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
==========================================
+ Coverage 88.68% 94.31% +5.63%
==========================================
Files 5 14 +9
Lines 707 1900 +1193
==========================================
+ Hits 627 1792 +1165
- Misses 80 108 +28 ☔ View full report in Codecov by Sentry. |
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
24806c1
to
4282b18
Compare
I believe this should be feature complete now. |
"commits_where_fail":test.commits_where_fail, | ||
"last_duration":test.last_duration,# TODO | ||
} | ||
print(test_dict) |
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.
should we do some kind of assert to sanity-check the output
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.
left 1 comment about the use of unsafe, but at a high level this lgtm
i generally agree that there should be more testing done though
(note so i don't forget)
i think we're going to have to add more features:
- filtering by testsuite name
- filtering by name
let format = TestAnalytics::parse(&buffer, timestamp)?; | ||
// SAFETY: the lifetime of `TestAnalytics` depends on `buffer`, | ||
// which we do not mutate, and which outlives the parsed format. | ||
let format = unsafe { transmute::<TestAnalytics<'_>, TestAnalytics<'_>>(format) }; |
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.
just to make sure i understand: the transmute here is saying "whatever the lifetime of format is now, change it such that it satisfies the lifetime we would need for the compiler to be happy"
also, just because i'm curious, is there an alternative to storing the buffer in the struct alongside a data structure that holds references to it?
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.
also, just because i'm curious, is there an alternative to storing the buffer in the struct alongside a data structure that holds references to it?
The alternative would be to use a reference with a lifetime :-)
Though that is not allowed in pyo3 bindings, so we have to use self-contained, and thus self-referential data. Which is currently not possible in safe Rust, and we work around that by using an unsafe transmute to essentially turn the lifetime into 'static
, meaning it essentially does not carry any lifetime anymore.
This defines a binary file format similar to the various cache formats we use in Symbolicator. The format contains various aggregations for a configurable number of days.
this would have been the case when opening a file with a future timestamp in the past
…nge when querying
411e84a
to
57bcd00
Compare
This defines a binary file format similar to the various cache formats we use in Symbolicator.
The format contains various aggregations for a configurable number of days.