Skip to content

Commit

Permalink
Merge branch 'main' into build-use-system-nss
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert authored Mar 14, 2024
2 parents ea65534 + 179e075 commit c14185a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 20 deletions.
7 changes: 3 additions & 4 deletions .github/actions/quic-interop-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ runs:
cd quic-interop-runner
jq --arg key "${{ inputs.name }}" --argjson newEntry '{"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json
cat implementations.json
ARGS="--log-dir logs --must-include ${{ inputs.name }}"
ARGS="--log-dir logs --markdown --must-include ${{ inputs.name }}"
if [ -n "${{ inputs.client }}" ]; then
ARGS="$ARGS --client ${{ inputs.client }}"
fi
Expand All @@ -92,9 +92,8 @@ runs:
run: |
echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> comment
echo '' >> comment
echo '```' >> comment
cat quic-interop-runner/summary >> comment
echo '```' >> comment
# Ignore all, but table, which starts with "|:--".
cat quic-interop-runner/summary | awk '/^\|:--/{flag=1} flag' >> comment
echo '' >> comment
shell: bash

Expand Down
51 changes: 35 additions & 16 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ./target/criterion
key: criterion-${{ runner.os }}-${{ hashFiles('./target/criterion/**.json') }}
restore-keys: criterion-${{ runner.os }}-
key: criterion-${{ runner.name }}-${{ github.sha }}
restore-keys: criterion-${{ runner.name }}-

# Disable turboboost, hyperthreading and use performance governor.
- name: Prepare machine
Expand Down Expand Up @@ -115,12 +115,44 @@ jobs:
perf report -i server/perf.data --no-children --stdio > server.perf.txt &
wait
- name: Format results as Markdown
id: results
run: |
{
echo "### Benchmark results"
echo
} > results.md
SHA=$(cat target/criterion/baseline-sha.txt)
if [ -n "$SHA" ]; then
{
echo "Performance differences relative to $SHA."
echo
} >> results.md
fi
grep -Ev 'ignored|running \d+ tests|%\)' results.txt |\
sed -E -e 's/(Performance has regressed.)/:broken_heart: **\1**/gi' \
-e 's/(Performance has improved.)/:green_heart: **\1**/gi' \
-e 's/^ +/ /gi' \
-e 's/^([a-z0-9].*)$/* **\1**/gi' \
-e 's/(change:[^%]*% )([^%]*%)(.*)/\1**\2**\3/gi' \
>> results.md
- name: Remember main-branch push URL
if: github.ref == 'refs/heads/main'
run: echo "${{ github.sha }}" > target/criterion/baseline-sha.txt

- name: Store history
if: github.ref == 'refs/heads/main'
run: |
mkdir -p target/criterion-history
cp -r target/criterion "target/criterion-history/$(date +%s)-${{ github.sha }}"
- name: Cache main-branch results
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@v4
with:
path: ./target/criterion
key: ${{ steps.criterion-cache.outputs.cache-primary-key }}
key: criterion-${{ runner.name }}-${{ github.sha }}

- name: Export perf data
id: export
Expand All @@ -135,19 +167,6 @@ jobs:
target/criterion*
compression-level: 9

- name: Format results as Markdown
id: results
run: |
echo '### Benchmark results' > results.md
grep -Ev 'ignored|running \d+ tests|%\)' results.txt |\
sed -E -e 's/(Performance has regressed.)/:broken_heart: **\1**/gi' \
-e 's/(Performance has improved.)/:green_heart: **\1**/gi' \
-e 's/^ +/ /gi' \
-e 's/^([a-z0-9].*)$/* **\1**/gi' \
-e 's/(change:[^%]*% )([^%]*%)(.*)/\1**\2**\3/gi' \
>> results.md
echo '' >> results.md
- name: Export PR comment data
uses: ./.github/actions/pr-comment-data-export
with:
Expand Down

0 comments on commit c14185a

Please sign in to comment.