using Abp; using Abp.Dependency; using Abp.Domain.Repositories; using Abp.Modules; using BenchmarkDotNet.Attributes; using SplashPage.EntityFrameworkCore; using SplashPage.Splash; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; namespace SplashPage.Benchmarks { [MemoryDiagnoser] [RankColumn] public class RepositoryBenchmarks { private readonly IRepository _repository; [Benchmark] public List GetAllActiveItems() { return _repository.GetAll() .Where(x => x.ManufacturerIsExcluded) .ToList(); } [Benchmark] public List GetPagedActiveItems() { return _repository.GetAll() .Where(x => x.ManufacturerIsExcluded) .OrderBy(x => x.Manufacturer) .Skip(0) .Take(50) .ToList(); } [Benchmark] public async Task> GetAllActiveItemsAsync() { return _repository.GetAll() .Where(x => x.ManufacturerIsExcluded) .ToList(); } } }