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

Transform metrics use handles #1401

Merged
merged 3 commits into from
Dec 22, 2023
Merged

Conversation

rukai
Copy link
Member

@rukai rukai commented Dec 21, 2023

Currently the chain registers metrics for all its transforms but then throws away the handles, requiring the transforms to access the metrics without the handles.
This currently works fine however there are two issues with this:

  • its a lot slower to access metrics without the handle, it was showing up in a profiler.
  • Its easy to forget to register the metric in the first place when working without handles. In fact thats exactly what had happened to the transform_pushed_* metrics.

This PR fixes those two issues by holding onto the handles and then using them later on for recording metrics.

After the change I can now see:

  • that we are spending less time in metrics code in the windsock samply profiler
  • A roughly 25% improvement in our transform/loopback micro benchmark introduced by add loopback microbenchmark #1402 (I had to alter it slightly to enable metrics otherwise the difference wont show up)

image

@rukai rukai force-pushed the transform_metrics_use_handles branch from 1efdffd to b30b26a Compare December 21, 2023 04:57
@rukai rukai force-pushed the transform_metrics_use_handles branch from b30b26a to d23107e Compare December 21, 2023 07:17
@rukai rukai requested a review from conorbros December 21, 2023 07:22
@rukai rukai merged commit 3f191fd into shotover:main Dec 22, 2023
40 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.

3 participants