Skip to content

Commit 0fad7f6

Browse files
authored
[DOCS] Rewrite agg breakdown docs for profile API (#67042) (#67057)
1 parent fdd2a9c commit 0fad7f6

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

docs/reference/search/profile.asciidoc

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -889,43 +889,29 @@ The `breakdown` component lists detailed statistics about low-level execution:
889889
"initialize_count": 1,
890890
"reduce_count": 0,
891891
"collect": 45786,
892-
"collect_count": 4
892+
"collect_count": 4,
893+
"build_leaf_collector": 18211,
894+
"build_leaf_collector_count": 1,
895+
"post_collection": 929,
896+
"post_collection_count": 1
893897
}
894898
--------------------------------------------------
895899
// NOTCONSOLE
896900

901+
Each property in the `breakdown` component corresponds to an internal method for
902+
the aggregation. For example, the `build_leaf_collector` property measures
903+
nanoseconds spent running the aggregation's `getLeafCollector()` method.
904+
Properties ending in `_count` record the number of invocations of the particular
905+
method. For example, `"collect_count": 2` means the aggregation called the
906+
`collect()` on two different documents. The `reduce` property is reserved for
907+
future use and always returns `0`.
908+
897909
Timings are listed in wall-clock nanoseconds and are not normalized at all. All
898910
caveats about the overall `time` apply here. The intention of the breakdown is
899911
to give you a feel for A) what machinery in {es} is actually eating time, and B)
900912
the magnitude of differences in times between the various components. Like the
901913
overall time, the breakdown is inclusive of all children times.
902914

903-
The meaning of the stats are as follows:
904-
905-
[discrete]
906-
===== All parameters:
907-
908-
[horizontal]
909-
`initialise`::
910-
911-
This times how long it takes to create and initialise the aggregation before starting to collect documents.
912-
913-
`collect`::
914-
915-
This represents the cumulative time spent in the collect phase of the aggregation. This is where matching documents are passed to the aggregation and the state of the aggregator is updated based on the information contained in the documents.
916-
917-
`build_aggregation`::
918-
919-
This represents the time spent creating the shard level results of the aggregation ready to pass back to the reducing node after the collection of documents is finished.
920-
921-
`reduce`::
922-
923-
This is not currently used and will always report `0`. Currently aggregation profiling only times the shard level parts of the aggregation execution. Timing of the reduce phase will be added later.
924-
925-
`*_count`::
926-
Records the number of invocations of the particular method. For example, `"collect_count": 2,`
927-
means the `collect()` method was called on two different documents.
928-
929915
[[profiling-considerations]]
930916
===== Profiling Considerations
931917

0 commit comments

Comments
 (0)