jmespath / jmespath.rs

Rust implementation of JMESPath, a query language for JSON
MIT License
133 stars 26 forks source link

Add code generation for benchmarks #10

Closed mtdowling closed 8 years ago

mtdowling commented 8 years ago

It would be nice to be able to code-gen the benchmarks from a list of expressions. The generated code would then create a normalized benchmark name for each of the following (where TESTNUMBER if the position in the list of expressions):

benches could then be generated from either a JSON file or a macro based DSL:

let benches = vec![
    add_bench!("foo", "{\"foo\":true}"),
    add_bench!("foo.bar.baz", "{\"foo\":{\"bar\":{\"baz\":\"bam\"}}}"),
    add_bench!("foo.bar.invalid", "{\"foo\":{\"bar\":{\"baz\":\"bam\"}}}"),
    // ...
];