[go: up one dir, main page]

lipsum 0.3.0

Lipsum is a lorem ipsum text generation library. Use this if you need some filler text for your application. The text is generated using a simple Markov chain, which you can also instantiate to generate your own pieces of pseudo-random text.
Documentation
#![feature(test)]

extern crate test;
extern crate lipsum;

use test::Bencher;


#[bench]
fn learn_lorem_ipsum(b: &mut Bencher) {
    b.iter(|| {
               let mut chain = lipsum::MarkovChain::new();
               chain.learn(lipsum::LOREM_IPSUM)
           })
}

#[bench]
fn learn_liber_primus(b: &mut Bencher) {
    b.iter(|| {
               let mut chain = lipsum::MarkovChain::new();
               chain.learn(lipsum::LIBER_PRIMUS)
           })
}