From 1c14b581d2762bacf6137726526b6b6150da593f Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Thu, 20 Jun 2019 13:10:58 +0200 Subject: [PATCH] Repair and disable failing benchmarks Our current query pipeline makes some benchmarks fail. Unfortunately the ASP.NET perf lab currently ignores the entire benchmark suite if any benchmark fails, so disabled those benchmarks for now. Also modified benchmarks to access int rather decimal (the latter is limited on Sqlite). --- benchmark/Shared.EFCore/Query/RawSqlQueryTests.cs | 2 +- benchmark/Shared.EFCore/Query/SimpleQueryTests.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/benchmark/Shared.EFCore/Query/RawSqlQueryTests.cs b/benchmark/Shared.EFCore/Query/RawSqlQueryTests.cs index e0c7e1ba37c..99ed304dba0 100644 --- a/benchmark/Shared.EFCore/Query/RawSqlQueryTests.cs +++ b/benchmark/Shared.EFCore/Query/RawSqlQueryTests.cs @@ -95,7 +95,7 @@ public virtual async Task SelectComposed() var query = _context.Products .FromSqlRaw(@"SELECT * FROM ""Products""") .ApplyTracking(Tracking) - .Where(p => p.CurrentPrice >= 10 && p.CurrentPrice <= 14) + .Where(p => p.ActualStockLevel >= 2 && p.ActualStockLevel <= 6) .OrderBy(p => p.Name); if (Async) diff --git a/benchmark/Shared.EFCore/Query/SimpleQueryTests.cs b/benchmark/Shared.EFCore/Query/SimpleQueryTests.cs index 8c32baba2c6..ee10e9e9316 100644 --- a/benchmark/Shared.EFCore/Query/SimpleQueryTests.cs +++ b/benchmark/Shared.EFCore/Query/SimpleQueryTests.cs @@ -65,7 +65,7 @@ public virtual async Task Where() { var query = _context.Products .ApplyTracking(Tracking) - .Where(p => p.Retail < 15); + .Where(p => p.ActualStockLevel < 5); if (Async) { @@ -82,7 +82,7 @@ public virtual async Task OrderBy() { var query = _context.Products .ApplyTracking(Tracking) - .OrderBy(p => p.Retail); + .OrderBy(p => p.ActualStockLevel); if (Async) { @@ -128,15 +128,16 @@ public virtual async Task SkipTake() } } - [Benchmark] + // Disabled because of current state of query pipeline + // [Benchmark] public virtual async Task GroupBy() { var query = _context.Products - .GroupBy(p => p.Retail) + .GroupBy(p => p.ActualStockLevel) .Select( g => new { - Retail = g.Key, + ActualStockLevel = g.Key, Products = g });