Last active
August 29, 2015 14:00
-
-
Save fujiwara/11133534 to your computer and use it in GitHub Desktop.
benchmark of fluent-plugin-parser time_parse cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
start = Time.now | |
`cat access.log.ltsv | fluent-agent-lite accesslog - 127.0.0.1` | |
puts "elapsed #{(Time.now - start)*1000} ms" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<source> | |
type forward | |
</source> | |
<match accesslog> | |
type parser | |
tag parsed | |
format ltsv | |
key_name message | |
</match> | |
<match parsed> | |
type stdout | |
</match> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ fluentd -c fluentd.conf > /dev/null & | |
$ wc -l access.log.ltsv | |
10000 access.log.ltsv | |
$ ruby bench.rb # plugin-parser 0.3.2 | |
elapsed 8822.374 ms | |
$ ruby bench.rb # plugin-parser 0.3.2 + cache | |
elapsed 2817.758 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment