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

metrics: metrics_local: Remove key argument to optimize performance #3473

Merged
merged 1 commit into from Jul 30, 2021

Conversation

cosmo0920
Copy link
Contributor

Signed-off-by: Hiroshi Hatake hatake@calyptia.com

Which issue(s) this PR fixes:
Folows up #3440

What this PR does / why we need it:
This is because our use cases doesn't need key for distinguish plugins
and agents.
One of the use cases to specify plugin_id calling has a possibility to become the bottleneck for performance.
The reason is Kernel#instance_variable_defined? method is relatively
heavy operation.

Docs Changes:

No needed.

Release Note:

Same as title.

This is because our use cases doesn't need key for distinguish plugins
and agents.
One of the use cases to specify plugin_id calling has a possibility to become the bottleneck for performance.
The reason is Kernel#instance_variable_defined? method is relatively
heavy operation.

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
@cosmo0920 cosmo0920 requested review from ashie and kenhys July 28, 2021 07:20
@cosmo0920 cosmo0920 self-assigned this Jul 28, 2021
@kenhys
Copy link
Contributor

kenhys commented Jul 29, 2021

I was just curious about it, how much performance is improved by this PR?

@cosmo0920
Copy link
Contributor Author

I was just curious about it, how much performance is improved by this PR?

For synchronous output plugin case, 2x faster than the previous implementation.
For buffered/asynchronous buffered case, 10% faster at the maximum which depends on batch operation frequency, I think.

@cosmo0920 cosmo0920 merged commit 7671d77 into fluent:master Jul 30, 2021
@cosmo0920 cosmo0920 deleted the optimize-metrics-plugins branch July 30, 2021 01:28
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.

None yet

3 participants