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

[APM] Scale transaction rate correctly #82155

Merged
merged 2 commits into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ export function getTpmBuckets({
const buckets = transactionResultBuckets.map(
({ key: resultKey, timeseries }) => {
const dataPoints = timeseries.buckets.map((bucket) => {
// calculate request/minute. Avoid up-scaling numbers if bucketSize is below 60s (1 minute).
// Eg. 1 request during a 10 second window should be displayed as "1 rpm" instead of "6 rpm".
const tmpValue = bucket.count.value * (60 / Math.max(60, bucketSize));
return {
x: bucket.key,
y: tmpValue,
// divide by minutes
y: bucket.count.value / (bucketSize / 60),
};
});

Expand Down
Loading