-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Consolidate various throughput calculations to a utility function #89578
[APM] Consolidate various throughput calculations to a utility function #89578
Conversation
5daeb7b
to
1988d42
Compare
1988d42
to
daf9275
Compare
@@ -179,16 +168,18 @@ export async function getServiceTransactionStats({ | |||
), | |||
}, | |||
transactionsPerMinute: { |
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.
While you are at it: can you rename this to "throughput"?
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.
Above it says "avgResponseTime". Perhaps you can rename that to "averageLatency" - or simply "latency"
Pinging @elastic/apm-ui (Team:apm) |
I noticed two instances where we calculate throughout that doesn't use the new helper: Service Map kibana/x-pack/plugins/apm/server/lib/service_map/get_service_map_service_node_info.ts Lines 179 to 182 in 5f8f21b
Transaction Groups
Would it be possible to do a search/replace and update "transactionsPerMinute" to "throughput" and "avgRequestsPerMinute" to "avgThroughput" (might be a little out of scope for this PR) |
}) { | ||
const { start, end } = setupTimeRange; |
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.
It looks like we could also update the calculation below (on line 31):
y: bucket.count.value / (bucketSize / 60),
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.
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.
Noticed a few places where we don't use the helper yet. Apart from that it lgtm
I thought i caught them all, so thanks for double checking. |
@elasticmachine merge upstream |
merge conflict between base and head |
…solidate-throughpout-calc
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Closes #89486.
Creates the helper function
calculateThroughput
and uses it in the various places where we were previously calculating TPM values.