From 79acb7bf048a31ded48f4dc6f9edf51ec490bbee Mon Sep 17 00:00:00 2001 From: "SmallChi(Koike)" <564952747@qq.com> Date: Fri, 11 Nov 2022 00:12:41 +0800 Subject: [PATCH] =?UTF-8?q?v2.2.3=20=E6=B7=BB=E5=8A=A0net7.0=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dotnetcore.yml | 2 +- README.md | 27 ++++++++++--------- global.json | 2 +- src/Info.props | 6 ++--- .../JT809.Protocol.Benchmark.csproj | 4 +-- .../JT809SerializerContext.cs | 2 +- ...809.Protocol.Extensions.JT1078.Test.csproj | 2 +- .../JT809.Protocol.Test.csproj | 8 +++--- src/JT809.Protocol/JT809.Protocol.csproj | 17 +++++++----- 9 files changed, 37 insertions(+), 33 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index ec16bfc..8113de4 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -12,7 +12,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@master with: - dotnet-version: 6.0.400 + dotnet-version: 7.0.100 - name: dotnet info run: dotnet --info - name: dotnet restore diff --git a/README.md b/README.md index 47bc9e9..41923bc 100644 --- a/README.md +++ b/README.md @@ -301,23 +301,24 @@ public class JT809_2019_Config : JT809GlobalConfigBase ``` ini -BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000 +BenchmarkDotNet=v0.13.2, OS=Windows 11 (10.0.22621.819) Intel Core i7-8700K CPU 3.70GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores -.NET SDK=6.0.101 - [Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT - Job-GLUSZL : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT +.NET SDK=7.0.100 + [Host] : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2 + Job-WBHHQZ : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2 -Platform=AnyCpu Server=False Toolchain=.NET 6.0 +Platform=AnyCpu Server=False Toolchain=.NET 7.0 ``` -| Method | N | Mean | Error | StdDev | Gen 0 | Allocated | -|---------------------------------------- |------- |-------------:|------------:|------------:|-----------:|-----------:| -| **JT809_0x9400_0x9401_Package_Deserialize** | **100** | **518.6 μs** | **4.07 μs** | **3.40 μs** | **16.6016** | **103 KB** | -| JT809_0x9400_0x9401_Package_Serialize | 100 | 182.1 μs | 1.60 μs | 1.34 μs | 14.6484 | 91 KB | -| **JT809_0x9400_0x9401_Package_Deserialize** | **10000** | **50,367.9 μs** | **477.53 μs** | **446.68 μs** | **1600.0000** | **10,313 KB** | -| JT809_0x9400_0x9401_Package_Serialize | 10000 | 18,303.2 μs | 176.25 μs | 164.87 μs | 1468.7500 | 9,063 KB | -| **JT809_0x9400_0x9401_Package_Deserialize** | **100000** | **502,960.6 μs** | **2,001.44 μs** | **1,774.22 μs** | **16000.0000** | **103,129 KB** | -| JT809_0x9400_0x9401_Package_Serialize | 100000 | 182,137.2 μs | 1,709.29 μs | 1,598.87 μs | 14000.0000 | 90,626 KB | + +Method | N | Mean | Error | StdDev | Gen0 | Allocated | +---------------------------------------- |------- |-------------:|------------:|------------:|-----------:|------------:| + **JT809_0x9400_0x9401_Package_Deserialize** | **100** | **486.9 μs** | **9.46 μs** | **11.62 μs** | **16.6016** | **103.13 KB** | + JT809_0x9400_0x9401_Package_Serialize | 100 | 192.0 μs | 3.66 μs | 4.63 μs | 14.6484 | 90.63 KB | + **JT809_0x9400_0x9401_Package_Deserialize** | **10000** | **48,395.5 μs** | **823.85 μs** | **770.63 μs** | **1636.3636** | **10312.57 KB** | + JT809_0x9400_0x9401_Package_Serialize | 10000 | 19,033.4 μs | 279.80 μs | 248.04 μs | 1468.7500 | 9062.53 KB | + **JT809_0x9400_0x9401_Package_Deserialize** | **100000** | **492,172.8 μs** | **9,680.82 μs** | **9,507.86 μs** | **16000.0000** | **103125.8 KB** | + JT809_0x9400_0x9401_Package_Serialize | 100000 | 189,518.7 μs | 2,357.11 μs | 2,204.84 μs | 14666.6667 | 90625.27 KB | ## JT809协议消息对照表 diff --git a/global.json b/global.json index d769cd3..08585a2 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "6.0.400" + "version": "7.0.100" } } \ No newline at end of file diff --git a/src/Info.props b/src/Info.props index 1560f27..2dc2eed 100644 --- a/src/Info.props +++ b/src/Info.props @@ -1,14 +1,14 @@  - net6.0 - 10.0 + net6.0;net7.0; + 11.0 Copyright 2018. SmallChi(Koike) https://github.com/SmallChi/JT809 https://github.com/SmallChi/JT809 https://github.com/SmallChi/JT809/blob/master/LICENSE https://github.com/SmallChi/JT809/blob/master/LICENSE - 2.2.2 + 2.2.3 LICENSE true latest diff --git a/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj b/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj index 2c3bbef..873e2dc 100644 --- a/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj +++ b/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj @@ -2,13 +2,11 @@ Exe - net6.0 + net7.0 - - diff --git a/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs b/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs index 4c333a3..e91ccdd 100644 --- a/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs +++ b/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs @@ -87,7 +87,7 @@ namespace JT809.Protocol.Benchmark { public JT809SerializerContextConfig() { - AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp60).WithPlatform(Platform.AnyCpu)); + AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp70).WithPlatform(Platform.AnyCpu)); } } } diff --git a/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj b/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj index e3d3592..36c954c 100644 --- a/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj +++ b/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 diff --git a/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj b/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj index 4a956c7..e44308e 100644 --- a/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj +++ b/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 false 1701;1702;1591 @@ -11,9 +11,9 @@ - - - + + + all diff --git a/src/JT809.Protocol/JT809.Protocol.csproj b/src/JT809.Protocol/JT809.Protocol.csproj index 405cf28..1c71d60 100644 --- a/src/JT809.Protocol/JT809.Protocol.csproj +++ b/src/JT809.Protocol/JT809.Protocol.csproj @@ -80,12 +80,17 @@ - - - - - - + + + + + + + + + + + True True