Skip to content

Commit

Permalink
Repair and disable failing benchmarks
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
roji committed Jun 20, 2019
1 parent 0bbb297 commit 1c14b58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benchmark/Shared.EFCore/Query/RawSqlQueryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 6 additions & 5 deletions benchmark/Shared.EFCore/Query/SimpleQueryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -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
});

Expand Down

0 comments on commit 1c14b58

Please sign in to comment.