Skip to content

Commit

Permalink
ci: Enhance benchmarking traceability for bench comments (#850)
Browse files Browse the repository at this point in the history
- Enhanced the benchmark output's system information in `merge-tests.yml` to include CPU model and total RAM besides GPU name.
  • Loading branch information
huitseeker authored Nov 4, 2023
1 parent 7190cbc commit f5ab086
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/merge-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,17 @@ jobs:
- name: copy the benchmark template and prepare it with data
run: |
cp .github/tables.toml .
sed -i -Ee 's/^"""$//g' tables.toml
echo "$(nvidia-smi --query-gpu=gpu_name --format=csv|tail -n1)\n\"\"\"" >> tables.toml
# Get GPU name
GPU_NAME=$(nvidia-smi --query-gpu=gpu_name --format=csv,noheader,nounits | tail -n1)
# Get CPU model
CPU_MODEL=$(grep '^model name' /proc/cpuinfo | head -1 | awk -F ': ' '{ print $2 }')
# Get total RAM
TOTAL_RAM=$(grep MemTotal /proc/meminfo | awk '{print $2 $3}')
# Use conditionals to ensure that only non-empty variables are inserted
[[ ! -z "$GPU_NAME" ]] && sed -i "/^\"\"\"$/i $GPU_NAME" tables.toml
[[ ! -z "$CPU_MODEL" ]] && sed -i "/^\"\"\"$/i $CPU_MODEL" tables.toml
[[ ! -z "$TOTAL_RAM" ]] && sed -i "/^\"\"\"$/i $TOTAL_RAM" tables.toml
working-directory: ${{ github.workspace }}
# Create a `criterion-table` and write in commit comment
- name: Run `criterion-table`
Expand Down

1 comment on commit f5ab086

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarks

Table of Contents

Overview

This benchmark report shows the Fibonacci GPU benchmark.
NVIDIA GeForce RTX 4070
AMD Ryzen 9 3950X 16-Core Processor
131817664kB

Benchmark Results

LEM Prove

Fibonacci-rc=100 Fibonacci-rc=600
num-100 4.00 s (✅ 1.00x) 3.06 s (✅ 1.31x faster)
num-200 8.17 s (✅ 1.00x) 7.27 s (✅ 1.12x faster)

Made with criterion-table

Please sign in to comment.