瀏覽代碼

v2.2.1

升级core3.1
tags/v2.2.1
SmallChi(Koike) 5 年之前
父節點
當前提交
743f70bd5a
共有 6 個文件被更改,包括 35 次插入34 次删除
  1. +1
    -1
      .travis.yml
  2. +21
    -20
      README.md
  3. +1
    -1
      src/JT808.Protocol.Benchmark/JT808.Protocol.Benchmark.csproj
  4. +1
    -1
      src/JT808.Protocol.Benchmark/JT808SerializerContext.cs
  5. +5
    -5
      src/JT808.Protocol.Test/JT808.Protocol.Test.csproj
  6. +6
    -6
      src/JT808.Protocol/JT808.Protocol.csproj

+ 1
- 1
.travis.yml 查看文件

@@ -1,6 +1,6 @@
language: csharp
solution: JT808.Protocol.sln
dotnet: 3.0.100
dotnet: 3.1.100
os: linux
mono: none
dist: trusty2


+ 21
- 20
README.md 查看文件

@@ -286,35 +286,36 @@ JT808Serializer DT2JT808Serializer = new JT808Serializer(DT2JT808Config);
| --------------------- | -------------------------------------------------- | --------------------------------------------------- |
| Install-Package JT808 | ![JT808](https://img.shields.io/nuget/v/JT808.svg) | ![JT808](https://img.shields.io/nuget/dt/JT808.svg) |
| Install-Package JT808.Protocol.Extensions.JT1078 | ![JT808.Protocol.Extensions.JT1078](https://img.shields.io/nuget/v/JT808.Protocol.Extensions.JT1078.svg) | ![JT808](https://img.shields.io/nuget/dt/JT808.Protocol.Extensions.JT1078.svg) |
| Install-Package JT808.Protocol.Extensions.JTActiveSafety| ![JT808.Protocol.Extensions.JTActiveSafety](https://img.shields.io/nuget/v/JT808.Protocol.Extensions.JTActiveSafety.svg) | ![JT808](https://img.shields.io/nuget/dt/JT808.Protocol.Extensions.JTActiveSafety.svg) |

## 使用BenchmarkDotNet性能测试报告(只是玩玩,不能当真)

``` ini

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18362
BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i7-8700K CPU 3.70GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=3.0.100
[Host] : .NET Core 3.0.0 (CoreCLR 4.700.19.46205, CoreFX 4.700.19.46214), X64 RyuJIT
Job-ROHSDP : .NET Core 3.0.0 (CoreCLR 4.700.19.46205, CoreFX 4.700.19.46214), X64 RyuJIT
.NET Core SDK=3.1.100
[Host] : .NET Core 3.1.0 (CoreCLR 4.700.19.56402, CoreFX 4.700.19.56404), X64 RyuJIT
Job-DSNYYA : .NET Core 3.1.0 (CoreCLR 4.700.19.56402, CoreFX 4.700.19.56404), X64 RyuJIT

Platform=AnyCpu Server=False Toolchain=.NET Core 3.0
Platform=AnyCpu Server=False Toolchain=.NET Core 3.1

```
| Method | Categories | N | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|-------------------------------- |----------------- |------- |--------------:|-------------:|-------------:|-----------:|------:|------:|-------------:|
| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100** | **259.55 us** | **4.617 us** | **4.319 us** | **31.2500** | **-** | **-** | **192.97 KB** |
| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100 | 821.35 us | 10.732 us | 9.514 us | 79.1016 | - | - | 487.5 KB |
| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **10000** | **26,448.35 us** | **478.895 us** | **399.899 us** | **3125.0000** | **-** | **-** | **19296.88 KB** |
| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 10000 | 81,776.05 us | 1,405.214 us | 1,245.686 us | 7857.1429 | - | - | 48751.2 KB |
| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100000** | **261,073.61 us** | **2,592.782 us** | **2,298.434 us** | **31000.0000** | **-** | **-** | **192969.15 KB** |
| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100000 | 806,869.44 us | 7,921.093 us | 7,409.395 us | 79000.0000 | - | - | 487500 KB |
| | | | | | | | | | |
| **0x0100Serialize** | **0x0100Serializer** | **100** | **76.62 us** | **0.866 us** | **0.810 us** | **10.1318** | **-** | **-** | **62.5 KB** |
| 0x0100Deserialize | 0x0100Serializer | 100 | 77.80 us | 0.607 us | 0.568 us | 14.6484 | - | - | 89.84 KB |
| **0x0100Serialize** | **0x0100Serializer** | **10000** | **7,608.31 us** | **69.958 us** | **65.439 us** | **1015.6250** | **-** | **-** | **6250 KB** |
| 0x0100Deserialize | 0x0100Serializer | 10000 | 7,852.84 us | 54.138 us | 45.208 us | 1460.9375 | - | - | 8984.38 KB |
| **0x0100Serialize** | **0x0100Serializer** | **100000** | **76,993.50 us** | **544.867 us** | **509.669 us** | **10142.8571** | **-** | **-** | **62500.28 KB** |
| 0x0100Deserialize | 0x0100Serializer | 100000 | 78,382.88 us | 791.432 us | 740.306 us | 14571.4286 | - | - | 89845 KB |
| Method | Categories | N | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|-------------------------------- |----------------- |------- |--------------:|--------------:|--------------:|-----------:|------:|------:|-------------:|
| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100** | **262.46 us** | **3.178 us** | **2.654 us** | **31.7383** | **-** | **-** | **196.09 KB** |
| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100 | 812.97 us | 3.537 us | 2.953 us | 80.0781 | - | - | 493.75 KB |
| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **10000** | **26,537.30 us** | **382.221 us** | **319.172 us** | **3187.5000** | **-** | **-** | **19609.38 KB** |
| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 10000 | 82,939.55 us | 1,133.599 us | 1,060.370 us | 8000.0000 | - | - | 49376.19 KB |
| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100000** | **261,695.51 us** | **5,005.517 us** | **5,355.847 us** | **32000.0000** | **-** | **-** | **196093.75 KB** |
| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100000 | 824,904.93 us | 16,325.230 us | 15,270.630 us | 80000.0000 | - | - | 493750 KB |
| | | | | | | | | | |
| **0x0100Serialize** | **0x0100Serializer** | **100** | **78.05 us** | **0.984 us** | **0.920 us** | **10.6201** | **-** | **-** | **65.63 KB** |
| 0x0100Deserialize | 0x0100Serializer | 100 | 81.54 us | 1.618 us | 1.798 us | 15.6250 | - | - | 96.09 KB |
| **0x0100Serialize** | **0x0100Serializer** | **10000** | **8,007.65 us** | **97.177 us** | **86.145 us** | **1062.5000** | **-** | **-** | **6562.5 KB** |
| 0x0100Deserialize | 0x0100Serializer | 10000 | 8,028.20 us | 123.340 us | 115.372 us | 1562.5000 | - | - | 9609.44 KB |
| **0x0100Serialize** | **0x0100Serializer** | **100000** | **80,765.75 us** | **1,016.904 us** | **901.459 us** | **10571.4286** | **-** | **-** | **65625.28 KB** |
| 0x0100Deserialize | 0x0100Serializer | 100000 | 80,955.97 us | 958.045 us | 849.282 us | 15571.4286 | - | - | 96093.87 KB |

## JT808终端通讯协议消息对照表



+ 1
- 1
src/JT808.Protocol.Benchmark/JT808.Protocol.Benchmark.csproj 查看文件

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputType>Exe</OutputType>


+ 1
- 1
src/JT808.Protocol.Benchmark/JT808SerializerContext.cs 查看文件

@@ -164,7 +164,7 @@ namespace JT808.Protocol.Benchmark
{
public JT808SerializerConfig()
{
Add(Job.Default.WithGcServer(false).With(CsProjCoreToolchain.NetCoreApp30).With(Platform.AnyCpu));
Add(Job.Default.WithGcServer(false).With(CsProjCoreToolchain.NetCoreApp31).With(Platform.AnyCpu));
}
}
}

+ 5
- 5
src/JT808.Protocol.Test/JT808.Protocol.Test.csproj 查看文件

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
@@ -102,11 +102,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.Drawing.Common" Version="4.6.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1">


+ 6
- 6
src/JT808.Protocol/JT808.Protocol.csproj 查看文件

@@ -6,15 +6,15 @@
<Authors>SmallChi</Authors>
<PackageId>JT808</PackageId>
<Product>JT808</Product>
<Description>JT808协议、GB808协议、道路运输车辆卫星定位系统-北斗兼容车载终端通讯协议</Description>
<PackageReleaseNotes>JT808协议、GB808协议、道路运输车辆卫星定位系统-北斗兼容车载终端通讯协议</PackageReleaseNotes>
<Description>JT808协议、GB808协议、道路运输车辆卫星定位系统-北斗兼容车载终端通讯协议(支持2013、2019版本)</Description>
<PackageReleaseNotes>JT808协议、GB808协议、道路运输车辆卫星定位系统-北斗兼容车载终端通讯协议(支持2013、2019版本)</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/SmallChi/JT808</RepositoryUrl>
<PackageProjectUrl>https://github.com/SmallChi/JT808</PackageProjectUrl>
<licenseUrl>https://github.com/SmallChi/JT808/blob/master/LICENSE</licenseUrl>
<license>https://github.com/SmallChi/JT808/blob/master/LICENSE</license>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>2.2.0</Version>
<Version>2.2.1</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -69,9 +69,9 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0" />
</ItemGroup>
<ItemGroup>


Loading…
取消
儲存