using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
-using System.Threading.Tasks;
using Xunit;
namespace System.Linq.Parallel.Tests
{
public static class DegreeOfParallelismTests
{
- // If ThreadPool becomes available, uncomment the below
- //private static ThreadPoolManager _poolManager = new ThreadPoolManager();
-
public static IEnumerable<object[]> DegreeData(int[] counts, int[] degrees)
{
foreach (object[] results in UnorderedSources.Ranges(counts.DefaultIfEmpty(Sources.OuterLoopCount), x => degrees.DefaultIfEmpty(x)))
}
[Theory]
- [MemberData(nameof(DegreeData), new[] { 1, 4, 32 }, new int[] { })]
+ [MemberData(nameof(DegreeData), new[] { 1, 4, 32 }, new int[] { /* same as count */ })]
[OuterLoop]
public static void DegreeOfParallelism_Barrier(Labeled<ParallelQuery<int>> labeled, int count, int degree)
{
- Barrier barrier = new Barrier(degree);
- //If ThreadPool becomes available, uncomment the below.
- //_poolManager.ReserveThreads(degree);
- //try
- //{
- Assert.Equal(Functions.SumRange(0, count), labeled.Item.WithDegreeOfParallelism(degree).Sum(x => { barrier.SignalAndWait(); return x; }));
- //}
- //finally
- //{
- // _poolManager.ReleaseThreads();
- //}
+ using (ThreadPoolHelpers.EnsureMinThreadsAtLeast(degree))
+ {
+ var barrier = new Barrier(degree);
+ Assert.Equal(Functions.SumRange(0, count), labeled.Item.WithDegreeOfParallelism(degree).Sum(x => { barrier.SignalAndWait(); return x; }));
+ }
}
[Theory]
- [MemberData(nameof(DegreeData), new int[] { /* Sources.OuterLoopCount */ }, new[] { 1, 4, 64, 512 })]
+ [MemberData(nameof(DegreeData), new int[] { /* Sources.OuterLoopCount */ }, new[] { 1, 4, 64, 128 })]
[OuterLoop]
public static void DegreeOfParallelism_Pipelining(Labeled<ParallelQuery<int>> labeled, int count, int degree)
{
- Assert.True(labeled.Item.WithDegreeOfParallelism(degree).Select(x => -x).OrderBy(x => x).SequenceEqual(ParallelEnumerable.Range(1 - count, count).AsOrdered()));
+ using (ThreadPoolHelpers.EnsureMinThreadsAtLeast(degree))
+ {
+ int expected = 1 - count;
+ foreach (int result in labeled.Item.WithDegreeOfParallelism(degree).Select(x => -x).OrderBy(x => x))
+ {
+ Assert.Equal(expected++, result);
+ }
+ }
}
[Theory]
- [MemberData(nameof(DegreeData), new[] { 1, 4 }, new int[] { })]
+ [MemberData(nameof(DegreeData), new[] { 1, 4 }, new int[] { /* same as count */ })]
[MemberData(nameof(DegreeData), new[] { 32 }, new[] { 4 })]
- // Without the ability to ask the thread pool to create a minimum number of threads ahead of time,
- // higher thread counts take a prohibitive amount of time spooling them up.
- //[MemberData(nameof(DegreeSourceData), new[] { 64, 512 }, new object[] { })]
[OuterLoop]
public static void DegreeOfParallelism_Throttled_Pipelining(Labeled<ParallelQuery<int>> labeled, int count, int degree)
{
- // If ThreadPool becomes available, uncomment the below.
- //_poolManager.ReserveThreads(degree);
- //try
- //{
- Assert.True(labeled.Item.WithDegreeOfParallelism(degree).Select(x => { Task.Delay(100).Wait(); return -x; }).OrderBy(x => x).SequenceEqual(ParallelEnumerable.Range(1 - count, count).AsOrdered()));
- //}
- //finally
- //{
- // _poolManager.ReleaseThreads();
- //}
+ using (ThreadPoolHelpers.EnsureMinThreadsAtLeast(degree))
+ {
+ Assert.True(labeled.Item.WithDegreeOfParallelism(degree).Select(x =>
+ {
+ var sw = new SpinWait();
+ while (!sw.NextSpinWillYield) sw.SpinOnce(); // brief spin to wait a small amount of time
+ return -x;
+ }).OrderBy(x => x).SequenceEqual(ParallelEnumerable.Range(1 - count, count).AsOrdered()));
+ }
}
[Theory]
- [MemberData(nameof(NotLoadBalancedDegreeData), new[] { 1, 4 }, new int[] { })]
+ [MemberData(nameof(NotLoadBalancedDegreeData), new[] { 1, 4 }, new int[] { /* same as count */ })]
[MemberData(nameof(NotLoadBalancedDegreeData), new[] { 32, 512, 1024 }, new[] { 4, 16 })]
[OuterLoop]
public static void DegreeOfParallelism_Aggregate_Accumulator(Labeled<ParallelQuery<int>> labeled, int count, int degree)
}
[Theory]
- [MemberData(nameof(NotLoadBalancedDegreeData), new[] { 1, 4 }, new int[] { })]
+ [MemberData(nameof(NotLoadBalancedDegreeData), new[] { 1, 4 }, new int[] { /* same as count */ })]
[MemberData(nameof(NotLoadBalancedDegreeData), new[] { 32, 512, 1024 }, new[] { 4, 16 })]
[OuterLoop]
public static void DegreeOfParallelism_Aggregate_SeedFunction(Labeled<ParallelQuery<int>> labeled, int count, int degree)
{
Assert.Throws<ArgumentNullException>("source", () => ((ParallelQuery<bool>)null).WithDegreeOfParallelism(2));
}
-
- // ThreadPool is not currently exposed.
- // When available, uncomment below to reserve threads (should help test run time).
- /*
- private class ThreadPoolManager
- {
- private int _minWorker;
- private int _minAsyncIO;
- private int _maxWorker;
- private int _maxAsyncIO;
-
- private object _switch = new object();
-
- public void ReserveThreads(int degree)
- {
- Monitor.Enter(_switch);
- ThreadPool.GetMinThreads(out _minWorker, out _minAsyncIO);
- ThreadPool.GetMaxThreads(out _maxWorker, out _maxAsyncIO);
- ThreadPool.SetMinThreads(degree, _minAsyncIO);
- }
-
- public void ReleaseThreads()
- {
- ThreadPool.SetMinThreads(_minWorker, _minAsyncIO);
- ThreadPool.SetMaxThreads(_maxWorker, _maxAsyncIO);
- Monitor.Exit(_switch);
- }
- }
- */
}
}
{
private const int KeyFactor = 4;
private const int GroupFactor = 8;
+ private const int LongRunningCount = 16 * 1024;
// Get ranges from 0 to each count. The data is random, seeded from the size of the range.
public static IEnumerable<object[]> OrderByRandomData(int[] counts)
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderBy_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderBy(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderBy_Reversed_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderBy_Reversed(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderByDescending_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderByDescending(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderByDescending_Reversed_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderByDescending_Reversed(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderBy_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderBy_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderBy_Reversed_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderBy_Reversed_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderByDescending_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderByDescending_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderByDescending_Reversed_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderByDescending_Reversed_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderBy_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderBy_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderByDescending_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderByDescending_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderBy_NotPipelined_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderBy_NotPipelined_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void OrderByDescending_NotPipelined_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
OrderByDescending_NotPipelined_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_Reversed_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy_Reversed(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_Reversed_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending_Reversed(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_Reversed_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy_Reversed_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_Reversed_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending_Reversed_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_NotPipelined_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy_NotPipelined_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_NotPipelined_CustomComparator_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending_NotPipelined_CustomComparer(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_ThenBy_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy_ThenBy(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_ThenByDescending_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending_ThenByDescending(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenBy_ThenBy_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenBy_ThenBy_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(OrderByRandomData), new[] { 1024, 1024 * 32 })]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(OrderByRandomData), new[] { LongRunningCount })]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void ThenByDescending_ThenByDescending_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
ThenByDescending_ThenByDescending_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void StableSort_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
StableSort(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void StableSort_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
StableSort_NotPipelined(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void StableSort_Descending_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
StableSort_Descending(labeled, count);
[Theory]
[OuterLoop]
- [MemberData(nameof(Sources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(Sources))]
- [MemberData(nameof(UnorderedSources.Ranges), new[] { 1024, 1024 * 32 }, MemberType = typeof(UnorderedSources))]
+ [MemberData(nameof(Sources.Ranges), new[] { LongRunningCount }, MemberType = typeof(Sources))]
+ [MemberData(nameof(UnorderedSources.Ranges), new[] { LongRunningCount }, MemberType = typeof(UnorderedSources))]
public static void StableSort_Descending_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> labeled, int count)
{
StableSort_Descending_NotPipelined(labeled, count);