From 52db083c97fe613aad08bb731d4f5cbfd58caf60 Mon Sep 17 00:00:00 2001
From: "SmallChi(Koike)" <564952747@qq.com>
Date: Sun, 19 Nov 2023 10:26:09 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7net8.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/dotnetcore.yml | 2 +-
README.md | 26 +++++++++----------
global.json | 2 +-
src/Info.props | 8 +++---
.../JT809.Protocol.Benchmark.csproj | 4 +--
.../JT809SerializerContext.cs | 2 +-
...809.Protocol.Extensions.JT1078.Test.csproj | 10 +++----
.../JT809.Protocol.Test.csproj | 12 ++++-----
src/JT809.Protocol/JT809.Protocol.csproj | 19 +++++++++++---
9 files changed, 48 insertions(+), 37 deletions(-)
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index 8113de4..af59485 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: 7.0.100
+ dotnet-version: 8.0.100
- name: dotnet info
run: dotnet --info
- name: dotnet restore
diff --git a/README.md b/README.md
index 41923bc..2608f80 100644
--- a/README.md
+++ b/README.md
@@ -301,24 +301,24 @@ public class JT809_2019_Config : JT809GlobalConfigBase
``` ini
-BenchmarkDotNet=v0.13.2, OS=Windows 11 (10.0.22621.819)
+BenchmarkDotNet v0.13.10, Windows 11 (10.0.22621.2715/22H2/2022Update/SunValley2)
Intel Core i7-8700K CPU 3.70GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
-.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
+.NET SDK 8.0.100
+ [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
+ Job-VUTFXE : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
-Platform=AnyCpu Server=False Toolchain=.NET 7.0
+Platform=AnyCpu Server=False Toolchain=.NET 8.0
```
-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 |
+| Method | N | Mean | Error | StdDev | Gen0 | Allocated |
+|---------------------------------------- |------- |-------------:|------------:|----------:|-----------:|-------------:|
+| **JT809_0x9400_0x9401_Package_Deserialize** | **100** | **293.3 μs** | **2.50 μs** | **2.21 μs** | **16.6016** | **103.13 KB** |
+| JT809_0x9400_0x9401_Package_Serialize | 100 | 149.4 μs | 1.02 μs | 0.95 μs | 14.6484 | 90.63 KB |
+| **JT809_0x9400_0x9401_Package_Deserialize** | **10000** | **28,493.1 μs** | **164.55 μs** | **153.92 μs** | **1656.2500** | **10312.52 KB** |
+| JT809_0x9400_0x9401_Package_Serialize | 10000 | 15,197.7 μs | 65.31 μs | 57.89 μs | 1468.7500 | 9062.51 KB |
+| **JT809_0x9400_0x9401_Package_Deserialize** | **100000** | **283,419.7 μs** | **1,039.42 μs** | **972.27 μs** | **16500.0000** | **103125.36 KB** |
+| JT809_0x9400_0x9401_Package_Serialize | 100000 | 150,152.6 μs | 589.37 μs | 551.30 μs | 14750.0000 | 90625.18 KB |
## JT809协议消息对照表
diff --git a/global.json b/global.json
index 08585a2..f3365c4 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "7.0.100"
+ "version": "8.0.100"
}
}
\ No newline at end of file
diff --git a/src/Info.props b/src/Info.props
index 2dc2eed..81e99d1 100644
--- a/src/Info.props
+++ b/src/Info.props
@@ -1,14 +1,14 @@
- net6.0;net7.0;
- 11.0
+ netstandard2.0;net7.0;net8.0;
+ latest
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.3
+ 2.2.4
LICENSE
true
latest
@@ -26,6 +26,6 @@
-
+
\ No newline at end of file
diff --git a/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj b/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj
index 873e2dc..f7a9389 100644
--- a/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj
+++ b/src/JT809.Protocol.Benchmark/JT809.Protocol.Benchmark.csproj
@@ -2,11 +2,11 @@
Exe
- net7.0
+ net8.0
-
+
diff --git a/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs b/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs
index e91ccdd..0d6e364 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.NetCoreApp70).WithPlatform(Platform.AnyCpu));
+ AddJob(Job.Default.WithGcServer(false).WithToolchain(CsProjCoreToolchain.NetCoreApp80).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 36c954c..e154332 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,14 +1,14 @@
- net7.0
+ net8.0
-
-
-
-
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj b/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj
index e44308e..113901b 100644
--- a/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj
+++ b/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
false
1701;1702;1591
@@ -11,11 +11,11 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/src/JT809.Protocol/JT809.Protocol.csproj b/src/JT809.Protocol/JT809.Protocol.csproj
index 1c71d60..2a4d65a 100644
--- a/src/JT809.Protocol/JT809.Protocol.csproj
+++ b/src/JT809.Protocol/JT809.Protocol.csproj
@@ -80,16 +80,27 @@
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
True