зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-08 16:35:49 +03:00
fix bench suite names
Этот коммит содержится в:
@@ -63,21 +63,25 @@ fn random_lorem(repeat: usize) -> usize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn append(c: &mut Criterion) {
|
fn append(c: &mut Criterion) {
|
||||||
c.bench_function("append::1_lorem", |b| b.iter(|| black_box(append_lorem(1))));
|
c.bench_function("insert::append::1_lorem", |b| {
|
||||||
c.bench_function("append::10_lorem", |b| {
|
b.iter(|| black_box(append_lorem(1)))
|
||||||
|
});
|
||||||
|
c.bench_function("insert::append::10_lorem", |b| {
|
||||||
b.iter(|| black_box(append_lorem(10)))
|
b.iter(|| black_box(append_lorem(10)))
|
||||||
});
|
});
|
||||||
c.bench_function("append::50_lorem", |b| {
|
c.bench_function("insert::append::50_lorem", |b| {
|
||||||
b.iter(|| black_box(append_lorem(50)))
|
b.iter(|| black_box(append_lorem(50)))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn random(c: &mut Criterion) {
|
fn random(c: &mut Criterion) {
|
||||||
c.bench_function("random::1_lorem", |b| b.iter(|| black_box(random_lorem(1))));
|
c.bench_function("insert::random::1_lorem", |b| {
|
||||||
c.bench_function("random::10_lorem", |b| {
|
b.iter(|| black_box(random_lorem(1)))
|
||||||
|
});
|
||||||
|
c.bench_function("insert::random::10_lorem", |b| {
|
||||||
b.iter(|| black_box(random_lorem(10)))
|
b.iter(|| black_box(random_lorem(10)))
|
||||||
});
|
});
|
||||||
c.bench_function("random::50_lorem", |b| {
|
c.bench_function("insert::random::50_lorem", |b| {
|
||||||
b.iter(|| black_box(random_lorem(50)))
|
b.iter(|| black_box(random_lorem(50)))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user