Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cdbf173
WIP
sethsamuel Apr 21, 2025
9e1c9da
WIP
sethsamuel Apr 21, 2025
2416c30
WIP
sethsamuel Apr 21, 2025
c1f1e3b
Benchmark
sethsamuel Apr 21, 2025
1b8d5ed
Benchmark
sethsamuel Apr 21, 2025
bd53a0f
Benchmark
sethsamuel Apr 21, 2025
184c58a
Benchmark
sethsamuel Apr 21, 2025
490deca
Action
sethsamuel Apr 21, 2025
cd01935
WIP
sethsamuel Apr 21, 2025
49a227f
WIP
sethsamuel Apr 21, 2025
3f5eed0
WIP
sethsamuel Apr 21, 2025
e82f450
WIP
sethsamuel Apr 21, 2025
ae59a28
WIP
sethsamuel Apr 21, 2025
72b2b7e
WIP
sethsamuel Apr 21, 2025
28f14d5
Cache
sethsamuel Apr 21, 2025
cef5224
WIP
sethsamuel Apr 21, 2025
fa46533
WIP
sethsamuel Apr 21, 2025
e026be4
WIP
sethsamuel Apr 21, 2025
6bc4209
WIP
sethsamuel Apr 21, 2025
fe0cd15
WIP
sethsamuel Apr 21, 2025
392d649
WIP
sethsamuel Apr 21, 2025
d806a51
WIP
sethsamuel Apr 21, 2025
0ac84f0
WIP
sethsamuel Apr 21, 2025
96ba1d9
Increase count
sethsamuel Apr 21, 2025
1f9c513
Increase count
sethsamuel Apr 21, 2025
7443804
Cache
sethsamuel Apr 21, 2025
60276d7
Merge branch 'seth.samuel/benchmark' into seth.samuel/digit-optimization
sethsamuel Apr 21, 2025
43643ae
count=6
sethsamuel Apr 21, 2025
ecec58a
WIP
sethsamuel Apr 21, 2025
4bf193b
WIP
sethsamuel Apr 21, 2025
709a0cf
WIP
sethsamuel Apr 21, 2025
4039978
Merge branch 'seth.samuel/benchmark' into seth.samuel/digit-optimization
sethsamuel Apr 21, 2025
c4bbb9a
Cancel in progress
sethsamuel Apr 21, 2025
ed5039f
Merge remote-tracking branch 'origin/main' into seth.samuel/digit-opt…
sethsamuel Apr 21, 2025
bdb652c
Fix tests
sethsamuel Apr 21, 2025
ce3ad6d
Bust cache
sethsamuel Apr 21, 2025
76a01e2
Safer iteration
sethsamuel Apr 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP
  • Loading branch information
sethsamuel committed Apr 21, 2025
commit fe0cd15ed9bceb328158c6d3762f27c3739cf14e
42 changes: 18 additions & 24 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
go-version: [ '1.24' ]

steps:
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Restore main benchmark
uses: actions/cache/restore@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag instead of a hash. (...read more)

Pin GitHub Actions by commit hash to ensure supply chain security.

Using a branch (@main) or tag (@v1) allows for implicit updates, which can introduce unexpected or malicious changes. Instead, always pin actions to a full length commit SHA. You can find the commit SHA for the latest tag from the action’s repository and ensure frequent updates via auto-updaters such as dependabot. Include a comment with the corresponding full-length SemVer tag for clarity:

      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

View in Datadog  Leave us feedback  Documentation

id: restore-main-benchmark
Expand All @@ -29,14 +35,6 @@ jobs:
with:
ref: main
clean: false
- name: Setup Go ${{ matrix.go-version }}
if: steps.restore-main-benchmark.outputs.cache-hit != 'true'
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
if: steps.restore-main-benchmark.outputs.cache-hit != 'true'
- name: Install dependencies
if: steps.restore-main-benchmark.outputs.cache-hit != 'true'
run: go get .
Expand All @@ -56,28 +54,24 @@ jobs:
key: main-benchmark-2
- name: Checkout branch
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install benchstat
run: go get -u golang.org/x/perf/cmd/benchstat
- name: Compare benchmarks
run: benchstat bench/main.txt bench/${{github.sha}}.txt | tee bench/benchstat.txt
- name: Restore main benchmark
uses: actions/cache/restore@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag instead of a hash. (...read more)

Pin GitHub Actions by commit hash to ensure supply chain security.

Using a branch (@main) or tag (@v1) allows for implicit updates, which can introduce unexpected or malicious changes. Instead, always pin actions to a full length commit SHA. You can find the commit SHA for the latest tag from the action’s repository and ensure frequent updates via auto-updaters such as dependabot. Include a comment with the corresponding full-length SemVer tag for clarity:

      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

View in Datadog  Leave us feedback  Documentation

with:
path: bench/main.txt
key: main-benchmark-2
fail-on-cache-miss: true
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Benchmark
run: go test -timeout=9999999s -bench=. -benchmem -count=2 ./... | tee bench/${{github.sha}}.txt
# - name: Install dependencies
# run: go get .
# - name: Build
# run: go build -v ./...
# - name: Benchmark
# run: go test -timeout=9999999s -bench=. -benchmem -count=2 ./... | tee bench/${{github.sha}}.txt
- name: Install benchstat
run: go get -u golang.org/x/perf/cmd/benchstat
- run: go env
- run: echo $PATH
- name: Compare benchmarks
run: benchstat bench/main.txt bench/${{github.sha}}.txt | tee bench/benchstat.txt
- name: Store benchmark
uses: actions/upload-artifact@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag instead of a hash. (...read more)

Pin GitHub Actions by commit hash to ensure supply chain security.

Using a branch (@main) or tag (@v1) allows for implicit updates, which can introduce unexpected or malicious changes. Instead, always pin actions to a full length commit SHA. You can find the commit SHA for the latest tag from the action’s repository and ensure frequent updates via auto-updaters such as dependabot. Include a comment with the corresponding full-length SemVer tag for clarity:

      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

View in Datadog  Leave us feedback  Documentation

with:
Expand Down
Loading