Wemove benchmawks

pull/2/head
Isaac Mills 3 years ago
parent 42e74dbb5b
commit 52e6683ed1
No known key found for this signature in database
GPG Key ID: B67D7410F33A0F61

@ -1,5 +1,3 @@
#![cfg_attr(test, feature(test))]
use indicatif::{ProgressBar, ProgressStyle}; use indicatif::{ProgressBar, ProgressStyle};
use linkify::{LinkFinder, LinkKind}; use linkify::{LinkFinder, LinkKind};
use rand::{Rng, RngCore, SeedableRng}; use rand::{Rng, RngCore, SeedableRng};
@ -212,23 +210,3 @@ impl<'a> UwUify<'a> {
}) })
} }
} }
#[cfg(test)]
mod tests {
extern crate test;
use linkify::{LinkFinder, LinkKind};
#[bench]
fn uwu_bench(b: &mut test::Bencher) {
let mut linkify = LinkFinder::new();
linkify.kinds(&[LinkKind::Email, LinkKind::Url]);
linkify.url_must_have_scheme(false);
let mut uwuify = super::UwUify {
text: include_str!("test.txt"),
linkify,
..Default::default()
};
b.iter(|| uwuify.uwuify());
}
}

@ -1,14 +0,0 @@
From fairest creatures we desire increase,
That thereby beauty's rose might never die,
But as the riper should by time decease,
His tender heir might bear his memory:
But thou contracted to thine own bright eyes,
Feed'st thy light's flame with self-substantial fuel,
Making a famine where abundance lies,
Thy self thy foe, to thy sweet self too cruel:
Thou that art now the world's fresh ornament,
And only herald to the gaudy spring,
Within thine own bud buriest thy content,
And tender churl mak'st waste in niggarding:
Pity the world, or else this glutton be,
To eat the world's due, by the grave and thee.
Loading…
Cancel
Save