Skip to content

Commit

Permalink
Merge pull request #99 from phnx47/test/upd-bencmarks
Browse files Browse the repository at this point in the history
update benchmarks
  • Loading branch information
phnx47 authored Jun 2, 2024
2 parents 7d04819 + c2dfd5b commit 0e992f6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
benchmarks:
name: Benchmarks
if: startsWith(github.head_ref, 'renovate/') == false
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
pull-requests: write
steps:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,20 @@ jobs:

build-linux:
name: Build, Test & Pack (Linux)
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Build
run: dotnet build -c Release -p:ContinuousIntegrationBuild=true

Expand Down Expand Up @@ -66,7 +73,7 @@ jobs:
name: Deploy to GitHub
needs: [build-windows, build-linux]
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -79,7 +86,7 @@ jobs:
name: Deploy to NuGet
needs: [build-windows, build-linux]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,19 @@ var hash = sha256(user).ToLowerHexString(); // 62565a67bf16004038c502eb68907411f

## Benchmarks

```ini
BenchmarkDotNet v0.13.9+228a464e8be6c580ad9408e98f18813f6407fb5a, Ubuntu 22.04.3 LTS (Jammy Jellyfish)
Intel Xeon Platinum 8272CL CPU 2.60GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK 7.0.402
[Host] : .NET 7.0.12 (7.0.1223.47720), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.12 (7.0.1223.47720), X64 RyuJIT AVX2
```
BenchmarkDotNet v0.13.12, Ubuntu 24.04 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.300
[Host] : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2
DefaultJob : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2
```
| Method | Mean | Error | StdDev | Median | Gen0 | Allocated |
|-------------------- |---------:|----------:|----------:|---------:|-------:|----------:|
| MD5_Model_To_Hex | 2.613 μs | 0.0076 μs | 0.0071 μs | 2.614 μs | 0.0725 | 1.34 KB |
| SHA1_Model_To_Hex | 2.910 μs | 0.0172 μs | 0.0161 μs | 2.910 μs | 0.0801 | 1.49 KB |
| SHA256_Model_To_Hex | 3.540 μs | 0.0064 μs | 0.0053 μs | 3.539 μs | 0.1030 | 1.93 KB |
| SHA512_Model_To_Hex | 5.449 μs | 0.0173 μs | 0.0153 μs | 5.449 μs | 0.1678 | 3.12 KB |

<!-- Sticky Pull Request Comment -->
| MD5_Model_To_Hex | 1.343 μs | 0.0130 μs | 0.0122 μs | 1.340 μs | 0.0801 | 1.34 KB |
| SHA1_Model_To_Hex | 1.675 μs | 0.0131 μs | 0.0123 μs | 1.674 μs | 0.0896 | 1.49 KB |
| SHA256_Model_To_Hex | 2.022 μs | 0.0187 μs | 0.0166 μs | 2.024 μs | 0.1144 | 1.93 KB |
| SHA512_Model_To_Hex | 2.937 μs | 0.0268 μs | 0.0250 μs | 2.931 μs | 0.1907 | 3.12 KB |

## License

Expand Down
2 changes: 1 addition & 1 deletion tests/benchmarks/FingerprintBuilder.BenchmarkTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions tests/units/FingerprintBuilder.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework Condition="'$(OS)' == 'Unix'">net6.0</TargetFramework>
<TargetFrameworks Condition="'$(OS)' != 'Unix'">net462;net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Unix'">net462;net6.0;net8.0</TargetFrameworks>
<CollectCoverage>true</CollectCoverage>
<CoverletOutputFormat>opencover</CoverletOutputFormat>
<NoWarn>$(NoWarn);CS0618</NoWarn>
Expand Down

0 comments on commit 0e992f6

Please sign in to comment.