/target
files/site/build
+files/bench_site/build
[[bench]]
name = "build_metafile"
harness = false
+
+[[bench]]
+name = "build_dir"
+harness = false
--- /dev/null
+use criterion::{black_box, criterion_group, criterion_main, Criterion};
+
+pub fn build_dir(c: &mut Criterion) {
+ let dir = std::path::PathBuf::from("files/bench_site")
+ .canonicalize()
+ .unwrap();
+
+ let mut opts = metaforge::Options::new();
+ opts.root = dir.clone();
+ opts.source = dir.join("source");
+ opts.build = dir.join("build");
+ opts.pattern = dir.join("pattern");
+ opts.clean = true;
+
+ c.bench_function("build benchmark directory", |b| {
+ if opts.build.exists() {
+ std::fs::remove_dir_all(&opts.build).expect("clean build dir");
+ }
+
+ std::fs::create_dir(&opts.build).expect("create build dir");
+ b.iter(|| metaforge::build_dir(black_box(&opts)).unwrap())
+ });
+}
+
+criterion_group! {
+ name = benches;
+ config = Criterion::default().sample_size(10);
+ targets = build_dir
+}
+
+criterion_main!(benches);
c.bench_function("build benchmark file", |b| {
b.iter(|| {
let string = std::fs::read_to_string(black_box(&source)).expect("read file");
- let file = metaforge::parse_file(string, black_box(&opts)).expect("parse file");
+ let mut file = metaforge::parse_file(string, black_box(&opts)).expect("parse file");
+ file.path = black_box(source.clone());
let string = metaforge::build_metafile(&file).expect("build file");
metaforge::write_file(black_box(&source), string, black_box(&opts))
.expect("write file");
});
}
-criterion_group!(benches, build_file_benchmark);
+criterion_group! {
+ name = benches;
+ config = Criterion::default().sample_size(10);
+ targets = build_file_benchmark
+}
+
criterion_main!(benches);
--- /dev/null
+<html>
+ &{benchmark}
+</html>
--- /dev/null
+<body>
+ &{benchmark.array}
+ ${variable}
+ &{SOURCE}
+</body>
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
--- /dev/null
+${ variable = "GOOD" }
+
+@{ benchmark.array.item = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] }
+
+# BENCHMARK
+
+Testing a lot of pages as a benchmark
use crate::{build_metafile, parse_file, write_file, Options};
-use color_eyre::{eyre::eyre, Result};
+use color_eyre::{
+ eyre::{bail, eyre},
+ Result,
+};
use std::collections::HashMap;
use std::{fs, path::PathBuf};
impl<'a> MetaFile<'a> {
pub fn build(path: PathBuf, opts: &'a Options) -> Result<Self> {
- let str = fs::read_to_string(&path)?;
+ let str = match fs::read_to_string(&path) {
+ Ok(str) => str,
+ Err(_) => bail!("{} does not exist", path.display()),
+ };
let mut metafile = parse_file(str, opts)?;
metafile.path = path;
Ok(metafile)
.unwrap_or_default();
Ok(name)
} else {
- color_eyre::eyre::bail!("could not get name from: {}", self.path.display());
+ color_eyre::eyre::bail!("could not get name from: {:#?}", self);
}
}