elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.64k stars 8.1k forks source link

UniversalProfiling: Wrong values shown in TopN functions view under "Total CPU" #188511

Closed rockdaboot closed 1 month ago

rockdaboot commented 1 month ago

Kibana version: 8.15-SNAPSHOT (branch 8.15, commit f93a20975b3e303967d3bf8fec71420692df7b19)

Elasticsearch version: 8.15-SNAPSHOT (branch 8.15, commit 75fbb7d16de5f231c730fcbf6ad91772da32a633)

Describe the bug: The % value shown in column "Total CPU" in the TopN Functions view of Universal Profiling is wrong. The correct values can be seen in the flamegraph view (see screenshots below).

It is a regression, as the values shown in a 8.14 cluster are correct.

Steps to reproduce:

  1. Create a 8.15 cluster, enable Universal Profiling and ingest data
  2. Open the flamegraph view, and see what the tooltip shows for "Total CPU" of the most dominant function
  3. Open the functions view, sort "Total CPU" with "Sort Hi->Low" from the three-dot menu
  4. Find the most dominant function at or near the top and compare the % value with the value seen in the flamegraph. The value from the functions view must be equal or higher than the value from the flamegraph (the functions view aggregates the values of a function, while in the flamegraph a function can appear at one or more places).

Hint: Make sure that the selected time range is absolute and the same for the flamegraph and the functions view.

Expected behavior: The values under the functions "Total CPU" column should be the sum of the % values of all function's nodes in the flamegraph.

Screenshots Screenshot_20240717_105457

Screenshot_20240717_105317

elasticmachine commented 1 month ago

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)