Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Armonik.DevelopmentKit.Client.Unified" Version="0.17.0" />
<PackageReference Include="Armonik.DevelopmentKit.Client.Unified" Version="0.17.1-017017g5223a2e5.17.5223a2e5" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
Expand All @@ -24,8 +24,12 @@
<PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\UnifiedAPI\ArmoniK.Samples.Common\ArmoniK.Samples.Common.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\UnifiedAPI\ArmoniK.Samples.Common\ArmoniK.Samples.Common.csproj" />
</ItemGroup>

<PropertyGroup>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,20 @@

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;

namespace Armonik.Samples.StressTests.Client
{
internal class StressTests
{
private readonly ChannelPool channelPool_;
private readonly ObjectPool<GrpcChannel> channelPool_;

public StressTests(IConfiguration configuration,
ILoggerFactory factory,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Armonik.DevelopmentKit.Worker.Unified" Version="0.17.0" />
<PackageReference Include="Armonik.DevelopmentKit.Worker.Unified" Version="0.17.1-017017g5223a2e5.17.5223a2e5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Armonik.DevelopmentKit.Client.Unified" Version="0.17.0" />
<PackageReference Include="Armonik.DevelopmentKit.Client.Unified" Version="0.17.1-017017g5223a2e5.17.5223a2e5" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Armonik.DevelopmentKit.Worker.Unified" Version="0.17.0" />
<PackageReference Include="Armonik.DevelopmentKit.Worker.Unified" Version="0.17.1-017017g5223a2e5.17.5223a2e5" />
</ItemGroup>

<ItemGroup>
Expand Down