diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53f04c7e..bffe043c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -196,7 +196,7 @@ jobs: with: working-directory: ${{ github.workspace }}/infra type: localhost - ext-csharp-version: 0.17.0 + ext-csharp-version: 0.17.1-017017g5223a2e5.17.5223a2e5 core-version: 0.24.2 - name: Run Demo Client @@ -243,7 +243,7 @@ jobs: with: working-directory: ${{ github.workspace }}/infra type: localhost - ext-csharp-version: 0.17.0 + ext-csharp-version: 0.17.1-017017g5223a2e5.17.5223a2e5 core-version: 0.24.2 - name: Run UnifiedAPI diff --git a/Samples/StressTests/Armonik.Samples.StressTests.Client/Armonik.Samples.StressTests.Client.csproj b/Samples/StressTests/Armonik.Samples.StressTests.Client/Armonik.Samples.StressTests.Client.csproj index c000c201..f704817c 100644 --- a/Samples/StressTests/Armonik.Samples.StressTests.Client/Armonik.Samples.StressTests.Client.csproj +++ b/Samples/StressTests/Armonik.Samples.StressTests.Client/Armonik.Samples.StressTests.Client.csproj @@ -8,7 +8,7 @@ - + @@ -24,8 +24,12 @@ - - - + + + + + + true + \ No newline at end of file diff --git a/Samples/StressTests/Armonik.Samples.StressTests.Client/StressTests.cs b/Samples/StressTests/Armonik.Samples.StressTests.Client/StressTests.cs index e83c784b..4bc12e60 100644 --- a/Samples/StressTests/Armonik.Samples.StressTests.Client/StressTests.cs +++ b/Samples/StressTests/Armonik.Samples.StressTests.Client/StressTests.cs @@ -36,8 +36,12 @@ using Armonik.Samples.StressTests.Client.Metrics; +using ArmoniK.Utils; + using Google.Protobuf.WellKnownTypes; +using Grpc.Net.Client; + using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; @@ -45,7 +49,7 @@ namespace Armonik.Samples.StressTests.Client { internal class StressTests { - private readonly ChannelPool channelPool_; + private readonly ObjectPool channelPool_; public StressTests(IConfiguration configuration, ILoggerFactory factory, @@ -134,7 +138,7 @@ internal void LargePayloadSubmit(int nbTasks = 100, workloadTimeInMs, Props); - using var channel = channelPool_.GetChannel(); + using var channel = channelPool_.Get(); stats.GetAllStats(channel, Service.SessionId, dt, @@ -175,21 +179,17 @@ private IDisposable ComputeVector(int nbTasks, Logger.LogInformation($"Got {ResultHandle.NbResults} results. All tasks submitted ? {(indexTask == nbTasks).ToString()}"); }, elapsed); + var taskIds = Enumerable.Range(0, + nbTasks) + .ParallelSelect(new ParallelTaskOptions(-1), + idx => Service.SubmitAsync("ComputeWorkLoad", + Utils.ParamsHelper(inputArrayOfBytes, + nbOutputBytes, + workloadTimeInMs), + ResultHandle)) + .ToHashSetAsync() + .Result; - var result = Enumerable.Range(0, - nbTasks) - .Chunk(nbTasks / Props.MaxParallelChannels) - .AsParallel() - .Select(subInt => subInt.Select(idx => Service.SubmitAsync("ComputeWorkLoad", - Utils.ParamsHelper(inputArrayOfBytes, - nbOutputBytes, - workloadTimeInMs), - ResultHandle)) - .ToList()); - - var taskIds = result.SelectMany(t => Task.WhenAll(t) - .Result) - .ToHashSet(); indexTask = taskIds.Count(); diff --git a/Samples/StressTests/Armonik.Samples.StressTests.Worker/Armonik.Samples.StressTests.Worker.csproj b/Samples/StressTests/Armonik.Samples.StressTests.Worker/Armonik.Samples.StressTests.Worker.csproj index b944cb25..7c76a0d6 100644 --- a/Samples/StressTests/Armonik.Samples.StressTests.Worker/Armonik.Samples.StressTests.Worker.csproj +++ b/Samples/StressTests/Armonik.Samples.StressTests.Worker/Armonik.Samples.StressTests.Worker.csproj @@ -20,7 +20,7 @@ - + diff --git a/Samples/UnifiedAPI/ArmoniK.Samples.Client/ArmoniK.Samples.Client.csproj b/Samples/UnifiedAPI/ArmoniK.Samples.Client/ArmoniK.Samples.Client.csproj index b4a8ba9e..4cbd8a8e 100644 --- a/Samples/UnifiedAPI/ArmoniK.Samples.Client/ArmoniK.Samples.Client.csproj +++ b/Samples/UnifiedAPI/ArmoniK.Samples.Client/ArmoniK.Samples.Client.csproj @@ -24,7 +24,7 @@ - + diff --git a/Samples/UnifiedAPI/ArmoniK.Samples.Worker/ArmoniK.Samples.Unified.Worker.csproj b/Samples/UnifiedAPI/ArmoniK.Samples.Worker/ArmoniK.Samples.Unified.Worker.csproj index 99c6a420..22a0bd27 100644 --- a/Samples/UnifiedAPI/ArmoniK.Samples.Worker/ArmoniK.Samples.Unified.Worker.csproj +++ b/Samples/UnifiedAPI/ArmoniK.Samples.Worker/ArmoniK.Samples.Unified.Worker.csproj @@ -24,7 +24,7 @@ - +