Added matrix test timings
Timings get auto-comitted Update matrix-timing-tests timings [skip ci] Updated readme Update matrix-timing-tests timings [skip ci] Fixing auto-checkout issues
This commit is contained in:
@@ -3,6 +3,8 @@ name: Merge-Checker
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["**"]
|
branches: ["**"]
|
||||||
|
paths-ignore:
|
||||||
|
- 'unit-tests/timing-results/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
@@ -11,11 +13,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
persist-credentials: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install dependencies (CMake + Ninja + build tools)
|
- name: Install dependencies (CMake + Ninja + build tools)
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y cmake ninja-build build-essential time
|
sudo apt-get install -y cmake ninja-build build-essential time git
|
||||||
|
|
||||||
- name: Configure project with CMake
|
- name: Configure project with CMake
|
||||||
run: cmake -G Ninja -S . -B build/
|
run: cmake -G Ninja -S . -B build/
|
||||||
@@ -34,15 +39,45 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Run matrix-timing-tests with per-test timing output
|
- name: Run matrix-timing-tests with per-test timing output and save results
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p unit-tests/timing-results
|
||||||
if [ -x build/unit-tests/matrix-timing-tests ]; then
|
if [ -x build/unit-tests/matrix-timing-tests ]; then
|
||||||
echo "Running matrix-timing-tests with timing"
|
echo "Running matrix-timing-tests with timing"
|
||||||
# Run the test executable and capture timing info
|
/usr/bin/time -v build/unit-tests/matrix-timing-tests -d yes &> unit-tests/timing-results/matrix-timing-tests.txt
|
||||||
# Assuming the executable prints timings per test internally
|
|
||||||
# If not, you might want to wrap each subtest with 'time' or
|
|
||||||
# run the entire executable with time:
|
|
||||||
/usr/bin/time -v build/unit-tests/matrix-timing-tests
|
|
||||||
else
|
else
|
||||||
echo "matrix-timing-tests executable not found or not executable"
|
echo "matrix-timing-tests executable not found or not executable"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Commit and push timing results
|
||||||
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||||
|
run: |
|
||||||
|
git config --global user.name "ci-bot"
|
||||||
|
git config --global user.email "ci-bot@local"
|
||||||
|
|
||||||
|
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
|
||||||
|
git stash
|
||||||
|
echo "Checking out source branch $BRANCH_NAME"
|
||||||
|
git fetch origin "$BRANCH_NAME"
|
||||||
|
git checkout "$BRANCH_NAME"
|
||||||
|
git pull
|
||||||
|
|
||||||
|
echo "Checking if last commit was a timing update"
|
||||||
|
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)
|
||||||
|
|
||||||
|
if echo "$LAST_COMMIT_MSG" | grep -q "Update matrix-timing-tests timings"; then
|
||||||
|
echo "Last commit was a timing update, skipping commit."
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Last commit name was: $LAST_COMMIT_MSG"
|
||||||
|
git stash pop
|
||||||
|
fi
|
||||||
|
|
||||||
|
git add unit-tests/timing-results/matrix-timing-tests.txt
|
||||||
|
|
||||||
|
if git diff --quiet --cached; then
|
||||||
|
echo "No changes to commit"
|
||||||
|
else
|
||||||
|
git commit -m "Update matrix-timing-tests timings [skip ci]"
|
||||||
|
git push origin "$BRANCH_NAME"
|
||||||
fi
|
fi
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
# Introduction
|
# Introduction
|
||||||
This matrix math library is focused on embedded development and avoids any heap memory allocation unless you explicitly ask for it.
|
This matrix math library is focused on embedded development and avoids any heap memory allocation unless you explicitly ask for it.
|
||||||
|
It uses templates to pre-allocate matrices on the stack.
|
||||||
56
unit-tests/timing-results/matrix-timing-tests.txt
Normal file
56
unit-tests/timing-results/matrix-timing-tests.txt
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
Randomness seeded to: 942964370
|
||||||
|
0.184 s: Addition
|
||||||
|
0.185 s: Timing Tests
|
||||||
|
0.189 s: Subtraction
|
||||||
|
0.189 s: Timing Tests
|
||||||
|
1.911 s: Multiplication
|
||||||
|
1.911 s: Timing Tests
|
||||||
|
0.127 s: Scalar Multiplication
|
||||||
|
0.127 s: Timing Tests
|
||||||
|
0.179 s: Element Multiply
|
||||||
|
0.179 s: Timing Tests
|
||||||
|
0.178 s: Element Divide
|
||||||
|
0.178 s: Timing Tests
|
||||||
|
0.156 s: Minor Matrix
|
||||||
|
0.156 s: Timing Tests
|
||||||
|
0.103 s: Determinant
|
||||||
|
0.103 s: Timing Tests
|
||||||
|
0.416 s: Matrix of Minors
|
||||||
|
0.416 s: Timing Tests
|
||||||
|
0.109 s: Invert
|
||||||
|
0.109 s: Timing Tests
|
||||||
|
0.127 s: Transpose
|
||||||
|
0.127 s: Timing Tests
|
||||||
|
0.207 s: Normalize
|
||||||
|
0.207 s: Timing Tests
|
||||||
|
0.006 s: GET ROW
|
||||||
|
0.007 s: Timing Tests
|
||||||
|
0.290 s: GET COLUMN
|
||||||
|
0.290 s: Timing Tests
|
||||||
|
===============================================================================
|
||||||
|
test cases: 1 | 1 passed
|
||||||
|
assertions: - none -
|
||||||
|
|
||||||
|
Command being timed: "build/unit-tests/matrix-timing-tests -d yes"
|
||||||
|
User time (seconds): 4.17
|
||||||
|
System time (seconds): 0.00
|
||||||
|
Percent of CPU this job got: 99%
|
||||||
|
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.18
|
||||||
|
Average shared text size (kbytes): 0
|
||||||
|
Average unshared data size (kbytes): 0
|
||||||
|
Average stack size (kbytes): 0
|
||||||
|
Average total size (kbytes): 0
|
||||||
|
Maximum resident set size (kbytes): 3072
|
||||||
|
Average resident set size (kbytes): 0
|
||||||
|
Major (requiring I/O) page faults: 184
|
||||||
|
Minor (reclaiming a frame) page faults: 175
|
||||||
|
Voluntary context switches: 1
|
||||||
|
Involuntary context switches: 130
|
||||||
|
Swaps: 0
|
||||||
|
File system inputs: 12
|
||||||
|
File system outputs: 1
|
||||||
|
Socket messages sent: 0
|
||||||
|
Socket messages received: 0
|
||||||
|
Signals delivered: 0
|
||||||
|
Page size (bytes): 4096
|
||||||
|
Exit status: 0
|
||||||
Reference in New Issue
Block a user