diff --git a/common/Perf/Azure.Test.Perf/RandomStream.cs b/common/Perf/Azure.Test.Perf/RandomStream.cs index 6e77d0d3752fe..a61097e2e68b5 100644 --- a/common/Perf/Azure.Test.Perf/RandomStream.cs +++ b/common/Perf/Azure.Test.Perf/RandomStream.cs @@ -8,12 +8,7 @@ namespace Azure.Test.Perf { public static class RandomStream { - private static readonly Lazy _randomBytes = new Lazy(() => - { - var randomData = new byte[1024 * 1024]; - ThreadsafeRandom.NextBytes(randomData); - return randomData; - }); + private static readonly Lazy _randomBytes = new Lazy(() => RandomByteArray.Create(1024 * 1024)); public static Stream Create(long size) => new CircularStream(new MemoryStream(_randomBytes.Value, writable: false), size); }