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

Add Locations Filter for Instrumented Locations #1564

Merged
merged 7 commits into from
Mar 12, 2021

Conversation

4e6
Copy link
Contributor

@4e6 4e6 commented Mar 10, 2021

Pull Request Description

close #1529

PR adds the location filter that excludes lambdas and local functions from the instrumentation.

Changelog:
feat: implement locations filter that extracts a comprehensive list of locations that should be instrumented
feat: instantiate the runtime instrument using the new location filter
test: add test suite that checks instrumented locations

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the Scala, Java, and Rust style guides.
  • All documentation and configuration conforms to the markdown and YAML style guides.
  • All code has been tested where possible.

@4e6 4e6 added Type: Enhancement p-high Should be completed in the next sprint labels Mar 10, 2021
@4e6 4e6 self-assigned this Mar 10, 2021
Copy link
Contributor

@kustosz kustosz left a comment

Choose a reason for hiding this comment

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

  1. The code looks good.
  2. Tested this build in the IDE – my original "lambda slow" case is now indeed fixed. Using the _ sugar instead of a lambda in the same spot is also fixed.
  3. Before merging, please clarify for me the status of the block tests – why are they pending and why do they assert thunks in places that should be forces.

context.receive(4) should contain allOf (
Api.Response(requestId, Api.PushContextResponse(contextId)),
TestMessages.update(contextId, xExpr, Constants.THUNK),
TestMessages.update(contextId, mainRes, Constants.THUNK),
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be an integer, not a thunk

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's pending because of #1567

context.receive(5) should contain allOf (
Api.Response(requestId, Api.PushContextResponse(contextId)),
TestMessages.update(contextId, xExpr, Constants.THUNK),
TestMessages.update(contextId, mainRes, Constants.THUNK),
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be an integer, not a thunk

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's pending because of #1567

}

it should "not instrument sugared lambdas in block expressions" in {
pending
Copy link
Contributor

Choose a reason for hiding this comment

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

why are these pending?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's pending because of #1566

@4e6 4e6 merged commit b0680d0 into main Mar 12, 2021
@4e6 4e6 deleted the wip/db/not-instrument-functions branch March 12, 2021 11:27
iamrecursion pushed a commit that referenced this pull request Mar 16, 2021
PR adds the location filter that excludes lambdas 
and local functions from the instrumentation.
@JaroslavTulach
Copy link
Member

LocationFilter based on sections doesn't work well with incremental source updates and I am doing my best to remove it altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-high Should be completed in the next sprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapping a lambda in the IDE is very slow
3 participants