#include "bench_framework.hpp" #include #include #include #include class test : public benchmark::test_case { std::string expr_; public: test(mapnik::parameters const& params) : test_case(params), expr_("([foo]=1)") {} bool validate() const { mapnik::expression_ptr expr = mapnik::parse_expression(expr_,"utf-8"); return mapnik::to_expression_string(*expr) == expr_; } void operator()() const { for (std::size_t i=0;i expr_grammar(tr); mapnik::expression_ptr expr = mapnik::parse_expression(expr_,expr_grammar); return mapnik::to_expression_string(*expr) == expr_; } void operator()() const { mapnik::transcoder tr("utf-8"); mapnik::expression_grammar expr_grammar(tr); for (std::size_t i=0;i