mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-20 10:50:48 +08:00
build: 10.11.71
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.11.70</PluginVersion>
|
||||
<ProPluginVersion>10.11.70</ProPluginVersion>
|
||||
<DefaultVersion>10.11.70</DefaultVersion>
|
||||
<PluginVersion>10.11.71</PluginVersion>
|
||||
<ProPluginVersion>10.11.71</ProPluginVersion>
|
||||
<DefaultVersion>10.11.71</DefaultVersion>
|
||||
<AuthenticationVersion>10.11.6</AuthenticationVersion>
|
||||
<SourceGeneratorVersion>10.11.6</SourceGeneratorVersion>
|
||||
<NET8Version>8.0.20</NET8Version>
|
||||
|
@@ -179,7 +179,12 @@ public class DeviceSingleStreamDataHandleAdapter<TRequest> : CustomDataHandlingA
|
||||
{
|
||||
throw new Exception($"Unable to convert {nameof(requestInfo)} to {nameof(ISendMessage)}");
|
||||
}
|
||||
var span = writer.GetSpan(sendMessage.MaxLength);
|
||||
Span<byte> span = default;
|
||||
if (Logger?.LogLevel <= LogLevel.Trace)
|
||||
{
|
||||
span = writer.GetSpan(sendMessage.MaxLength);
|
||||
}
|
||||
|
||||
sendMessage.Build(ref writer);
|
||||
if (Logger?.LogLevel <= LogLevel.Trace)
|
||||
{
|
||||
|
@@ -32,7 +32,7 @@ using ModbusMaster = ThingsGateway.Foundation.Modbus.ModbusMaster;
|
||||
namespace ThingsGateway.Foundation;
|
||||
|
||||
[SimpleJob(RuntimeMoniker.Net80)]
|
||||
[SimpleJob(RuntimeMoniker.Net10_0)]
|
||||
//[SimpleJob(RuntimeMoniker.Net10_0)]
|
||||
[MemoryDiagnoser]
|
||||
public class ModbusBenchmark : IDisposable
|
||||
{
|
||||
|
@@ -24,8 +24,8 @@ using TouchSocket.Core;
|
||||
|
||||
namespace ThingsGateway.Foundation;
|
||||
|
||||
//[SimpleJob(RuntimeMoniker.Net80)]
|
||||
[SimpleJob(RuntimeMoniker.Net10_0)]
|
||||
[SimpleJob(RuntimeMoniker.Net80)]
|
||||
//[SimpleJob(RuntimeMoniker.Net10_0)]
|
||||
[MemoryDiagnoser]
|
||||
[BaselineColumn]
|
||||
[RankColumn]
|
||||
@@ -67,7 +67,7 @@ public class S7Benchmark : IDisposable
|
||||
}
|
||||
for (int i = 0; i < Program.ClientCount; i++)
|
||||
{
|
||||
var plc = new Plc(CpuType.S7300, "127.0.0.1", 102, 0, 0);
|
||||
var plc = new Plc(CpuType.S71500, "127.0.0.1", 102, 0, 0);
|
||||
await plc.OpenAsync();//打开plc连接
|
||||
await plc.ReadAsync(DataType.Memory, 1, 0, VarType.Byte, 100);
|
||||
plcs.Add(plc);
|
||||
@@ -95,30 +95,29 @@ public class S7Benchmark : IDisposable
|
||||
await Task.WhenAll(tasks);
|
||||
}
|
||||
|
||||
//并发失败
|
||||
//[Benchmark]
|
||||
//public async Task HslCommunication()
|
||||
//{
|
||||
// List<Task> tasks = new List<Task>();
|
||||
// foreach (var siemensS7Net in siemensS7Nets)
|
||||
// {
|
||||
// for (int i = 0; i < Program.TaskNumberOfItems; i++)
|
||||
// {
|
||||
// tasks.Add(Task.Run(async () =>
|
||||
// {
|
||||
// for (int i = 0; i < Program.NumberOfItems; i++)
|
||||
// {
|
||||
// var result = await siemensS7Net.ReadAsync("M0", 100);
|
||||
// if (!result.IsSuccess)
|
||||
// {
|
||||
// throw new Exception(result.Message);
|
||||
// }
|
||||
// }
|
||||
// }));
|
||||
// }
|
||||
// }
|
||||
// await Task.WhenAll(tasks);
|
||||
//}
|
||||
[Benchmark]
|
||||
public async Task HslCommunication()
|
||||
{
|
||||
List<Task> tasks = new List<Task>();
|
||||
foreach (var siemensS7Net in siemensS7Nets)
|
||||
{
|
||||
for (int i = 0; i < Program.TaskNumberOfItems; i++)
|
||||
{
|
||||
tasks.Add(Task.Run(async () =>
|
||||
{
|
||||
for (int i = 0; i < Program.NumberOfItems; i++)
|
||||
{
|
||||
var result = await siemensS7Net.ReadAsync("M0", 100);
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
throw new Exception(result.Message);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
await Task.WhenAll(tasks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -43,7 +43,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.15.4" />
|
||||
<PackageReference Include="HslCommunication" Version="12.5.1" />
|
||||
<PackageReference Include="Longbow.Modbus" Version="9.1.0" />
|
||||
<PackageReference Include="Longbow.Modbus" Version="9.1.1" />
|
||||
<PackageReference Include="NModbus" Version="3.0.81" />
|
||||
<PackageReference Include="NModbus.Serial" Version="3.0.81" />
|
||||
<PackageReference Include="S7netplus" Version="0.20.0" />
|
||||
|
@@ -12,6 +12,7 @@
|
||||
<PkgOPCFoundation_NetStandard_Opc_Ua_ClientPackageFiles Include="$(PkgOPCFoundation_NetStandard_Opc_Ua_Client)\lib\net8.0\*.*" />
|
||||
<PkgOPCFoundation_NetStandard_Opc_Ua_Client_ComplexTypesPackageFiles Include="$(PkgOPCFoundation_NetStandard_Opc_Ua_Client_ComplexTypes)\lib\net8.0\*.*" />
|
||||
<PkgSystem_Formats_Asn1PackageFiles Include="$(PkgSystem_Formats_Asn1)\lib\net8.0\*.*" />
|
||||
<PkgBitFaster_CachingPackageFiles Include="$(PkgBitFaster_Caching)\lib\net6.0\*.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -23,6 +24,7 @@
|
||||
<Copy SourceFiles="@(PkgOPCFoundation_NetStandard_Opc_Ua_ServerPackageFiles)" DestinationFolder="$(ApplicationFolder)%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(PkgOPCFoundation_NetStandard_Opc_Ua_Security_CertificatesPackageFiles)" DestinationFolder="$(ApplicationFolder)%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(PkgSystem_Formats_Asn1PackageFiles)" DestinationFolder="$(ApplicationFolder)%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(PkgBitFaster_CachingPackageFiles)" DestinationFolder="$(ApplicationFolder)%(RecursiveDir)" />
|
||||
<!--<Copy SourceFiles="@(PkgThingsGateway_Foundation_OpcUaPackageFiles)" DestinationFolder="$(ApplicationFolder)%(RecursiveDir)" />-->
|
||||
<Copy SourceFiles="@(PkgOPCFoundation_NetStandard_Opc_Ua_ClientPackageFiles)" DestinationFolder="$(ApplicationFolder)%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(PkgOPCFoundation_NetStandard_Opc_Ua_Client_ComplexTypesPackageFiles)" DestinationFolder="$(ApplicationFolder)%(RecursiveDir)" />
|
||||
@@ -36,6 +38,10 @@
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>Content</PackagePath>
|
||||
</Content>
|
||||
<Content Include="$(ProjectDir)$(OutputPath)\$(TargetFramework)\**\*BitFaster*.dll">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>Content</PackagePath>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
@@ -49,6 +49,10 @@
|
||||
<PrivateAssets>contentFiles;build;buildMultitargeting;buildTransitive;analyzers;</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
<PackageReference Include="BitFaster.Caching" Version="2.5.4" GeneratePathProperty="true">
|
||||
<PrivateAssets>contentFiles;build;buildMultitargeting;buildTransitive;analyzers;</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
<!--<PackageReference Include="System.Formats.Asn1" Version="8.0.2" GeneratePathProperty="true">
|
||||
<PrivateAssets>contentFiles;build;buildMultitargeting;buildTransitive;analyzers;</PrivateAssets>
|
||||
</PackageReference>-->
|
||||
|
Reference in New Issue
Block a user