mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #10229 from sylvestre/bench-mem
benchmarks: Add memory benchmarks
This commit is contained in:
@@ -18,36 +18,38 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
benchmarks:
|
benchmarks:
|
||||||
name: Run benchmarks (CodSpeed)
|
name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} (CodSpeed)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
benchmark-target:
|
type: [performance, memory]
|
||||||
- { package: uu_base64 }
|
package: [
|
||||||
- { package: uu_cksum }
|
uu_base64,
|
||||||
- { package: uu_cp }
|
uu_cksum,
|
||||||
- { package: uu_cut }
|
uu_cp,
|
||||||
- { package: uu_dd }
|
uu_cut,
|
||||||
- { package: uu_df }
|
uu_dd,
|
||||||
- { package: uu_du }
|
uu_df,
|
||||||
- { package: uu_expand }
|
uu_du,
|
||||||
- { package: uu_fold }
|
uu_expand,
|
||||||
- { package: uu_join }
|
uu_fold,
|
||||||
- { package: uu_ls }
|
uu_join,
|
||||||
- { package: uu_mv }
|
uu_ls,
|
||||||
- { package: uu_nl }
|
uu_mv,
|
||||||
- { package: uu_numfmt }
|
uu_nl,
|
||||||
- { package: uu_rm }
|
uu_numfmt,
|
||||||
- { package: uu_seq }
|
uu_rm,
|
||||||
- { package: uu_shuf }
|
uu_seq,
|
||||||
- { package: uu_sort }
|
uu_shuf,
|
||||||
- { package: uu_split }
|
uu_sort,
|
||||||
- { package: uu_tsort }
|
uu_split,
|
||||||
- { package: uu_unexpand }
|
uu_tsort,
|
||||||
- { package: uu_uniq }
|
uu_unexpand,
|
||||||
- { package: uu_wc }
|
uu_uniq,
|
||||||
- { package: uu_factor }
|
uu_wc,
|
||||||
- { package: uu_date }
|
uu_factor,
|
||||||
|
uu_date
|
||||||
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
@@ -64,19 +66,23 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: cargo install cargo-codspeed --locked
|
run: cargo install cargo-codspeed --locked
|
||||||
|
|
||||||
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
|
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
|
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
|
||||||
cargo codspeed build -p ${{ matrix.benchmark-target.package }}
|
if [ "${{ matrix.type }}" = "memory" ]; then
|
||||||
|
cargo codspeed build -m analysis -p ${{ matrix.package }}
|
||||||
|
else
|
||||||
|
cargo codspeed build -p ${{ matrix.package }}
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
|
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
|
||||||
uses: CodSpeedHQ/action@v4
|
uses: CodSpeedHQ/action@v4
|
||||||
env:
|
env:
|
||||||
CODSPEED_LOG: debug
|
CODSPEED_LOG: debug
|
||||||
with:
|
with:
|
||||||
mode: simulation
|
mode: ${{ matrix.type == 'memory' && 'memory' || 'simulation' }}
|
||||||
run: |
|
run: |
|
||||||
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
|
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
|
||||||
cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
|
cargo codspeed run -p ${{ matrix.package }} > /dev/null
|
||||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user