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

bug: Total Total time in the analysis tree is overstated #526

Open
petehale opened this issue Jun 21, 2024 · 1 comment
Open

bug: Total Total time in the analysis tree is overstated #526

petehale opened this issue Jun 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@petehale
Copy link

Summary

When I am looking at the Analyze tab I see the times associated with the debug run; Self Time and Total Time.
Total time represents the total time spent in each of the table items.

The Total line is summing the total time for each entry in the two time columns, leaving the sum of Total Time overstated.

Steps To Reproduce

  1. Run a a apex debug session
  2. Download log
  3. Open Analyze tab

Expected result

I believe the Total Total Time should be removed, as it is meaning less.

Actual result

Overstated Total Time sum

VS Code Version:
Version: 1.90.2
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
Date: 2024-06-18T22:37:41.291Z (2 days ago)
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin x64 23.5.0

Log Analyzer Extension Version:
1.14.1

@petehale petehale added bug Something isn't working needs-triage labels Jun 21, 2024
@lcottercertinia
Copy link
Collaborator

lcottercertinia commented Jun 25, 2024

Right now we have it setup to just sum all the totals, which leads to double counting.
It would be more accurate to just show the largest number. That would work as long as only have one EXECUTION_STARTED and have not filtered out that event type.

A better approach would be to collect the stacks and only sum the unique entries e.g
If we have an analysis like this

methodA: 5s
methodB: 3s
methodC: 2s

Sibling Methods
The three methods are at the same level directly called from EXECUTION_STARTED.
All 3 should be summed as they are in different stacks.

Total: 10s

Child Methods

methodB is a child of methodA and methodC is a sibling of methodA.
we first add methodA to the total but the total for methodB has already been accounted by including methodA so we skip it and any other children of methodA.
methodC is in a unique stack and needs to be added to the total.

Total: 7s

I will see when we can fit this in.

@lcottercertinia lcottercertinia added this to the v1.18.0 milestone Jul 25, 2024
@lcottercertinia lcottercertinia self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants