Skip to content

Port the current parser from regexp to ragel

Leandro Santiago requested to merge feature/parse_postfix_logs_with_ragel into master

This makes supporting more log lines easier to implement.

It adds the program ragel as a build dependency, so you can install it with your package manager and have the executable ragel on your path.

Current we support only two, but there might be up to 200 different log types in Postfix, although we probably won't support all of them, it's good to have a solid foundation for implement them.

Performance-wise, this MR causes a performance improvement of around 4x!

Old bench (master): BenchmarkParser-8 7932 244745 ns/op

New bench: BenchmarkParser-8 22540 59816 ns/op

This is some work that aims to make the implementation of #82 (closed) easier.

Edited by Leandro Santiago

Merge request reports