question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.InvalidOperationException: Sequence contains more than one matching element after 0.11.4

See original GitHub issue

Using 0.11.4, benchmarks fail after they have completed running for this small sample application https://github.com/stevejgordon/BenchmarkAndSpanExample. Switching back to 0.11.3 these benchmarks seem to run without an issue.

In fact the error only occurs if I include the Orderer attribute:

[Orderer(SummaryOrderPolicy.FastestToSlowest)]

// AfterAll

Mean = 22.3183 ns, StdErr = 0.1006 ns (0.45%); N = 15, StdDev = 0.3894 ns
Min = 21.9206 ns, Q1 = 22.0534 ns, Median = 22.1235 ns, Q3 = 22.7455 ns, Max = 23.0723 ns
IQR = 0.6922 ns, LowerFence = 21.0151 ns, UpperFence = 23.7838 ns
ConfidenceInterval = [21.9020 ns; 22.7346 ns] (CI 99.9%), Margin = 0.4163 ns (1.87% of Mean)
Skewness = 0.88, Kurtosis = 2.12, MValue = 2

Unhandled Exception: System.InvalidOperationException: Sequence contains more than one matching element
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at BenchmarkDotNet.Reports.Summary.GetConfiguredOrdererOrDefaultOne(IEnumerable`1 configs)
   at BenchmarkDotNet.Reports.Summary..ctor(String title, ImmutableArray`1 reports, HostEnvironmentInfo hostEnvironmentInfo, String resultsDirectoryPath, TimeSpan totalTime, ImmutableArray`1 validationErrors)
   at BenchmarkDotNet.Running.BenchmarkRunnerClean.Run(BenchmarkRunInfo benchmarkRunInfo, Dictionary`2 buildResults, IResolver resolver, ILogger logger, List`1 artifactsToCleanup, String rootArtifactsFolderPath, StartedClock& runChronometer)
   at BenchmarkDotNet.Running.BenchmarkRunnerClean.Run(BenchmarkRunInfo[] benchmarkRunInfos)
   at BenchmarkDotNet.Running.BenchmarkRunner.RunWithDirtyAssemblyResolveHelper(Type type, IConfig config)
   at BenchmarkDotNet.Running.BenchmarkRunner.Run[T](IConfig config)
   at BenchmarkAndSpanExample.Program.Main(String[] args) in C:\Projects\Other\BenchmarkAndSpanExample\BenchmarkAndSpanExample\Program.cs:line 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
juniormayhecommented, May 25, 2019

Just updated to 0.11.5. Ordering tests are working fine and Sequence contains… message is gone

[RankColumn]
[Orderer(SummaryOrderPolicy.FastestToSlowest, MethodOrderPolicy.Declared)]
[MemoryDiagnoser]
public class YourBenchmarkClass { ... }

1reaction
AndreyAkinshincommented, Feb 18, 2019

@rikimaru0345,

Are there any estimates when 11.5 will be released?

I want to release it soon, but I don’t have any estimates for now. Meanwhile, you can use 0.11.4.1015 from our nightly feed (it should be available as soon as this build is finished).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sequence contains more than one element - Stack Overflow
I want to update the salary fitment basic pays for each employee ID that do not match in the master table. (Changes in...
Read more >
Query compiler throws exception: "Sequence contains ...
The query compiler throws an exception. System.InvalidOperationException: Sequence contains more than one element at System.Linq.Enumerable.
Read more >
"Sequence contains more than one matching element" error ...
InvalidOperationException : Sequence contains more than one matching element at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 ...
Read more >
NET6 exception on Linq queries with EntityFramework 5
QueryableMethods' threw an exception. ---> System.InvalidOperationException: Sequence contains more than one matching element at System.Linq.
Read more >
.Net 6 Upgrade - Microsoft Q&A
EnumerableMethods' threw an exception.' InvalidOperationException: Sequence contains more than one matching element. We have used a few ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found