aboutsummaryrefslogtreecommitdiff
path: root/clap/benches/01_default.rs
diff options
context:
space:
mode:
Diffstat (limited to 'clap/benches/01_default.rs')
-rw-r--r--clap/benches/01_default.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/clap/benches/01_default.rs b/clap/benches/01_default.rs
new file mode 100644
index 0000000..24e619e
--- /dev/null
+++ b/clap/benches/01_default.rs
@@ -0,0 +1,18 @@
+#![feature(test)]
+
+extern crate clap;
+extern crate test;
+
+use clap::App;
+
+use test::Bencher;
+
+#[bench]
+fn build_app(b: &mut Bencher) {
+ b.iter(|| App::new("claptests"));
+}
+
+#[bench]
+fn parse_clean(b: &mut Bencher) {
+ b.iter(|| App::new("claptests").get_matches_from(vec![""]));
+}