summaryrefslogtreecommitdiffstats
path: root/benches
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-04-12 13:10:31 -0400
committerMatan Kushner <hello@matchai.me>2019-04-12 13:10:31 -0400
commitab9ba27231c59ddfdb0b51b073835cc7d0849f80 (patch)
treeb9f1d731f8cceb21dee8220cf98773c9faaac819 /benches
parent99bdf27ecac655b54b03d7389b1b24970a1ec9ec (diff)
Revert "Parallelize nodejs file checks"
Diffstat (limited to 'benches')
-rw-r--r--benches/benchmarks.rs38
1 files changed, 7 insertions, 31 deletions
diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs
index 94960d26f..beb7eede7 100644
--- a/benches/benchmarks.rs
+++ b/benches/benchmarks.rs
@@ -8,61 +8,37 @@ mod tests {
use starship::{modules, print};
use test::Bencher;
- // #[bench]
- // fn full_prompt_bench(b: &mut Bencher) {
- // b.iter(|| {
- // let args = App::new("starship")
- // .arg(Arg::with_name("status_code"))
- // .get_matches_from(vec!["starship", "0"]);
-
- // starship::print::prompt(args)
- // });
- // }
-
#[bench]
- fn char_section_bench(b: &mut Bencher) {
+ fn full_prompt_bench(b: &mut Bencher) {
b.iter(|| {
let args = App::new("starship")
.arg(Arg::with_name("status_code"))
.get_matches_from(vec!["starship", "0"]);
- let segment = modules::handle("char", &args);
- print::stringify_segment(segment)
+ starship::print::prompt(args)
});
}
#[bench]
- fn dir_section_bench(b: &mut Bencher) {
- b.iter(|| {
- let args = App::new("starship")
- .arg(Arg::with_name("status_code"))
- .get_matches_from(vec!["starship", "0"]);
-
- let segment = modules::handle("dir", &args);
- print::stringify_segment(segment)
- });
- }
-
- #[bench]
- fn line_break_section_bench(b: &mut Bencher) {
+ fn char_section_bench(b: &mut Bencher) {
b.iter(|| {
let args = App::new("starship")
.arg(Arg::with_name("status_code"))
.get_matches_from(vec!["starship", "0"]);
- let segment = modules::handle("line_break", &args);
+ let segment = modules::handle("char", &args);
print::stringify_segment(segment)
});
}
- #[bench]
- fn nodejs_section_bench(b: &mut Bencher) {
+ #[bench]
+ fn dir_section_bench(b: &mut Bencher) {
b.iter(|| {
let args = App::new("starship")
.arg(Arg::with_name("status_code"))
.get_matches_from(vec!["starship", "0"]);
- let segment = modules::handle("nodejs", &args);
+ let segment = modules::handle("dir", &args);
print::stringify_segment(segment)
});
}