Skip to content

Fix for #4791 - don't use WSTrust for ROPC except for AAD authorities… #177

Fix for #4791 - don't use WSTrust for ROPC except for AAD authorities…

Fix for #4791 - don't use WSTrust for ROPC except for AAD authorities… #177

name: Run performance benchmarks
on:
workflow_dispatch: # Allows manual triggering of workflow
push:
branches:
- main
paths:
- src/client/Microsoft.Identity.Client/**/*.cs
permissions:
# Contents permission to update benchmark contents in gh-pages branch
contents: read
jobs:
benchmark:
permissions:
contents: write # Elevate permissions specifically for this job
name: Run performance benchmarks
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
with:
dotnet-version: '6.0.418'
- name: Run benchmark
run: cd tests/Microsoft.Identity.Test.Performance && dotnet run -c release -f net6.0 --exporters json
- name: Download previous benchmark data
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store AcquireTokenNoCacheTests result
uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3
with:
name: AcquireTokenNoCache
tool: 'benchmarkdotnet'
output-file-path: tests/Microsoft.Identity.Test.Performance/BenchmarkDotNet.Artifacts/results/Microsoft.Identity.Test.Performance.AcquireTokenNoCacheTests-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '130%'
comment-on-alert: true
fail-on-alert: true
summary-always: true
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmarks
- name: Store AcquireTokenForClientCacheTests result
uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3
with:
name: AcquireTokenForClientWithCache
tool: 'benchmarkdotnet'
output-file-path: tests/Microsoft.Identity.Test.Performance/BenchmarkDotNet.Artifacts/results/Microsoft.Identity.Test.Performance.AcquireTokenForClientCacheTests-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '130%'
comment-on-alert: true
fail-on-alert: true
summary-always: true
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmarks
- name: Store AcquireTokenForOboCacheTests result
uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3
with:
name: AcquireTokenForOboWithCache
tool: 'benchmarkdotnet'
output-file-path: tests/Microsoft.Identity.Test.Performance/BenchmarkDotNet.Artifacts/results/Microsoft.Identity.Test.Performance.AcquireTokenForOboCacheTests-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '130%'
comment-on-alert: true
fail-on-alert: true
summary-always: true
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmarks
- name: Store TokenCacheTests result
uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3
with:
name: TokenCacheTestsWithCache
tool: 'benchmarkdotnet'
output-file-path: tests/Microsoft.Identity.Test.Performance/BenchmarkDotNet.Artifacts/results/Microsoft.Identity.Test.Performance.TokenCacheTests-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '130%'
comment-on-alert: true
fail-on-alert: true
summary-always: true
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmarks