Skip to content

Commit 9c27cdb

Browse files
committed
Added benchmarks for create_key(), sign() and verify_signature() functions.
1 parent 391687b commit 9c27cdb

6 files changed

Lines changed: 440 additions & 3 deletions

File tree

.github/workflows/cargo-workflow.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,33 @@ jobs:
139139
- run: |
140140
make docker.tests TSSFAPI_TEST_BRANCH=${{ matrix.branch }}
141141
142+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143+
# Benchmarks
144+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145+
benches:
146+
name: benchmarks
147+
needs: [format, checks]
148+
strategy:
149+
matrix:
150+
platform: ["${{ inputs.OS_VERS_MIN }}", "${{ inputs.OS_VERS_MAX }}"]
151+
rust: ["${{ inputs.TOOLCHAIN_MIN }}", "${{ inputs.TOOLCHAIN_MAX }}", "nightly"]
152+
architecture: [amd64, arm64]
153+
runs-on: ubuntu-${{ matrix.architecture == 'arm64' && format('{0}-arm', matrix.platform) || matrix.platform }}
154+
steps:
155+
- uses: actions/checkout@v7
156+
- uses: actions-rust-lang/setup-rust-toolchain@v1
157+
with:
158+
toolchain: ${{ matrix.rust }}
159+
cache: false
160+
- uses: awalsh128/cache-apt-pkgs-action@v1.6.1
161+
with:
162+
packages: pkgconf libtss2-dev uuid-dev libjson-c-dev libcurl4-openssl-dev
163+
version: v3-${{ matrix.architecture }}-${{ matrix.platform }}-${{ matrix.rust }}-${{ github.run_id }}-benches
164+
- run: |
165+
cp -vr examples/data ~/my-fapi-config
166+
make docker.swtpm DETACH=1
167+
make bench TSS2_FAPICONF=~/my-fapi-config/fapi-config.json QUICK_MODE=1
168+
142169
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143170
# Code coverage analysis (codecov)
144171
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)