Domiii / Domiii/dbux

Better visualize stats/summaries on the call graph

Open
#677 0 comments 0 reactions 1 assignee Claimed by @MiccWan View on GitHub
enhancement
Dominant language
JavaScript
Stars
171
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Three goals:
1. Make stats/summaries more visual by adding **icons**, **tooltips** and better **formatting**
* → one tooltip for text+icon; should suffice to use `title` attribute.
* → use a new `function formatNumber` for each number
* → `function formatNumber(x) { return x.toLocaleString('en-us'); }`
1. Add more/better stats/summaries to call graph nodes.

## TODO

* [x] add icon for `nTreeContexts` (amount of all descendant nodes in subgraph)
* title = 'Amount of child contexts in subgraph'
* [x] add icon for `nTreeStaticContexts` (amount of all descendant static contexts in subgraph)
* title = 'Amount of static contexts involved in subgraph'
* [x] add icon for `nTreeFileCalled` (amount of files touched in subgraph)
* title = 'Amount of files involved in subgraph'
* [x] add new stat: `nTraces` (also w/ icon)
* title = 'Amount of traces in subgraph. This is a rough measure.'
* [x] add new stat: `nPackages` (use `packageName`)
* [x] rename `moduleName` to `packageName`
* [x] also enable these stats for ACG nodes (refactor to use the same code, don't copy+paste)
* [x] add a button to `Toolbar` to allow toggling stats

## More stats (w/ icons):

* [ ] amount of static branches (IfStatement, TertiaryExpression, Loop) that were executed
* [ ] amount of asynchronous schedulers
* [ ] amount of static loop statements that were executed
* [ ] amount of static executed lines of code (maybe? → requires some algorithm to accurately count loc)
* [ ] allow toggling *individual* stats: #478
* [ ] label CGRs (call graph roots), indicating what kind of CGR they are (e.g. what kind of asynchronous event scheduled them)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.