Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No benchmark found #5

Closed
Brian-Williams opened this issue Jan 1, 2020 · 2 comments
Closed

No benchmark found #5

Brian-Williams opened this issue Jan 1, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Brian-Williams
Copy link

Brian-Williams commented Jan 1, 2020

Hi, thanks for the cool action. I'm relatively new with actions, so may have made an obvious mistake. As far as I know the only major change is making the repo public and haven't changed the configuration, however now I am receiving a no benchmark found.

I was expecting there to possibly be a problem with the pages commit, but not the output itself not being found.

Error

##[error]No benchmark result was found in /home/runner/work/retry/retry/output.txt. Benchmark output was

I added a step before showing that output was in the above location.

Config

  benchmark:
    name: Run Go benchmark example
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v2
    - uses: actions/setup-go@v1
      with:
        go-version: 1.13
      id: go
    - name: Run benchmark
      run: go test -bench . | tee output.txt
    - name: check benchmark output
      run: pwd && ls

    - name: Store benchmark result
      uses: rhysd/github-action-benchmark@v1
      with:
        name: Go Benchmark
        tool: 'go'
        output-file-path: output.txt
        github-token: ${{ secrets.GITHUB_TOKEN }}
        # Use personal access token instead of GITHUB_TOKEN due to https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/false
        # github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
        auto-push: true
        # Show alert with commit comment on detecting possible performance regression
        alert-threshold: '200%'
        comment-on-alert: true
        fail-on-alert: true
        alert-comment-cc-users: '@Brian-Williams'

Bench cmd

Locally and in actions the bench runs successfully

go test -bench .
goos: darwin
goarch: amd64
pkg: github.com/Brian-Williams/retry
BenchmarkDo1-8                          30000000                47.6 ns/op
BenchmarkDoWithConfigurer1-8            30000000                42.3 ns/op
BenchmarkDo2-8                          30000000                46.6 ns/op
BenchmarkDoWithConfigurer2-8            30000000                42.4 ns/op
BenchmarkDo10-8                         30000000                46.6 ns/op
BenchmarkDoWithConfigurer10-8           30000000                42.6 ns/op
BenchmarkDo100-8                        30000000                46.6 ns/op
BenchmarkDoWithConfigurer100-8          30000000                42.1 ns/op
BenchmarkDo10000-8                      30000000                46.6 ns/op
BenchmarkDoWithConfigurer10000-8        30000000                42.2 ns/op
PASS
ok      github.com/Brian-Williams/retry 14.448s
@rhysd rhysd added the bug Something isn't working label Jan 1, 2020
@rhysd
Copy link
Member

rhysd commented Jan 1, 2020

Thank you for the report. This is bug of this action. This action does not assume go test -bench can measure <1 ns values. I'll fix this.

@rhysd
Copy link
Member

rhysd commented Jan 1, 2020

I fixed this at v1.6.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants