-
Notifications
You must be signed in to change notification settings - Fork 683
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
GEODE-7184: Add function execution timers #4135
GEODE-7184: Add function execution timers #4135
Conversation
- Add micrometer timers for recording function executions - Refactor FunctionStats and FunctionServiceStats Co-authored-by: Aaron Lindsey <alindsey@pivotal.io> Co-authored-by: Kirk Lund <klund@apache.org> Co-authored-by: Dale Emery <demery@pivotal.io> Co-authored-by: Mark Hanson <mhanson@pivotal.io>
- Change static fields to instance fields on FunctionStatsManager - Mark static field as @immutable on NoopMeterRegistry Authored-by: Aaron Lindsey <alindsey@pivotal.io>
- Remove unused/unnecessary code - Fix warnings Authored-by: Aaron Lindsey <alindsey@pivotal.io>
...core/src/main/java/org/apache/geode/internal/cache/execute/ServerRegionFunctionExecutor.java
Outdated
Show resolved
Hide resolved
geode-core/src/main/java/org/apache/geode/internal/cache/MemberFunctionStreamingMessage.java
Outdated
Show resolved
Hide resolved
Authored-by: Aaron Lindsey <alindsey@pivotal.io>
- Broken by refactor in previous commit Authored-by: Aaron Lindsey <alindsey@pivotal.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chimed in on one of Aaron's comments, and added another. I'd like to at least talk about these before approving.
...re/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
Outdated
Show resolved
Hide resolved
geode-core/src/main/java/org/apache/geode/internal/cache/MemberFunctionStreamingMessage.java
Outdated
Show resolved
Hide resolved
...core/src/main/java/org/apache/geode/internal/cache/execute/metrics/FunctionServiceStats.java
Outdated
Show resolved
Hide resolved
geode-core/src/main/java/org/apache/geode/internal/cache/MemberFunctionStreamingMessage.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than double checking with user/dev lists (if needed), I think this looks good
- Rename FunctionServiceStats.endFunctionExecutionWithElapsedTime to distinguish it from FunctionStats.endFunctionExecution which takes a start time. - Remove extra call to FunctionStats.getTime() in MemberFunctionStreamingMessage and add boolean to prevent calling endFunctionExecutionWithException before startFunctionExecution was called. Authored-by: Aaron Lindsey <alindsey@pivotal.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't merge this yet — it seems there might be a case where this doesn't record the correct times for function executions without a result.
Functions with hasResult()=false execute asynchronously on an executor. Previously, the instrumentation code recorded a successful function execution after submitting a function to an executor, which is incorrect because the function has not necessarily executed at that point. Now, we record the execution time only after the function actually executes. Co-authored-by: Aaron Lindsey <alindsey@pivotal.io> Co-authored-by: Kirk Lund <klund@apache.org>
Authored-by: Aaron Lindsey <alindsey@pivotal.io>
I believe this issue is fixed. See comment. |
...Test/java/org/apache/geode/metrics/function/executions/FunctionExecutionsTimerLonerTest.java
Outdated
Show resolved
Hide resolved
geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerFunctionExecutor.java
Outdated
Show resolved
Hide resolved
- Remove FunctionStats.getTime() in favor of returning the time from FunctionStats.startFunctionExecution() - Add static import for assertj Assertions Authored-by: Aaron Lindsey <alindsey@pivotal.io>
Co-authored-by: Aaron Lindsey alindsey@pivotal.io
Co-authored-by: Kirk Lund klund@apache.org
Co-authored-by: Dale Emery demery@pivotal.io
Co-authored-by: Mark Hanson mhanson@pivotal.io
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
Has your PR been rebased against the latest commit within the target branch (typically
develop
)?Is your initial contribution a single, squashed commit?
Does
gradlew build
run cleanly?Have you written or updated unit tests to verify your changes?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.