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

Use config_section for filter_grep #1611

Merged
merged 3 commits into from
Jul 12, 2017

Conversation

okkez
Copy link
Contributor

@okkez okkez commented Jul 3, 2017

Users can use both regexpN and <regexp> section.
But regexpN displays deprecation warnings on boot.

Users can use both `regexpN` and `<regexp>` section.
But `regexpN` displays deprecation warnings on boot.
end
end

def filter(tag, time, record)
result = nil
begin
catch(:break_loop) do
@regexps.each do |key, regexp|
@regexps.each do |e|
Copy link
Member

Choose a reason for hiding this comment

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

This implementation is slow.
Transform @regexps into @_regexps is better.

okkez added 2 commits July 6, 2017 11:06
In previous verson:

    Rehearsal -------------------------------------------
    flat      0.080000   0.010000   0.090000 (  0.091635)
    section   0.100000   0.000000   0.100000 (  0.101266)
    ---------------------------------- total: 0.190000sec

                  user     system      total        real
    flat      0.080000   0.000000   0.080000 (  0.077353)
    section   0.100000   0.000000   0.100000 (  0.099207)

In this version:

    Rehearsal -------------------------------------------
    flat      0.080000   0.000000   0.080000 (  0.076263)
    section   0.070000   0.000000   0.070000 (  0.068805)
    ---------------------------------- total: 0.150000sec

                  user     system      total        real
    flat      0.060000   0.000000   0.060000 (  0.066826)
    section   0.070000   0.000000   0.070000 (  0.065660)
@repeatedly repeatedly merged commit 7619a58 into fluent:master Jul 12, 2017
@repeatedly
Copy link
Member

Thanks!

@okkez Could you backport this change to v0.12?

@okkez
Copy link
Contributor Author

okkez commented Jul 12, 2017

Sure. I will try it later.

okkez added a commit to okkez/fluentd that referenced this pull request Jul 13, 2017
Users can use both `regexpN` and `<regexp>` section.
But `regexpN` displays deprecation warnings on boot.

Backport fluent#1611
@okkez okkez deleted the use-config-section-for-filter-grep branch July 14, 2017 02:51
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.

2 participants