Skip to content

Commit

Permalink
[DOCS] Correct percentile rank agg example response (elastic#50052)
Browse files Browse the repository at this point in the history
The example snippets in the percentile rank agg docs use a test dataset
named `latency`, which is generated from docs/gradle.build.

At some point the dataset and example snippets were updated, but the
text surrounding the snippets was not. This means the text and the
example snippets shown no longer match up.

This corrects that by changing the snippets using /TESTRESPONSE magic comments.
  • Loading branch information
jrodewig committed Dec 12, 2019
1 parent 8744367 commit 3d9f765
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ The response will look like this:
"aggregations": {
"load_time_ranks": {
"values" : {
"500.0": 55.00000000000001,
"600.0": 64.0
"500.0": 90.01,
"600.0": 100.0
}
}
}
}
--------------------------------------------------
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
// TESTRESPONSE[s/"500.0": 90.01/"500.0": 55.00000000000001/]
// TESTRESPONSE[s/"600.0": 100.0/"600.0": 64.0/]

From this information you can determine you are hitting the 99% load time target but not quite
hitting the 95% load time target
Expand Down Expand Up @@ -98,18 +100,20 @@ Response:
"values": [
{
"key": 500.0,
"value": 55.00000000000001
"value": 90.01
},
{
"key": 600.0,
"value": 64.0
"value": 100.0
}
]
}
}
}
--------------------------------------------------
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
// TESTRESPONSE[s/"value": 90.01/"value": 55.00000000000001/]
// TESTRESPONSE[s/"value": 100.0/"value": 64.0/]


==== Script
Expand Down

0 comments on commit 3d9f765

Please sign in to comment.