From bea0ef65ed37ed3c5c42f395040193ffc5b96e61 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 11:42:00 +0700 Subject: [PATCH 01/16] Add CI config --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1efe497 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: .NET CI with Tests and Benchmarks + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + types: [ opened, synchronize, reopened, ready_for_review ] + +jobs: + build-and-test: + name: Build, Test, and Benchmark + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false || github.event_name == 'push' + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + cache: true + + - name: Restore dependencies + run: dotnet restore + + - name: Build solution + run: dotnet build --configuration Release --no-restore + + - name: Run Tests + run: dotnet test --configuration Release --no-build --verbosity normal + + - name: Run Benchmarks + run: | + dotnet run --project EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter * From 41590ae5b428ae2926640e3b3694fe0d9cc13034 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 11:55:36 +0700 Subject: [PATCH 02/16] Add lock files --- src/EasyTrace.Benchmarks/packages.lock.json | 254 ++++++++++++++++++++ src/EasyTrace.Tests/packages.lock.json | 116 +++++++++ src/EasyTrace/packages.lock.json | 6 + 3 files changed, 376 insertions(+) create mode 100644 src/EasyTrace.Benchmarks/packages.lock.json create mode 100644 src/EasyTrace.Tests/packages.lock.json create mode 100644 src/EasyTrace/packages.lock.json diff --git a/src/EasyTrace.Benchmarks/packages.lock.json b/src/EasyTrace.Benchmarks/packages.lock.json new file mode 100644 index 0000000..8028925 --- /dev/null +++ b/src/EasyTrace.Benchmarks/packages.lock.json @@ -0,0 +1,254 @@ +{ + "version": 1, + "dependencies": { + "net9.0": { + "BenchmarkDotNet": { + "type": "Direct", + "requested": "[0.15.8, )", + "resolved": "0.15.8", + "contentHash": "paCfrWxSeHqn3rUZc0spYXVFnHCF0nzRhG0nOLnyTjZYs8spsimBaaNmb3vwqvALKIplbYq/TF393vYiYSnh/Q==", + "dependencies": { + "BenchmarkDotNet.Annotations": "0.15.8", + "CommandLineParser": "2.9.1", + "Gee.External.Capstone": "2.3.0", + "Iced": "1.21.0", + "Microsoft.CodeAnalysis.CSharp": "4.14.0", + "Microsoft.Diagnostics.Runtime": "3.1.512801", + "Microsoft.Diagnostics.Tracing.TraceEvent": "3.1.21", + "Microsoft.DotNet.PlatformAbstractions": "3.1.6", + "Perfolizer": "[0.6.1]", + "System.Management": "9.0.5" + } + }, + "BenchmarkDotNet.Diagnostics.Windows": { + "type": "Direct", + "requested": "[0.15.8, )", + "resolved": "0.15.8", + "contentHash": "XI3wyymiXAd/BW8NTmiX7jaT38vQy/q3odiQ6LQnhZSN+qcqXYgeH+xT1bgnhkvWq6f2zHKePqeBHPpi0lx5hw==", + "dependencies": { + "BenchmarkDotNet": "0.15.8", + "Microsoft.Diagnostics.Tracing.TraceEvent": "3.1.21" + } + }, + "BenchmarkDotNet.Annotations": { + "type": "Transitive", + "resolved": "0.15.8", + "contentHash": "hfucY0ycAsB0SsoaZcaAp9oq5wlWBJcylvEJb9pmvdYUx6PD6S4mDiYnZWjdjAlLhIpe/xtGCwzORfzAzPqvzA==" + }, + "CommandLineParser": { + "type": "Transitive", + "resolved": "2.9.1", + "contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==" + }, + "Gee.External.Capstone": { + "type": "Transitive", + "resolved": "2.3.0", + "contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw==" + }, + "Iced": { + "type": "Transitive", + "resolved": "1.21.0", + "contentHash": "dv5+81Q1TBQvVMSOOOmRcjJmvWcX3BZPZsIq31+RLc5cNft0IHAyNlkdb7ZarOWG913PyBoFDsDXoCIlKmLclg==" + }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "3.11.0", + "contentHash": "v/EW3UE8/lbEYHoC2Qq7AR/DnmvpgdtAMndfQNmpuIMx/Mto8L5JnuCfdBYtgvalQOtfNCnxFejxuRrryvUTsg==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "4.14.0", + "contentHash": "PC3tuwZYnC+idaPuoC/AZpEdwrtX7qFpmnrfQkgobGIWiYmGi5MCRtl5mx6QrfMGQpK78X2lfIEoZDLg/qnuHg==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "System.Collections.Immutable": "9.0.0", + "System.Reflection.Metadata": "9.0.0" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "4.14.0", + "contentHash": "568a6wcTivauIhbeWcCwfWwIn7UV7MeHEBvFB2uzGIpM2OhJ4eM/FZ8KS0yhPoNxnSpjGzz7x7CIjTxhslojQA==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.Common": "[4.14.0]", + "System.Collections.Immutable": "9.0.0", + "System.Reflection.Metadata": "9.0.0" + } + }, + "Microsoft.Diagnostics.NETCore.Client": { + "type": "Transitive", + "resolved": "0.2.510501", + "contentHash": "juoqJYMDs+lRrrZyOkXXMImJHneCF23cuvO4waFRd2Ds7j+ZuGIPbJm0Y/zz34BdeaGiiwGWraMUlln05W1PCQ==", + "dependencies": { + "Microsoft.Extensions.Logging": "6.0.0" + } + }, + "Microsoft.Diagnostics.Runtime": { + "type": "Transitive", + "resolved": "3.1.512801", + "contentHash": "0lMUDr2oxNZa28D6NH5BuSQEe5T9tZziIkvkD44YkkCGQXPJqvFjLq5ZQq1hYLl3RjQJrY+hR0jFgap+EWPDTw==", + "dependencies": { + "Microsoft.Diagnostics.NETCore.Client": "0.2.410101" + } + }, + "Microsoft.Diagnostics.Tracing.TraceEvent": { + "type": "Transitive", + "resolved": "3.1.21", + "contentHash": "/OrJFKaojSR6TkUKtwh8/qA9XWNtxLrXMqvEb89dBSKCWjaGVTbKMYodIUgF5deCEtmd6GXuRerciXGl5bhZ7Q==", + "dependencies": { + "Microsoft.Diagnostics.NETCore.Client": "0.2.510501", + "Microsoft.Win32.Registry": "5.0.0", + "System.Collections.Immutable": "8.0.0", + "System.Reflection.Metadata": "8.0.0", + "System.Reflection.TypeExtensions": "4.7.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Json": "8.0.5" + } + }, + "Microsoft.DotNet.PlatformAbstractions": { + "type": "Transitive", + "resolved": "3.1.6", + "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "6.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Logging.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "6.0.0", + "System.Diagnostics.DiagnosticSource": "6.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Primitives": "6.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==" + }, + "Microsoft.Win32.Registry": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", + "dependencies": { + "System.Security.AccessControl": "5.0.0", + "System.Security.Principal.Windows": "5.0.0" + } + }, + "Perfolizer": { + "type": "Transitive", + "resolved": "0.6.1", + "contentHash": "CR1QmWg4XYBd1Pb7WseP+sDmV8nGPwvmowKynExTqr3OuckIGVMhvmN4LC5PGzfXqDlR295+hz/T7syA1CxEqA==", + "dependencies": { + "Pragmastat": "3.2.4" + } + }, + "Pragmastat": { + "type": "Transitive", + "resolved": "3.2.4", + "contentHash": "I5qFifWw/gaTQT52MhzjZpkm/JPlfjSeO/DTZJjO7+hTKI+0aGRgOgZ3NN6D96dDuuqbIAZSeA5RimtHjqrA2A==" + }, + "System.CodeDom": { + "type": "Transitive", + "resolved": "9.0.5", + "contentHash": "cuzLM2MWutf9ZBEMPYYfd0DXwYdvntp7VCT6a/wvbKCa2ZuvGmW74xi+YBa2mrfEieAXqM4TNKlMmSnfAfpUoQ==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==" + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + } + }, + "System.Management": { + "type": "Transitive", + "resolved": "9.0.5", + "contentHash": "n6o9PZm9p25+zAzC3/48K0oHnaPKTInRrxqFq1fi/5TPbMLjuoCm/h//mS3cUmSy+9AO1Z+qsC/Ilt/ZFatv5Q==", + "dependencies": { + "System.CodeDom": "9.0.5" + } + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==" + }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "VybpaOQQhqE6siHppMktjfGBw1GCwvCqiufqmP8F1nj7fTUNtW35LOEt3UZTEsECfo+ELAl/9o9nJx3U91i7vA==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "System.Security.AccessControl": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "5.0.0", + "System.Security.Principal.Windows": "5.0.0" + } + }, + "System.Security.Principal.Windows": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==" + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.5", + "contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg==" + }, + "easytrace": { + "type": "Project" + } + } + } +} \ No newline at end of file diff --git a/src/EasyTrace.Tests/packages.lock.json b/src/EasyTrace.Tests/packages.lock.json new file mode 100644 index 0000000..e26bf6d --- /dev/null +++ b/src/EasyTrace.Tests/packages.lock.json @@ -0,0 +1,116 @@ +{ + "version": 1, + "dependencies": { + "net9.0": { + "Microsoft.NET.Test.Sdk": { + "type": "Direct", + "requested": "[17.12.0, )", + "resolved": "17.12.0", + "contentHash": "kt/PKBZ91rFCWxVIJZSgVLk+YR+4KxTuHf799ho8WNiK5ZQpJNAEZCAWX86vcKrs+DiYjiibpYKdGZP6+/N17w==", + "dependencies": { + "Microsoft.CodeCoverage": "17.12.0", + "Microsoft.TestPlatform.TestHost": "17.12.0" + } + }, + "NUnit": { + "type": "Direct", + "requested": "[4.5.1, )", + "resolved": "4.5.1", + "contentHash": "x1sIqU9i0IkxqFayqthzmJs/75jTMbrfNMixj4vtfTi7rRzGbtuY27V+iAhfTY02u5k2qvW3QBGM414OG4q8Lw==" + }, + "NUnit.Analyzers": { + "type": "Direct", + "requested": "[4.4.0, )", + "resolved": "4.4.0", + "contentHash": "VVl1CuQttXRZh52HRw5SIOut3qXw4pmuiTYk02jTELVWZ9uYRY8IVl2qF9Zs7W0ElPiLDUrAglFBzNLBCPzEcw==" + }, + "NUnit3TestAdapter": { + "type": "Direct", + "requested": "[4.6.0, )", + "resolved": "4.6.0", + "contentHash": "R7e1+a4vuV/YS+ItfL7f//rG+JBvVeVLX4mHzFEZo4W1qEKl8Zz27AqvQSAqo+BtIzUCo4aAJMYa56VXS4hudw==" + }, + "Verify.NUnit": { + "type": "Direct", + "requested": "[31.16.2, )", + "resolved": "31.16.2", + "contentHash": "1eiIcuUvRW/KFfGECPZiXO33ZwHxHNzwwhVwSMIL3ILMCIDcSvnRE5qMTXk3ZtJmInI+TSBRPPBnIzjzBTCK3w==", + "dependencies": { + "Argon": "0.33.5", + "DiffEngine": "19.1.3", + "NUnit": "4.5.1", + "SimpleInfoName": "3.2.0", + "Verify": "31.16.2" + } + }, + "Argon": { + "type": "Transitive", + "resolved": "0.33.5", + "contentHash": "J6821zxO+EqMzO9C/V5uiWc2eBGyzN7Z8Z0xq3Q1/e6IxYcHDA32OgiZX5/7/f8rVPQQa7aYtm6f0UfnrgKNBg==" + }, + "DiffEngine": { + "type": "Transitive", + "resolved": "19.1.3", + "contentHash": "4Tsn/JeL5GF4RJhW1yTtUPMqYWck1eOfJwE3CrlQsOlrFc9WyUxZPgywB7zvRPi6pVKShzcch0WbTkWe3GB7HA==", + "dependencies": { + "EmptyFiles": "8.18.1" + } + }, + "EmptyFiles": { + "type": "Transitive", + "resolved": "8.18.1", + "contentHash": "5gA7ICU+CafaHJLbrL/lOEABwkmXS6089WoCbn+NkIul2ATAGGzQsD4cXOFmYmQp6b9Jd/f4bb2EK+14dY75Pw==" + }, + "Microsoft.CodeCoverage": { + "type": "Transitive", + "resolved": "17.12.0", + "contentHash": "4svMznBd5JM21JIG2xZKGNanAHNXplxf/kQDFfLHXQ3OnpJkayRK/TjacFjA+EYmoyuNXHo/sOETEfcYtAzIrA==" + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Transitive", + "resolved": "17.12.0", + "contentHash": "TDqkTKLfQuAaPcEb3pDDWnh7b3SyZF+/W9OZvWFp6eJCIiiYFdSB6taE2I6tWrFw5ywhzOb6sreoGJTI6m3rSQ==", + "dependencies": { + "System.Reflection.Metadata": "1.6.0" + } + }, + "Microsoft.TestPlatform.TestHost": { + "type": "Transitive", + "resolved": "17.12.0", + "contentHash": "MiPEJQNyADfwZ4pJNpQex+t9/jOClBGMiCiVVFuELCMSX2nmNfvUor3uFVxNNCg30uxDP8JDYfPnMXQzsfzYyg==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.12.0", + "Newtonsoft.Json": "13.0.1" + } + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.1", + "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + }, + "SimpleInfoName": { + "type": "Transitive", + "resolved": "3.2.0", + "contentHash": "K8ivHRbPWfncijk62Dan/r/z55gwq3aFzqB6yFlD9X0bbpIaacHyHH2cpcIdz0FECUpERUZTwxts0z4gRWpQpA==" + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, + "Verify": { + "type": "Transitive", + "resolved": "31.16.2", + "contentHash": "5FfUZ61HNRr10S/SvXT4NAf61jUw1B+jgxKDN74hHGVW7K+QyZ/M7lyz6fqVF4RHYU6kSZhtVtKWFgrs3yuBQg==", + "dependencies": { + "Argon": "0.33.5", + "DiffEngine": "19.1.3", + "SimpleInfoName": "3.2.0" + } + }, + "easytrace": { + "type": "Project" + } + } + } +} \ No newline at end of file diff --git a/src/EasyTrace/packages.lock.json b/src/EasyTrace/packages.lock.json new file mode 100644 index 0000000..a07e21a --- /dev/null +++ b/src/EasyTrace/packages.lock.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "dependencies": { + "net9.0": {} + } +} \ No newline at end of file From 9064b918019cebb3a8fef6295405982c2b173419 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 11:56:23 +0700 Subject: [PATCH 03/16] Add lock files in CI config --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1efe497..85c1d75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: with: dotnet-version: '9.0.x' cache: true + cache-dependency-path: "**/packages.lock.json" - name: Restore dependencies run: dotnet restore From 04d08518302a4a64ba496a3db8d42326fe97ea31 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 11:58:23 +0700 Subject: [PATCH 04/16] Fix run benchmarks on CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85c1d75..6512fb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,4 +35,4 @@ jobs: - name: Run Benchmarks run: | - dotnet run --project EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter * + dotnet run --project src/EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter * From ec229a1df88a357fbbd52102678e21f49ef31f00 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 12:36:38 +0700 Subject: [PATCH 05/16] Fix run benchmarks --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6512fb4..df65992 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,4 +35,4 @@ jobs: - name: Run Benchmarks run: | - dotnet run --project src/EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter * + dotnet run --project src/EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter '*' From 097cdc2884656db7230a2f165d1fb869afac1561 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 12:41:59 +0700 Subject: [PATCH 06/16] Add check warnings on CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df65992..c246dfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: run: dotnet restore - name: Build solution - run: dotnet build --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore /p:TreatWarningsAsErrors=true - name: Run Tests run: dotnet test --configuration Release --no-build --verbosity normal From a9ce1af4b37b20311161b8c3a58a5d547443a7ec Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 12:43:23 +0700 Subject: [PATCH 07/16] Add check warnings on CI with annotations --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c246dfd..e23892d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,9 @@ jobs: cache: true cache-dependency-path: "**/packages.lock.json" + - name: Setup MSBuild Problem Matcher + uses: ammaraskar/msvc-problem-matcher@master + - name: Restore dependencies run: dotnet restore From 976d0dd4d2b2fc19b3abe968983e75c7829b36d2 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 12:49:18 +0700 Subject: [PATCH 08/16] Fix warnings in solution --- src/EasyTrace/Activity/TraceActivity.cs | 4 ++-- src/EasyTrace/TraceActivitySource.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/EasyTrace/Activity/TraceActivity.cs b/src/EasyTrace/Activity/TraceActivity.cs index c71cadf..ec3d5a4 100644 --- a/src/EasyTrace/Activity/TraceActivity.cs +++ b/src/EasyTrace/Activity/TraceActivity.cs @@ -10,8 +10,8 @@ public class TraceActivity : ITraceActivity, ICopiable public TraceIdentifier TraceId { get; } = TraceIdentifier.CreateTraceId(); public TraceIdentifier SpanId { get; } = TraceIdentifier.CreateSpanId(); - public TraceActivitySource Source { get; internal set; } - public string OperationName { get; set; } + public TraceActivitySource Source { get; internal set; } = TraceActivitySource.Empty; + public string OperationName { get; set; } = string.Empty; public ActivityKind Kind { get; set; } public TimeSpan StartTime { get; set; } public TimeSpan EndTime { get; set; } diff --git a/src/EasyTrace/TraceActivitySource.cs b/src/EasyTrace/TraceActivitySource.cs index 2711eb1..a8f8dd6 100644 --- a/src/EasyTrace/TraceActivitySource.cs +++ b/src/EasyTrace/TraceActivitySource.cs @@ -12,6 +12,8 @@ public class TraceActivitySource(string name, Version? version = null) { private static readonly ThreadLocal ParentActivityByThreadLocal = new(); + internal static TraceActivitySource Empty = new (nameof(Empty)); + internal ITraceTimeProvider TimeProvider { get; init; } = new TraceTimeProvider(); internal ITraceIdentifierGenerator IdentifierGenerator { get; init; } = new Xoshiro256PlusPlus(); internal ITraceActivityExporter? Exporter { get; init; } From 087defffe5fdcb50f1d58a4a14e9bad912eb90ee Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 13:35:45 +0700 Subject: [PATCH 09/16] Add validate benchmark threshold on CI --- .github/workflows/ci.yml | 8 ++++++++ src/EasyTrace.Benchmarks/MemoryBenchmark.cs | 2 ++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e23892d..bfa9219 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,3 +39,11 @@ jobs: - name: Run Benchmarks run: | dotnet run --project src/EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter '*' + + - name: Compare Benchmarks + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: 'benchmarkdotnet' + output-file-path: './BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json' + fail-on-alert: true + alert-threshold: '120%' diff --git a/src/EasyTrace.Benchmarks/MemoryBenchmark.cs b/src/EasyTrace.Benchmarks/MemoryBenchmark.cs index 28adccb..a6f3c3c 100644 --- a/src/EasyTrace.Benchmarks/MemoryBenchmark.cs +++ b/src/EasyTrace.Benchmarks/MemoryBenchmark.cs @@ -9,6 +9,8 @@ namespace EasyTrace.Benchmarks; [MemoryDiagnoser] +[JsonExporterAttribute.Full] +[JsonExporterAttribute.FullCompressed] public class MemoryBenchmark { public static void Run() => BenchmarkRunner.Run(); From 046e58d2c485fe7ad0b5372dce6726209613435a Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 13:41:32 +0700 Subject: [PATCH 10/16] Fix validate benchmark threshold on CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfa9219..7d2a647 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,6 @@ jobs: uses: benchmark-action/github-action-benchmark@v1 with: tool: 'benchmarkdotnet' - output-file-path: './BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json' + output-file-path: BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json fail-on-alert: true alert-threshold: '120%' From 53674772fd4a9ff010cc02aa082de1e4eb95fa6f Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 13:51:21 +0700 Subject: [PATCH 11/16] Fix compare benchmark with save results --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d2a647..5910001 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ on: branches: [ main ] types: [ opened, synchronize, reopened, ready_for_review ] +permissions: + contents: write + jobs: build-and-test: name: Build, Test, and Benchmark @@ -16,6 +19,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} - name: Setup .NET SDK uses: actions/setup-dotnet@v4 @@ -45,5 +50,6 @@ jobs: with: tool: 'benchmarkdotnet' output-file-path: BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json + github-token: ${{ secrets.GITHUB_TOKEN }} fail-on-alert: true alert-threshold: '120%' From a30887e2064ac086383a6064b02e4da40b4a8867 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 14:02:57 +0700 Subject: [PATCH 12/16] Fix compare benchmarks without history --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5910001..fdb327e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,6 @@ jobs: with: tool: 'benchmarkdotnet' output-file-path: BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json - github-token: ${{ secrets.GITHUB_TOKEN }} fail-on-alert: true alert-threshold: '120%' + auto-push: false From 0bf1b9ee069ead4d46a127b9b6b56c5ac465100f Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 14:12:25 +0700 Subject: [PATCH 13/16] Fix compare benchmarks push comment --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdb327e..5c88c00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,3 +53,4 @@ jobs: fail-on-alert: true alert-threshold: '120%' auto-push: false + github-token: ${{ secrets.GITHUB_TOKEN }} From 4ce6111a0aca9756ce1f34e751bb8ab9d5d686d9 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 14:24:55 +0700 Subject: [PATCH 14/16] Del section compare benchmarks --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c88c00..06b2b68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,12 +45,3 @@ jobs: run: | dotnet run --project src/EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter '*' - - name: Compare Benchmarks - uses: benchmark-action/github-action-benchmark@v1 - with: - tool: 'benchmarkdotnet' - output-file-path: BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json - fail-on-alert: true - alert-threshold: '120%' - auto-push: false - github-token: ${{ secrets.GITHUB_TOKEN }} From 59b6ec7193eb797c6266d297309b17643f6d4b79 Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 14:32:57 +0700 Subject: [PATCH 15/16] Add conflict section for test CI --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06b2b68..5c88c00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,3 +45,12 @@ jobs: run: | dotnet run --project src/EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter '*' + - name: Compare Benchmarks + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: 'benchmarkdotnet' + output-file-path: BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json + fail-on-alert: true + alert-threshold: '120%' + auto-push: false + github-token: ${{ secrets.GITHUB_TOKEN }} From df50aabb63a65bfa8a618e25f0e5e1eba48d51fa Mon Sep 17 00:00:00 2001 From: bugRanger Date: Tue, 30 Jun 2026 14:43:04 +0700 Subject: [PATCH 16/16] Revert "Add conflict section for test CI" This reverts commit 59b6ec7193eb797c6266d297309b17643f6d4b79. --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c88c00..06b2b68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,12 +45,3 @@ jobs: run: | dotnet run --project src/EasyTrace.Benchmarks/EasyTrace.Benchmarks.csproj --configuration Release -- --filter '*' - - name: Compare Benchmarks - uses: benchmark-action/github-action-benchmark@v1 - with: - tool: 'benchmarkdotnet' - output-file-path: BenchmarkDotNet.Artifacts/results/EasyTrace.Benchmarks.MemoryBenchmark-report-full-compressed.json - fail-on-alert: true - alert-threshold: '120%' - auto-push: false - github-token: ${{ secrets.GITHUB_TOKEN }}