diff options
| author | Alex M. M <[email protected]> | 2018-06-04 21:13:12 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-06-04 21:13:12 +0200 |
| commit | ff9edc063fd987b9ba14c8d211ed26f6b480f751 (patch) | |
| tree | c33a60efe0b2240acd3c9c3a2c15087abf3767f3 /benches | |
| parent | Update the voice example to join the channel the user is in (#325) (diff) | |
| download | serenity-ff9edc063fd987b9ba14c8d211ed26f6b480f751.tar.xz serenity-ff9edc063fd987b9ba14c8d211ed26f6b480f751.zip | |
Revamp `Args` from the ground-up (#326)
Diffstat (limited to 'benches')
| -rw-r--r-- | benches/bench_args.rs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/benches/bench_args.rs b/benches/bench_args.rs index c870294..da05c4e 100644 --- a/benches/bench_args.rs +++ b/benches/bench_args.rs @@ -49,56 +49,6 @@ mod benches { } #[bench] - fn len_with_one_delimiter(b: &mut Bencher) { - b.iter(|| { - let mut args = Args::new("1,2,3,4,5,6,7,8,9,10,11,12,13,14", &[",".to_string()]); - args.len(); - }) - } - - #[bench] - fn double_len_with_one_delimiter(b: &mut Bencher) { - b.iter(|| { - let mut args = Args::new("1,2,3,4,5,6,7,8,9,10,11,12,13,14", &[",".to_string()]); - args.len(); - args.len(); - }) - } - - #[bench] - fn double_len_quoted_with_one_delimiter(b: &mut Bencher) { - b.iter(|| { - let mut args = Args::new(r#""a" "a" "a" "a" "a" "a" "a" "a" "a" "a""#, &[" ".to_string()]); - args.len_quoted(); - args.len_quoted(); - }) - } - - #[bench] - fn len_with_three_delimiter(b: &mut Bencher) { - b.iter(|| { - let mut args = Args::new("1,2,3,4@5,6,7@8,9,10@11,12#13,14", &[",".to_string(), "@".to_string(), "#".to_string()]); - args.len(); - }) - } - - #[bench] - fn len_quoted_with_one_delimiter(b: &mut Bencher) { - b.iter(|| { - let mut args = Args::new(r#""1","2","3","4","5","6","7","8","9","10""#, &[",".to_string()]); - args.len(); - }) - } - - #[bench] - fn len_quoted_with_three_delimiter(b: &mut Bencher) { - b.iter(|| { - let mut args = Args::new(r#""1"-"2"<"3","4","5","6","7"<"8","9"<"10""#, &[",".to_string(), "-".to_string(), "<".to_string()]); - args.len(); - }) - } - - #[bench] fn multiple_with_one_delimiter(b: &mut Bencher) { b.iter(|| { let args = Args::new("1,2,3,4,5,6,7,8,9,10", &[",".to_string()]); |