-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stress tests from Cache-List to List-List (#800)
- Loading branch information
Showing
9 changed files
with
211 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Reactive.Linq; | ||
using System.Reactive.Concurrency; | ||
using Bogus; | ||
|
||
namespace DynamicData.Tests.Utilities; | ||
|
||
internal static class FakerExtensions | ||
{ | ||
public static IObservable<T> IntervalGenerate<T>(this Faker<T> faker, Randomizer randomizer, TimeSpan maxTime, IScheduler? scheduler = null) | ||
where T : class => | ||
randomizer.Interval(maxTime, scheduler).Select(_ => faker.Generate()); | ||
|
||
public static IObservable<T> IntervalGenerate<T>(this Faker<T> faker, TimeSpan period, IScheduler? scheduler = null) | ||
where T : class => | ||
Observable.Interval(period, scheduler ?? DefaultScheduler.Instance).Select(_ => faker.Generate()); | ||
} |
Oops, something went wrong.