Skip to content

Commit

Permalink
Use HDR for percentiles (#64758) (#65021)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
sorenlouv and elasticmachine authored May 6, 2020
1 parent f8bf509 commit 55eea7f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export function transactionGroupsFetcher(
sample: { top_hits: { size: 1, sort } },
avg: { avg: { field: TRANSACTION_DURATION } },
p95: {
percentiles: { field: TRANSACTION_DURATION, percents: [95] }
percentiles: {
field: TRANSACTION_DURATION,
percents: [95],
hdr: { number_of_significant_value_digits: 2 }
}
},
sum: { sum: { field: TRANSACTION_DURATION } }
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export function timeseriesFetcher({
aggs: {
avg: { avg: { field: TRANSACTION_DURATION } },
pct: {
percentiles: { field: TRANSACTION_DURATION, percents: [95, 99] }
percentiles: {
field: TRANSACTION_DURATION,
percents: [95, 99],
hdr: { number_of_significant_value_digits: 2 }
}
}
}
},
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/apm/typings/elasticsearch/aggregations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export interface AggregationOptionsByType {
percentiles: {
field: string;
percents?: number[];
hdr?: { number_of_significant_value_digits: number };
};
extended_stats: {
field: string;
Expand Down

0 comments on commit 55eea7f

Please sign in to comment.