Repository navigation
Reduce native scalar admission allocations #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmarks | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| native_serialization_only: | |
| description: Run only source checks and native serialization diagnostics | |
| type: boolean | |
| default: false | |
| raw_storage_only: | |
| description: Run only source checks and the isolated raw cache evaluation | |
| type: boolean | |
| default: false | |
| permissions: {contents: read, actions: read} | |
| concurrency: | |
| group: keyload-benchmarks-${{ github.ref }}${{ inputs.raw_storage_only && '-raw-storage' || '' }}${{ inputs.native_serialization_only && '-native-serialization' || '' }} | |
| cancel-in-progress: false | |
| jobs: | |
| comparison-build: | |
| name: Build and check KeyLoad | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check diagnostic mode selection | |
| env: {NATIVE_ONLY: "${{ inputs.native_serialization_only }}", RAW_ONLY: "${{ inputs.raw_storage_only }}"} | |
| run: | | |
| if [ "$NATIVE_ONLY" = true ] && [ "$RAW_ONLY" = true ]; then | |
| echo 'Select only one diagnostic mode.' >&2 | |
| exit 1 | |
| fi | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| global-json-file: global.json | |
| - name: Restore .NET packages | |
| run: dotnet restore KeyLoad.slnx | |
| - name: Build KeyLoad | |
| run: dotnet build KeyLoad.slnx --no-restore --configuration Release | |
| - name: Check code formatting | |
| run: dotnet format KeyLoad.slnx --verify-no-changes --no-restore | |
| - name: Check repository rules | |
| run: node scripts/Features/RepositoryGovernance/verify.mjs | |
| - name: Save build diagnostics | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: code-quality-comparisons | |
| path: artifacts/code-quality/** | |
| if-no-files-found: error | |
| comparison-plan: | |
| name: Plan benchmark runs | |
| if: github.repository == 'managedcode/KeyLoad' && github.ref == 'refs/heads/main' && !inputs.raw_storage_only && !inputs.native_serialization_only | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| outputs: | |
| crud: ${{ steps.plan.outputs.crud_matrix }} | |
| specialized: ${{ steps.plan.outputs.specialized_matrix }} | |
| preflight: ${{ steps.plan.outputs.preflight_matrix }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Plan all benchmark scenarios | |
| id: plan | |
| run: node scripts/Features/BenchmarkComparisons/isolated-plan.mjs --output="$RUNNER_TEMP/isolated-plan.json" --github-output="$GITHUB_OUTPUT" | |
| - name: Save benchmark plan | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-plan | |
| path: ${{ runner.temp }}/isolated-plan.json | |
| if-no-files-found: error | |
| retention-days: 90 | |
| comparison-images: | |
| name: Build Docker images | |
| if: github.repository == 'managedcode/KeyLoad' && github.ref == 'refs/heads/main' && !inputs.raw_storage_only && !inputs.native_serialization_only | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| permissions: {contents: read, actions: read} | |
| outputs: | |
| bundle-artifact-id: ${{ steps.bundle.outputs.artifact-id }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| KEYLOAD_COMPARISON_JOB_NAME: Build Docker images | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 | |
| with: | |
| global-json-file: global.json | |
| - name: Check Docker | |
| run: docker version | |
| - name: Build KeyLoad server and benchmark Docker images | |
| id: images | |
| run: node scripts/Features/BenchmarkComparisons/prepare-images.mjs | |
| - name: Configure Docker image references | |
| env: | |
| KEYLOAD_SERVER_IMAGE: ${{ steps.images.outputs.server-image }} | |
| KEYLOAD_RUNNER_IMAGE: ${{ steps.images.outputs.load-generator-image }} | |
| run: | | |
| test -n "$KEYLOAD_SERVER_IMAGE" && test -n "$KEYLOAD_RUNNER_IMAGE" | |
| printf 'KeyLoad__ContainerImages__Server=%s\nBenchmarks__ContainerImages__LoadGenerator=%s\nKEYLOAD_IMAGE_RECEIPT=%s\n' "$KEYLOAD_SERVER_IMAGE" "$KEYLOAD_RUNNER_IMAGE" "$RUNNER_TEMP/keyload-images/image-receipt.json" >> "$GITHUB_ENV" | |
| - name: Restore .NET packages | |
| run: dotnet restore KeyLoad.slnx | |
| - name: Build benchmark tests | |
| run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release | |
| - name: Check TimescaleDB Docker image and startup tools | |
| env: | |
| KEYLOAD_TIMESERIES_IMAGE_FACTS_DIRECTORY: ${{ runner.temp }}/keyload-timeseries-image-facts | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/TimeSeriesIntensivePinnedImageTests/*' --results-directory TestResults/timeseries-image | |
| - name: Save TimescaleDB image checks | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: timeseries-native-pinned-image-facts | |
| path: | | |
| ${{ runner.temp }}/keyload-timeseries-image-facts/** | |
| **/TestResults/** | |
| artifacts/code-quality/** | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Check Docker image export and import | |
| id: roundtrip | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/ImageBundleRealTests/*' --results-directory TestResults/comparison-images/image-roundtrip | |
| - name: Verify GitHub job identity | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedGitHubCurrentJobTests/*' --results-directory TestResults/comparison-images/job-identity | |
| - name: Test database cluster resource models | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/Isolated*Resource*/*' --results-directory TestResults/comparison-images/resource-models | |
| - name: Test MongoDB readiness configuration | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/MongoReadinessResourceTests/*' --results-directory TestResults/comparison-images/mongo-resource | |
| - name: Test MongoDB node identity | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/MongoReadinessIdentityTests/*' --results-directory TestResults/comparison-images/mongo-identity | |
| - name: Test MongoDB startup failure handling | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/MongoReadinessTaskFailureTests/*' --results-directory TestResults/comparison-images/mongo-task-failure | |
| - name: Test KurrentDB storage failure handling | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedKurrentVolumeRegressionFailureTests/*' --results-directory TestResults/comparison-images/kurrent-volume-failure | |
| - name: Test KeyLoad request admission | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedKeyLoadAdmissionTests/*' --results-directory TestResults/comparison-images/keyload-admission | |
| - name: Test bounded database log buffers | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/ComparisonResourceLogBufferTests/*' --results-directory TestResults/comparison-images/log-buffer | |
| - name: Test KeyLoad replay admission | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedKeyLoadReplayAdmissionTests/*' --results-directory TestResults/comparison-images/replay-admission | |
| - name: Test Redis replica error reporting | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/RedisReplicaDiagnosticTests/*' --results-directory TestResults/comparison-images/redis-diagnostics | |
| - name: Test MongoDB startup error reporting | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/MongoBootstrapDiagnosticTests/*' --results-directory TestResults/comparison-images/mongo-diagnostics | |
| - name: Test KurrentDB cleanup error reporting | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/KurrentCleanupDiagnosticTests/*' --results-directory TestResults/comparison-images/kurrent-diagnostics | |
| - name: Test KurrentDB stream ownership | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/KurrentStreamOwnershipTests/*' --results-directory TestResults/comparison-images/kurrent-stream-ownership | |
| - name: Test database replay logs | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/ComparisonReplayDiagnosticLogTests/*' --results-directory TestResults/comparison-images/replay-log | |
| - name: Test database replay log retention | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/ComparisonReplayDiagnosticRetentionTests/*' --results-directory TestResults/comparison-images/replay-retention | |
| - name: Test time-series workload correctness | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/TimeSeriesWorkloadTests/*' --results-directory TestResults/comparison-images/timeseries-workload | |
| - name: Check published time-series package version | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/TimeSeriesPackageVersionTests/*' --results-directory TestResults/comparison-images/timeseries-package | |
| - name: Test KeyLoad time-series cluster configuration | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedTimeSeriesKeyLoadResourceTests/*' --results-directory TestResults/comparison-images/timeseries-keyload-model | |
| - name: Test TimescaleDB cluster configuration | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedTimeSeriesTimescaleResourceTests/*' --results-directory TestResults/comparison-images/timeseries-timescale-model | |
| - name: Test time-series workload configuration | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedTimeSeriesBenchmarkResourceTests/*' --results-directory TestResults/comparison-images/timeseries-family-model | |
| - name: Save Docker images | |
| id: bundle | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-image-bundle | |
| path: ${{ runner.temp }}/keyload-image-bundle/* | |
| if-no-files-found: error | |
| compression-level: 0 | |
| retention-days: 90 | |
| - name: Clean up Docker registry after image failure | |
| if: ${{ always() && steps.roundtrip.outcome != 'success' && (steps.images.outcome == 'success' || steps.images.outcome == 'failure') }} | |
| run: node scripts/Features/BenchmarkComparisons/cleanup-images.mjs | |
| - name: Save Docker image checks and test results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-images-qualification | |
| path: | | |
| ${{ runner.temp }}/keyload-images/** | |
| ${{ runner.temp }}/keyload-images-build/** | |
| ${{ runner.temp }}/keyload-cell-github/** | |
| **/TestResults/** | |
| artifacts/code-quality/** | |
| if-no-files-found: error | |
| retention-days: 90 | |
| comparison-preflight: | |
| name: Check database / ${{ matrix.id }} | |
| needs: [comparison-plan, comparison-images] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 150 | |
| permissions: {contents: read, actions: read} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.comparison-plan.outputs.preflight) }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| KEYLOAD_COMPARISON_CELL_ID: ${{ matrix.id }} | |
| KEYLOAD_COMPARISON_JOB_NAME: Check database / ${{ matrix.id }} | |
| Benchmarks__Target: ${{ matrix.target }} | |
| Benchmarks__NodeCount: ${{ matrix.nodeCount }} | |
| Benchmarks__Scenario: ${{ matrix.scenario }} | |
| Benchmarks__EvidenceProfile: ${{ matrix.profile }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Prepare database containers | |
| id: images | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellSetup | |
| with: | |
| bundle-artifact-id: ${{ needs.comparison-images.outputs.bundle-artifact-id }} | |
| - name: Restore .NET packages | |
| run: dotnet restore KeyLoad.slnx | |
| - name: Build benchmark tests | |
| run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release | |
| - name: Run database workload | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedNativeComparisonTests/*' | |
| - name: Save benchmark results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-preflight-${{ matrix.id }} | |
| path: artifacts/comparisons/isolated/workers/${{ matrix.id }}/* | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Clean up containers and save logs | |
| if: always() | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellTeardown | |
| with: | |
| setup-outcome: ${{ steps.images.outcome }} | |
| artifact-name: comparison-preflight-qualification-${{ matrix.id }} | |
| comparison-crud: | |
| name: Benchmark / ${{ matrix.id }} | |
| needs: [comparison-plan, comparison-images] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 150 | |
| permissions: {contents: read, actions: read} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.comparison-plan.outputs.crud) }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| KEYLOAD_COMPARISON_CELL_ID: ${{ matrix.id }} | |
| KEYLOAD_COMPARISON_JOB_NAME: Benchmark / ${{ matrix.id }} | |
| Benchmarks__Target: ${{ matrix.target }} | |
| Benchmarks__NodeCount: ${{ matrix.nodeCount }} | |
| Benchmarks__Scenario: ${{ matrix.scenario }} | |
| Benchmarks__EvidenceProfile: ${{ matrix.profile }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Prepare database containers | |
| id: images | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellSetup | |
| with: | |
| bundle-artifact-id: ${{ needs.comparison-images.outputs.bundle-artifact-id }} | |
| - name: Restore .NET packages | |
| run: dotnet restore KeyLoad.slnx | |
| - name: Build benchmark tests | |
| run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release | |
| - name: Run database workload | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedNativeComparisonTests/*' | |
| - name: Save benchmark results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-worker-${{ matrix.id }} | |
| path: artifacts/comparisons/isolated/workers/${{ matrix.id }}/* | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Clean up containers and save logs | |
| if: always() | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellTeardown | |
| with: | |
| setup-outcome: ${{ steps.images.outcome }} | |
| artifact-name: comparison-case-qualification-${{ matrix.id }} | |
| comparison-specialized: | |
| name: Benchmark / ${{ matrix.id }} | |
| needs: [comparison-plan, comparison-images] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 150 | |
| permissions: {contents: read, actions: read} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.comparison-plan.outputs.specialized) }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| KEYLOAD_COMPARISON_CELL_ID: ${{ matrix.id }} | |
| KEYLOAD_COMPARISON_JOB_NAME: Benchmark / ${{ matrix.id }} | |
| Benchmarks__Target: ${{ matrix.target }} | |
| Benchmarks__NodeCount: ${{ matrix.nodeCount }} | |
| Benchmarks__Scenario: ${{ matrix.scenario }} | |
| Benchmarks__EvidenceProfile: ${{ matrix.profile }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Prepare database containers | |
| id: images | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellSetup | |
| with: | |
| bundle-artifact-id: ${{ needs.comparison-images.outputs.bundle-artifact-id }} | |
| - name: Restore .NET packages | |
| run: dotnet restore KeyLoad.slnx | |
| - name: Build benchmark tests | |
| run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release | |
| - name: Run database workload | |
| run: dotnet test --project tests/KeyLoad.ComparisonTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/IsolatedNativeComparisonTests/*' | |
| - name: Save benchmark results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-worker-${{ matrix.id }} | |
| path: artifacts/comparisons/isolated/workers/${{ matrix.id }}/* | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Clean up containers and save logs | |
| if: always() | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellTeardown | |
| with: | |
| setup-outcome: ${{ steps.images.outcome }} | |
| artifact-name: comparison-case-qualification-${{ matrix.id }} | |
| raw-storage-correctness: | |
| name: Check raw storage contracts | |
| if: github.repository == 'managedcode/KeyLoad' && github.ref == 'refs/heads/main' && inputs.raw_storage_only && !inputs.native_serialization_only | |
| needs: comparison-build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Qualify real cache and report contracts | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/RawStorageEvaluation | |
| with: | |
| mode: correctness | |
| raw-storage: | |
| name: Raw cache benchmark / ${{ matrix.engine }} | |
| if: github.repository == 'managedcode/KeyLoad' && github.ref == 'refs/heads/main' && inputs.raw_storage_only && !inputs.native_serialization_only | |
| needs: [comparison-build, raw-storage-correctness] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| engine: [zonetree, tsavorite] | |
| env: | |
| KEYLOAD_RAW_STORAGE_ENGINE: ${{ matrix.engine }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Measure the selected resident engine | |
| uses: ./.github/workflows/Features/BenchmarkComparisons/RawStorageEvaluation | |
| with: | |
| mode: benchmark | |
| engine: ${{ matrix.engine }} | |
| native-serialization: | |
| name: Measure native serialization | |
| if: github.repository == 'managedcode/KeyLoad' && github.ref == 'refs/heads/main' && inputs.native_serialization_only && !inputs.raw_storage_only | |
| needs: comparison-build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| permissions: {contents: read, actions: read} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 | |
| with: | |
| global-json-file: global.json | |
| - name: Restore .NET packages | |
| run: dotnet restore KeyLoad.slnx | |
| - name: Build diagnostic tests and generated benchmark host | |
| run: dotnet build KeyLoad.slnx --no-restore --configuration Release | |
| - name: Test native diagnostic contracts and generated consumers | |
| run: dotnet test --project tests/KeyLoad.UnitTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/NativeSerialization*/*' --results-directory artifacts/native-diagnostic-tests/normal | |
| - name: Test diagnostic contracts without hardware intrinsics | |
| env: | |
| DOTNET_EnableHWIntrinsic: 0 | |
| run: dotnet test --project tests/KeyLoad.UnitTests --no-build --no-restore --configuration Release --treenode-filter '/*/*/NativeSerialization*/*' --results-directory artifacts/native-diagnostic-tests/scalar | |
| - name: Record source packages runtime and execution identity | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| KEYLOAD_NATIVE_SERIALIZATION_CORPUS_DIRECTORY: ${{ github.workspace }}/artifacts/native-serialization/corpus | |
| run: node scripts/Features/BenchmarkComparisons/native-serialization-evidence.mjs --mode=prepare --directory=artifacts/native-serialization | |
| - name: Measure all native and historical JSON diagnostic cases | |
| env: | |
| KEYLOAD_NATIVE_SERIALIZATION_CORPUS_DIRECTORY: ${{ github.workspace }}/artifacts/native-serialization/corpus | |
| run: | | |
| status=0 | |
| dotnet benchmarks/KeyLoad.Benchmarks/bin/Release/net10.0/KeyLoad.Benchmarks.dll --filter '*Native*SerializationBenchmarks*' --exporters fulljson csv --memory --keepFiles --logBuildOutput --stopOnFirstError --artifacts artifacts/native-serialization > artifacts/native-serialization/stdout.txt 2> artifacts/native-serialization/stderr.txt || status=$? | |
| cat artifacts/native-serialization/stdout.txt | |
| cat artifacts/native-serialization/stderr.txt >&2 | |
| exit "$status" | |
| - name: Require all original measurements and their provenance | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| KEYLOAD_NATIVE_SERIALIZATION_CORPUS_DIRECTORY: ${{ github.workspace }}/artifacts/native-serialization/corpus | |
| run: node scripts/Features/BenchmarkComparisons/native-serialization-evidence.mjs --mode=verify --directory=artifacts/native-serialization | |
| - name: Save original measurements diagnostics and failures | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: native-serialization-measurements | |
| path: | | |
| artifacts/native-serialization/** | |
| artifacts/native-diagnostic-tests/** | |
| artifacts/code-quality/** | |
| if-no-files-found: error | |
| retention-days: 90 | |
| comparison-aggregate: | |
| name: Combine benchmark results | |
| needs: [comparison-build, comparison-plan, comparison-images, comparison-preflight, comparison-crud, comparison-specialized] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 150 | |
| permissions: {contents: read, actions: read} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Verify benchmark plan | |
| run: node scripts/Features/BenchmarkComparisons/isolated-plan.mjs --output="$RUNNER_TEMP/isolated-plan.json" | |
| - name: Download benchmark results | |
| run: node scripts/Features/BenchmarkComparisons/isolated-github-collect.mjs --plan="$RUNNER_TEMP/isolated-plan.json" --input="$RUNNER_TEMP/isolated-capture" | |
| - name: Check all 270 benchmark results | |
| run: node scripts/Features/BenchmarkComparisons/aggregate-cli.mjs --plan="$RUNNER_TEMP/isolated-plan.json" --input="$RUNNER_TEMP/isolated-capture/data" --proof="$RUNNER_TEMP/isolated-capture/github/proof.json" --output="$RUNNER_TEMP/isolated-aggregate" | |
| - name: Generate website benchmark data | |
| run: node site/scripts/build.mjs --isolated="$RUNNER_TEMP/isolated-aggregate" --output="$RUNNER_TEMP/isolated-site" --revision="$GITHUB_SHA" --site-revision="$GITHUB_SHA" --evidence-url="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" | |
| - name: Save website benchmark data | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-isolated-site-candidate | |
| path: ${{ runner.temp }}/isolated-site/** | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Save combined benchmark results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-isolated-suite | |
| path: ${{ runner.temp }}/isolated-aggregate/** | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Save GitHub result verification | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: comparison-isolated-provider-evidence | |
| path: ${{ runner.temp }}/isolated-capture/github/** | |
| if-no-files-found: error | |
| retention-days: 90 | |
| qualify: | |
| name: Check website | |
| needs: comparison-aggregate | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| permissions: {contents: read, actions: read} | |
| outputs: | |
| mode: ${{ steps.qualification.outputs.mode }} | |
| site_revision: ${{ steps.qualification.outputs.site_revision }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.workflow_sha }} | |
| path: control | |
| persist-credentials: false | |
| - name: Run website checks | |
| id: qualification | |
| uses: ./control/.github/workflows/Features/BenchmarkComparisons/QualifySite | |
| deploy: | |
| name: Publish website | |
| needs: qualify | |
| if: needs.qualify.result == 'success' && needs.qualify.outputs.mode == 'publish' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| permissions: {contents: read, actions: read, pages: write, id-token: write} | |
| environment: {name: github-pages, url: '${{ steps.publication.outputs.page_url }}'} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| QUALIFIED_REVISION: ${{ needs.qualify.outputs.site_revision }} | |
| CONTROL_REVISION: ${{ github.workflow_sha }} | |
| steps: | |
| - name: Download source code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.workflow_sha }} | |
| path: control | |
| persist-credentials: false | |
| - name: Publish website | |
| id: publication | |
| uses: ./control/.github/workflows/Features/BenchmarkComparisons/DeploySite |