Skip to content

Commit 3b60798

Browse files
committed
revert add benchmarks
1 parent f17f2dc commit 3b60798

8 files changed

Lines changed: 32 additions & 64 deletions

.github/workflows/dotnet.yaml

Lines changed: 10 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -5,83 +5,29 @@ on:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8-
workflow_dispatch:
98

109
jobs:
11-
build-and-test:
10+
build:
11+
1212
strategy:
1313
matrix:
1414
os: [ ubuntu-latest, windows-latest, macos-latest ]
15-
dotnet-version: [ '10.0.x' ]
15+
dotnet-version: [ '8.0.x', '9.0.x', '10.0.x' ]
1616
runs-on: ${{ matrix.os }}
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v3
1919
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
20+
uses: actions/setup-dotnet@v3
2121
with:
2222
dotnet-version: ${{ matrix.dotnet-version }}
23-
24-
- name: Build
23+
- name: Build with dotnet
2524
run: dotnet build -c Release
26-
27-
- name: Run Tests
25+
- name: Run tests with coverage
2826
run: |
27+
cd ./src/Hexecs.Tests/
2928
dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
30-
3129
- name: Publish coverage report
32-
if: matrix.os == 'ubuntu-latest'
33-
uses: codecov/codecov-action@v4
30+
if: matrix.os == 'ubuntu-latest' && matrix.dotnet-version == '10.0.x'
31+
uses: codecov/codecov-action@v3
3432
with:
3533
token: ${{ secrets.CODECOV_TOKEN }}
36-
37-
benchmark:
38-
runs-on: ubuntu-latest
39-
needs: build-and-test
40-
permissions:
41-
contents: write
42-
pull-requests: write
43-
steps:
44-
- uses: actions/checkout@v4
45-
46-
- name: Setup .NET
47-
uses: actions/setup-dotnet@v4
48-
with:
49-
dotnet-version: '10.0.x'
50-
51-
- name: Run Benchmarks
52-
run: |
53-
# Создаем абсолютный путь для артефактов в корне репозитория
54-
mkdir -p ${{ github.workspace }}/bench-results
55-
56-
if [ "${{ github.event_name }}" == "pull_request" ]; then
57-
dotnet run -c Release --project ./src/Hexecs.Benchmarks/ -- --filter '*' --exporters json --join --job LowRuntime --artifacts ${{ github.workspace }}/bench-results
58-
else
59-
dotnet run -c Release --project ./src/Hexecs.Benchmarks/ -- --filter '*' --exporters json --join --artifacts ${{ github.workspace }}/bench-results
60-
fi
61-
62-
- name: Locate Result File
63-
run: |
64-
# Находим созданный JSON (BenchmarkDotNet может положить его в подпапку results)
65-
echo "Searching for benchmark results in ${{ github.workspace }}/bench-results..."
66-
REPORT_FILE=$(find ${{ github.workspace }}/bench-results -name "*.json" | head -n 1)
67-
68-
if [ -z "$REPORT_FILE" ]; then
69-
echo "Error: No benchmark report found!"
70-
exit 1
71-
fi
72-
73-
echo "Found report: $REPORT_FILE"
74-
# Копируем его в фиксированное место для следующего шага
75-
cp "$REPORT_FILE" ${{ github.workspace }}/final-report.json
76-
77-
- name: Store benchmark result
78-
uses: benchmark-action/github-action-benchmark@v1
79-
with:
80-
tool: 'benchmarkdotnet'
81-
output-file-path: './final-report.json'
82-
github-token: ${{ secrets.GITHUB_TOKEN }}
83-
# Пушим графики в gh-pages только при мердже в мастер
84-
auto-push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
85-
comment-on-alert: true
86-
fail-on-alert: true
87-
alert-threshold: "120%"

src/Hexecs.Benchmarks/Actors/ActorFilter2EnumerationBenchmark.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ namespace Hexecs.Benchmarks.Actors;
2020
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
2121
[MeanColumn, MemoryDiagnoser]
2222
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD")]
23+
[JsonExporterAttribute.Full]
24+
[JsonExporterAttribute.FullCompressed]
25+
[BenchmarkCategory("Actors")]
2326
public class ActorFilter2EnumerationBenchmark
2427
{
2528
[Params(10_000, 100_000)]

src/Hexecs.Benchmarks/Actors/ActorFilter3EnumerationBenchmark.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ namespace Hexecs.Benchmarks.Actors;
2121
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
2222
[MeanColumn, MemoryDiagnoser]
2323
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD")]
24+
[JsonExporterAttribute.Full]
25+
[JsonExporterAttribute.FullCompressed]
26+
[BenchmarkCategory("Actors")]
2427
public class ActorFilter3EnumerationBenchmark
2528
{
2629
[Params(10_000, 100_000)]

src/Hexecs.Benchmarks/Actors/CheckComponentExistsBenchmark.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ namespace Hexecs.Benchmarks.Actors;
2424
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
2525
[MeanColumn, MemoryDiagnoser]
2626
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD", "Count")]
27+
[JsonExporterAttribute.Full]
28+
[JsonExporterAttribute.FullCompressed]
29+
[BenchmarkCategory("Actors")]
2730
public class CheckComponentExistsBenchmark
2831
{
2932
[Params(10_000, 100_000)]

src/Hexecs.Benchmarks/Actors/CreateAddComponentsDestroyBenchmark.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ namespace Hexecs.Benchmarks.Actors;
2626
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
2727
[MeanColumn, MemoryDiagnoser]
2828
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD")]
29+
[JsonExporterAttribute.Full]
30+
[JsonExporterAttribute.FullCompressed]
31+
[BenchmarkCategory("Actors")]
2932
public class CreateAddComponentsDestroyBenchmark
3033
{
3134
[Params(1_000, 100_000, 500_000)]

src/Hexecs.Benchmarks/Actors/UpdateSystemWithParallelWorkerBenchmark.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ namespace Hexecs.Benchmarks.Actors;
2323
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
2424
[MeanColumn, MemoryDiagnoser]
2525
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD")]
26+
[JsonExporterAttribute.Full]
27+
[JsonExporterAttribute.FullCompressed]
28+
[BenchmarkCategory("Actors")]
2629
public class UpdateSystemWithParallelWorkerBenchmark
2730
{
2831
[Params(100_000, 1_000_000)]

src/Hexecs.Benchmarks/Collections/SparsePageDictionaryBenchmark.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
[SimpleJob(RuntimeMoniker.Net10_0)]
2626
[MeanColumn, MemoryDiagnoser]
2727
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD", "Count")]
28+
[JsonExporterAttribute.Full]
29+
[JsonExporterAttribute.FullCompressed]
30+
[BenchmarkCategory("Collections")]
2831
public class SparsePageDictionaryBenchmark
2932
{
3033
private SparsePageDictionary<int> _sparse = null!;

src/Hexecs.Benchmarks/Collections/ThreadLocalStackBenchmark.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Concurrent;
2+
using System.ComponentModel;
23
using Hexecs.Collections;
34

45
namespace Hexecs.Benchmarks.Collections;
@@ -21,6 +22,9 @@ namespace Hexecs.Benchmarks.Collections;
2122
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
2223
[MeanColumn, MemoryDiagnoser]
2324
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD", "Count")]
25+
[JsonExporterAttribute.Full]
26+
[JsonExporterAttribute.FullCompressed]
27+
[BenchmarkCategory("Collections")]
2428
public class ThreadLocalStackBenchmark
2529
{
2630
[Params(10_000)]

0 commit comments

Comments
 (0)