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

Fix/go tabled benchmarks #32

Merged
merged 8 commits into from
Nov 20, 2021
Merged

Fix/go tabled benchmarks #32

merged 8 commits into from
Nov 20, 2021

Conversation

kaancfidan
Copy link
Contributor

Extended regex to also include tabled benchmarks.

Fixes #31

@kaancfidan
Copy link
Contributor Author

See https://regex101.com/r/kOwwOf/1 for a quick look at the effects of the regex change.

@jimeh
Copy link

jimeh commented Nov 18, 2020

Any chance this could be merged soon? :)

@kaancfidan
Copy link
Contributor Author

Any chance this could be merged soon? :)

Evidently, no.

@kaancfidan
Copy link
Contributor Author

@rhysd could you point out any potential issues with this PR?

@jimeh
Copy link

jimeh commented Feb 25, 2021

For now, I've worked around this by hackily renaming the benchmark names, replacing Benchmark/ with Benchmark__, and also replacing = and - characters with _:

      - name: Run benchmarks
        run: make bench | tee output.raw
      - name: Fix benchmark names
        run: >-
          perl -pe 's/^(Benchmark.+?)\/(\S+)(-\d+)(\s+)/\1__\2\4/' output.raw |
          tr '=-' '_' | tee output.txt
      - name: Store benchmark result
        uses: rhysd/github-action-benchmark@v1
        with:
          tool: "go"
          output-file-path: output.txt
          github-token: ${{ secrets.GH_PUSH_TOKEN }}
          comment-on-alert: true
          auto-push: true

Full source is here.

@kaancfidan
Copy link
Contributor Author

For now, I've worked around this by hackily renaming the benchmark names, replacing Benchmark/ with Benchmark__, and also replacing = and - characters with _:

      - name: Run benchmarks
        run: make bench | tee output.raw
      - name: Fix benchmark names
        run: >-
          perl -pe 's/^(Benchmark.+?)\/(\S+)(-\d+)(\s+)/\1__\2\4/' output.raw |
          tr '=-' '_' | tee output.txt
      - name: Store benchmark result
        uses: rhysd/github-action-benchmark@v1
        with:
          tool: "go"
          output-file-path: output.txt
          github-token: ${{ secrets.GH_PUSH_TOKEN }}
          comment-on-alert: true
          auto-push: true

Full source is here.

That's neat and sad at the same time.

@isdevx
Copy link

isdevx commented Oct 20, 2021

Gentle ping on this, I can confirm this PR does not have any regressions so far cc/@ktrz @rhysd

Copy link
Member

@ktrz ktrz left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution 👍🏼 I've added a couple of suggestions. Let me know what do you think

src/extract.ts Outdated Show resolved Hide resolved
test/data/extract/go_output.txt Show resolved Hide resolved
@isdevx
Copy link

isdevx commented Nov 3, 2021

pinging @kaancfidan this time :)

kaancfidan and others added 2 commits November 18, 2021 19:39
Co-authored-by: Chris Trześniewski <k.trzesniewski@gmail.com>
Co-authored-by: Chris Trześniewski <k.trzesniewski@gmail.com>
@kaancfidan
Copy link
Contributor Author

pinging @kaancfidan this time :)

I had stopped hoping this PR would get merged and somehow missed it got attention.

@ktrz
Copy link
Member

ktrz commented Nov 18, 2021

Thanks, @kaancfidan for applying the suggestions. I've recently taken over the maintenance of this project and I'm trying to wrap up all the outstanding PRs

@kaancfidan
Copy link
Contributor Author

@ktrz although I have already applied the change; I have checked your suggested regex in regex101.com and it seems to cause problems there: https://regex101.com/r/kOwwOf/2

Could this be a sign that the suggested regex is too complex?

src/extract.ts Outdated Show resolved Hide resolved
@ktrz
Copy link
Member

ktrz commented Nov 18, 2021

@kaancfidan we didn't account for ( and ) characters. I've added a suggestion that resolves this

@kaancfidan
Copy link
Contributor Author

@kaancfidan we didn't account for ( and ) characters. I've added a suggestion that resolves this

yep, it solves it: https://regex101.com/r/kOwwOf/3

Co-authored-by: Chris Trześniewski <k.trzesniewski@gmail.com>
src/extract.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Go extractor does not support tabled benchmarks
4 participants