Fix benches linting

This commit is contained in:
tyranron 2022-12-18 18:40:15 +01:00
parent d21cc68933
commit 4737622052
No known key found for this signature in database
GPG key ID: 762E144FB230A4F0

View file

@ -31,9 +31,7 @@ fn bench_sync_vs_async_users_flat_instant(c: &mut Criterion) {
let mut group = c.benchmark_group("Sync vs Async - Users Flat - Instant");
for count in [1, 10] {
group.bench_function(BenchmarkId::new("Sync", count), |b| {
let ids = (0..count)
.map(|x| InputValue::scalar(x as i32))
.collect::<Vec<_>>();
let ids = (0..count).map(InputValue::scalar).collect::<Vec<_>>();
let ids = InputValue::list(ids);
b.iter(|| {
j::execute_sync(
@ -48,9 +46,7 @@ fn bench_sync_vs_async_users_flat_instant(c: &mut Criterion) {
.build()
.unwrap();
let ids = (0..count)
.map(|x| InputValue::scalar(x as i32))
.collect::<Vec<_>>();
let ids = (0..count).map(InputValue::scalar).collect::<Vec<_>>();
let ids = InputValue::list(ids);
b.iter(|| {
@ -65,9 +61,7 @@ fn bench_sync_vs_async_users_flat_instant(c: &mut Criterion) {
group.bench_function(BenchmarkId::new("Async - Threadpool", count), |b| {
let rt = tokio::runtime::Builder::new_multi_thread().build().unwrap();
let ids = (0..count)
.map(|x| InputValue::scalar(x as i32))
.collect::<Vec<_>>();
let ids = (0..count).map(InputValue::scalar).collect::<Vec<_>>();
let ids = InputValue::list(ids);
b.iter(|| {