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

Add execution measurement metrics to FilterChain #262

Merged
merged 1 commit into from
Jun 4, 2021
Merged

Conversation

XAMPPRocky
Copy link
Collaborator

@XAMPPRocky XAMPPRocky commented May 18, 2021

This PR adds a measure filter that accepts any filter and measure each of its operations. Since this is the first nested filter there were a couple of other changes needed.

  • ConcatBytes's filter and config are now public. This is in order to construct the filter statically in the tests. I think we should probably have these public for all filters so that they can be easily construct-able statically when using quilkin as a library.
  • FilterRegistry is now Arc<RwLock<HashMap<K, RwLock<V>> to make it concurrent safe and cheaply clone-able.
  • quilkin::run now accepts a closure that passes in a FilterRegistry, this is to allow you to construct filters like MeasureFactory which requires access to the FilterRegistry.

resolves #167

@XAMPPRocky XAMPPRocky requested review from markmandel and iffyio May 18, 2021 06:52
@google-cla google-cla bot added the cla: yes label May 18, 2021
Copy link
Collaborator

@jahrlin jahrlin left a comment

Choose a reason for hiding this comment

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

reviewing only Prom/metric related things, as I don't know Rust yet :)

will the metric names have a prefix? otherwise we should add one, see: https://prometheus.io/docs/practices/naming/#metric-names

src/extensions/filters/measure.rs Outdated Show resolved Hide resolved
src/extensions/filters/measure.rs Outdated Show resolved Hide resolved
src/extensions/filters/measure.rs Outdated Show resolved Hide resolved
@XAMPPRocky
Copy link
Collaborator Author

@jahrlin Thank you for the review! I'm very new to using prometheus so any pointers are appreciated. 😄

@XAMPPRocky XAMPPRocky force-pushed the measure branch 4 times, most recently from 20d10ef to 34fd6bc Compare May 18, 2021 10:05
@XAMPPRocky XAMPPRocky requested a review from jahrlin May 18, 2021 10:05
Copy link
Collaborator

@jahrlin jahrlin left a comment

Choose a reason for hiding this comment

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

metrics part LGTM!

@markmandel

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@XAMPPRocky

This comment has been minimized.

@XAMPPRocky XAMPPRocky force-pushed the measure branch 2 times, most recently from 2be1362 to 11976cc Compare May 19, 2021 06:38
@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@iffyio

This comment has been minimized.

@XAMPPRocky

This comment has been minimized.

@iffyio

This comment has been minimized.

@XAMPPRocky

This comment has been minimized.

@markmandel

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@XAMPPRocky XAMPPRocky force-pushed the measure branch 2 times, most recently from 2c96087 to aa3de69 Compare June 3, 2021 11:46
@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

Copy link
Collaborator

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM!

@XAMPPRocky XAMPPRocky force-pushed the measure branch 4 times, most recently from 37f9475 to 3cf0d77 Compare June 4, 2021 06:15
@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

Copy link
Collaborator

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

left some comments on the filter metrics documentation

docs/extensions/filters/filters.md Outdated Show resolved Hide resolved
docs/extensions/filters/filters.md Outdated Show resolved Hide resolved
docs/extensions/filters/filters.md Outdated Show resolved Hide resolved
@quilkin-bot

This comment has been minimized.

@quilkin-bot

This comment has been minimized.

@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: b91f91ae-f1f0-416b-855a-4b736bda6612

To build this version:

git fetch git@github.com:googleforgames/quilkin.git pull/262/head:pr_262 && git checkout pr_262
cargo build

@markmandel markmandel merged commit b98ac93 into main Jun 4, 2021
@markmandel markmandel deleted the measure branch June 4, 2021 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metrics: Packet processing time
5 participants