-
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
base: main
Are you sure you want to change the base?
Conversation
8432c94
to
bad2ad5
Compare
73bad3a
to
5749cab
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.
this would have been the case when opening a file with a future timestamp in the past
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 85.34% 93.59% +8.24%
==========================================
Files 5 14 +9
Lines 587 1780 +1193
==========================================
+ Hits 501 1666 +1165
- Misses 86 114 +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?
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.