Skip to content

Commit c9f9a7d

Browse files
committed
Updates.
-Switched to using a Median Absolute Percentage Error calculation for halting/calculating benchmark times. -Also implemented a "DoNotOptimizeAway" function.
1 parent 9fa1f9c commit c9f9a7d

File tree

57 files changed

+548757
-479755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+548757
-479755
lines changed

.github/workflows/CLANG-MacOS.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build-and-Test-CLANG-MacOS
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- dev
9+
10+
jobs:
11+
Build:
12+
runs-on: macos-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
clang: [17]
18+
build_type: [Debug, Release]
19+
std: [20]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install the latest clang compiler.
25+
run: |
26+
brew install llvm
27+
28+
- name: Install Nasm.
29+
run: |
30+
brew install nasm
31+
32+
- name: Configure CMake
33+
working-directory: ./
34+
run: |
35+
cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
36+
37+
- name: Build the Test
38+
working-directory: ./Build
39+
run: |
40+
cmake --build . --config=${{matrix.build_type}}
41+
42+
- name: Install the Test
43+
working-directory: ./Build
44+
run: |
45+
sudo cmake --install . --config=${{matrix.build_type}}
46+
sudo chmod +x /usr/local/bin/Json-Performance
47+
48+
- name: Run the Test
49+
working-directory: /usr/local/bin/
50+
run: |
51+
./Json-Performance
52+
continue-on-error: true
53+

.github/workflows/DeleteRuns.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Delete old workflow runs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
days:
6+
description: 'Days-worth of runs to keep for each workflow'
7+
required: true
8+
default: '0'
9+
minimum_runs:
10+
description: 'Minimum runs to keep for each workflow'
11+
required: true
12+
default: '1'
13+
delete_workflow_pattern:
14+
description: 'Name or filename of the workflow (if not set, all workflows are targeted)'
15+
required: false
16+
delete_workflow_by_state_pattern:
17+
description: 'Filter workflows by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
18+
required: true
19+
default: "ALL"
20+
type: choice
21+
options:
22+
- "ALL"
23+
- active
24+
- deleted
25+
- disabled_inactivity
26+
- disabled_manually
27+
delete_run_by_conclusion_pattern:
28+
description: 'Remove runs based on conclusion: action_required, cancelled, failure, skipped, success'
29+
required: true
30+
default: "ALL"
31+
type: choice
32+
options:
33+
- "ALL"
34+
- "Unsuccessful: action_required,cancelled,failure,skipped"
35+
- action_required
36+
- cancelled
37+
- failure
38+
- skipped
39+
- success
40+
dry_run:
41+
description: 'Logs simulated changes, no deletions are performed'
42+
required: false
43+
44+
jobs:
45+
del_runs:
46+
runs-on: ubuntu-latest
47+
permissions:
48+
actions: write
49+
contents: read
50+
steps:
51+
- name: Delete workflow runs
52+
uses: Mattraks/delete-workflow-runs@v2
53+
with:
54+
token: ${{ github.token }}
55+
repository: ${{ github.repository }}
56+
retain_days: ${{ github.event.inputs.days }}
57+
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
58+
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
59+
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
60+
delete_run_by_conclusion_pattern: >-
61+
${{
62+
startsWith(github.event.inputs.delete_run_by_conclusion_pattern, 'Unsuccessful:')
63+
&& 'action_required,cancelled,failure,skipped'
64+
|| github.event.inputs.delete_run_by_conclusion_pattern
65+
}}
66+
dry_run: ${{ github.event.inputs.dry_run }}

.github/workflows/GCC-Ubuntu.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build-and-Test-GCC-Ubuntu
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- dev
9+
10+
jobs:
11+
Build:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
gcc: [12]
18+
build_type: [Debug, Release]
19+
std: [20]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install the latest gcc compiler.
25+
working-directory: ./
26+
run: |
27+
sudo apt-get install build-essential
28+
sudo apt-get install g++-12
29+
30+
- name: Configure CMake
31+
working-directory: ./
32+
run: |
33+
cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=/usr/bin/g++-12
34+
35+
- name: Build the Test
36+
working-directory: ./Build
37+
run: |
38+
cmake --build . --config=${{matrix.build_type}}
39+
40+
- name: Install the Test
41+
working-directory: ./Build
42+
run: |
43+
sudo cmake --install . --config=${{matrix.build_type}}
44+
sudo chmod +x /usr/local/bin/Json-Performance
45+
46+
- name: Run the Test
47+
working-directory: /usr/local/bin/
48+
run: |
49+
./Json-Performance
50+
continue-on-error: true

.github/workflows/MSVC-Windows.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build-and-Test-MSVC-Windows
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- dev
9+
10+
jobs:
11+
Build:
12+
runs-on: windows-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
msvc: [2022]
18+
build_type: [Debug, Release]
19+
std: [20]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Append the directory of 'vcvarsall.bat' to PATH environment variable
25+
uses: myci-actions/export-env-var-powershell@1
26+
with:
27+
name: PATH
28+
value: $env:PATH;C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build
29+
30+
- name: Configure CMake
31+
working-directory: ./
32+
run: |
33+
cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
34+
35+
- name: Build the Test
36+
working-directory: ./Build
37+
run: |
38+
cmake --build . --config=${{matrix.build_type}}
39+
40+
- name: Install the Test
41+
working-directory: ./Build
42+
run: |
43+
cmake --install . --config=${{matrix.build_type}}
44+
45+
- name: Run the Test
46+
working-directory: C:/Program Files (x86)/Json-Performance/bin
47+
run: |
48+
./Json-Performance.exe
49+
continue-on-error: true
50+

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ target_compile_definitions(
7979
"Json-Performance" PUBLIC
8080
"JSON_TEST_PATH=\"${CMAKE_SOURCE_DIR}/Source/ConformanceTests\""
8181
"JSON_PATH=\"${CMAKE_SOURCE_DIR}/Json\""
82+
"README_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.md\""
8283
)
8384

8485
install(
920 Bytes
Loading
2.77 KB
Loading
-314 Bytes
Loading
265 Bytes
Loading
-3.12 KB
Loading

0 commit comments

Comments
 (0)