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

perf: only check trace in tests if has a reason to #1128

Merged
merged 6 commits into from
Nov 10, 2022

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Nov 9, 2022

What I did

Change it to not check call_tree unnecessarily (if no --gas flag given).
This makes tests run faster when not using --gas

NOTE: This PR also fixes many race conditions and flakinesses in the tests that came up when adding a test as well as turning off geth snapshotting for now because of this issue: ethereum/go-ethereum#26154

How I did it

check if needing gas report before checking the grabbing the call tree.

How to verify it

Can work with Hardhat project with tracing issues and things still work as far as testing goes (obviously sans all tracing features)

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey antazoey changed the title feat: allow disabling traces in ape-config.yaml feat: allow disabling traces in tests via ape-config.yaml Nov 9, 2022
@antazoey antazoey force-pushed the feat/jules/disable-traces branch 2 times, most recently from e84a19f to 1f79d75 Compare November 10, 2022 03:32
@antazoey antazoey marked this pull request as ready for review November 10, 2022 14:18
@antazoey
Copy link
Member Author

Hmm, thinking I may have a better solution, BRB.

@antazoey antazoey marked this pull request as draft November 10, 2022 14:48
@antazoey antazoey changed the title feat: allow disabling traces in tests via ape-config.yaml perf: only check trace in tests if has a reason to Nov 10, 2022
@antazoey
Copy link
Member Author

antazoey commented Nov 10, 2022

  • Fix issue with snapshotting (noticed while testing)

Update: will have to ignore for now , see ethereum/go-ethereum#26154

src/ape_geth/provider.py Outdated Show resolved Hide resolved
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Is this a configuration that should also apply to the dev-message assertion or do we only mean tracing here as in gas tracing / profiling?

@antazoey antazoey marked this pull request as ready for review November 10, 2022 18:53
@antazoey
Copy link
Member Author

Is this a configuration that should also apply to the dev-message assertion or do we only mean tracing here as in gas tracing / profiling?

I removed the config because I found out it wasn't needed! So no worries there :)

@antazoey antazoey requested review from fubuloubu and a user November 10, 2022 19:48
src/ape_geth/provider.py Show resolved Hide resolved
@antazoey antazoey merged commit 9258570 into ApeWorX:main Nov 10, 2022
@antazoey antazoey deleted the feat/jules/disable-traces branch November 10, 2022 21:23
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.

3 participants