formation 0.3.0

An opinionated SQL formatter.
1
2
3
4
5
6
7
8
9
10
11
12
13
use criterion::{criterion_group, criterion_main, Criterion};
use formation::format;

fn basic_formatting_benchmark(c: &mut Criterion) {
    let mut group = c.benchmark_group("Formation Formatting");
    let string = "SELECT * FROM bob WHERE 1 = 1";
    group.bench_function("formation::format", |b| {
        b.iter(|| format(string, false, 80));
    });
}

criterion_group!(benches, basic_formatting_benchmark);
criterion_main!(benches);