-
Notifications
You must be signed in to change notification settings - Fork 575
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
Pull out timing observations, more jsonable arguments #3834
Conversation
91dc8e6
to
6f95fc5
Compare
Hmm. With a bit of work on the internals, we could instead report the draw time for each argument, corresponding to the entries in the |
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.
pulling out timing data into its own key makes a lot of sense, and reporting per-argument draw times would be even better! In a perfect world I would love to observe the timings of every component strategy draw as well 🙂 (I mentioned as much to @hgoldstein95 in our interview).
Component strategy draws are hard, because we don't have human-readable labels. We could add compute and collect those, but we'd then have the problem that most component strategy draws are internals rather than a meaningful component in the user-facing API/mental model. I remain pretty nervous about introducing too much complexity, and improving life for maintainers and power users at the expense of novices. Splitting out per-argument timing is definitely doable though, and that is certainly easy to interpret. Keys |
4129640
to
f0037f5
Compare
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.
I'll be forced to get familiar with our reporting code at some point, but I'm not there yet, so consider this less of a code review and more of a "ensure I generally understand what's going on" review 🙂
That said, I'm on board with the design here and the choice of label names etc. 👍 just one comment about the layout of the reported draw timings.
count | fraction | slowest draws (seconds) | ||
a | 3 | 65% | -- -- -- 0.357, 2.000 | ||
b | 8 | 16% | 0.100, 0.100, 0.100, 0.111, 0.123 | ||
c | 3 | 8% | -- -- 0.030, 0.050, 0.200 | ||
i | 2 | 2% | -- -- -- -- 0.090 | ||
h | 1 | 2% | -- -- -- -- 0.080 | ||
(skipped 4 rows of fast draws)""" | ||
got = state.timing_report() | ||
print(got) | ||
assert expected == got |
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.
personally, I'd expect this to read left to right: slowest draws on the left, and fastest on the right. I have no scientific backing for this besides an opinion, though.
Plus a note in the docs inspired by discussion on tyche-pbt/tyche-extension#3.
Cc @hgoldstein95 for timing metadata per your email.
generate:{argname}
separately for each argument (and interactive draw). If we update the too_slow healthcheck message to include observability info (or suggest turning it on), this will fix Too-slow health check doesn't say what was too slow #434!