Restore metric collection for local calls. #429
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We had previously restricted metric collection to just remote calls for performance reasons. We now collect metrics for local calls as well since it was problematic to hide things like call counts for local calls.
This has a performance impact: on a typical machine, a local call slows down by ~100ns. By comparison, a local call slows down by 1000ns when tracing is enabled for that call. Future changes will attempt to speed up metric collection (we hope we can drop the penalty by 10x).
Changes the method metric names from "serviceweaver_remote_" to "serviceweaver_".
Include whether or not a call is remote in the metric label.
Updated the codegen metric collection API. Mainly, the responsibility for updating metrics is now in the codegen package as opposed to scattered throughout generated code.
Not updating the codegen version number since we have alread updated it since the last tagged release.