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

Feature idea: Dependency Bus-harmonic #101

Open
nasifimtiazohi opened this issue Jul 18, 2021 · 0 comments
Open

Feature idea: Dependency Bus-harmonic #101

nasifimtiazohi opened this issue Jul 18, 2021 · 0 comments
Labels

Comments

@nasifimtiazohi
Copy link
Contributor

nasifimtiazohi commented Jul 18, 2021

Dependency Metrics

  1. Dependency bus factor: For each dependency (direct or transitive), we can get rid of this dependency by removing how many direct dependencies? i.e., how many direct dependencies introduce this dependency?
  2. Dependency bus-harmonic: For a dependency, if its bus factor is n, then its bus harmonic would be the nth harmonic. The idea behind bus-harmonic is when a new dependency is added into the dep graph (direct or transitive) , i.e., bus factor going from 0 to 1 - the significance of this case is much larger than the case when the bus factor goes from 4 to 5. This metric in form of harmonics will reflect that.
    image
  3. Total bus-harmonic: Summation of the bus-harmonics for each dependency. This metric satisfies below criteria:
    i. Whenever a new dependency is added, total bus-harmonic would increase.
    ii. Whenever a dependency is removed, total bus-harmonic would decrease
    iii. The increase/decrease will reflect if dependency is freshly added/removed (in which case the delta will be large) compared to if a dependencie’s bus factor is simply going from 4 to 5 (in which case the delta will be small).

Motivation behind metrics

  1. When a new dependency is added, we can report how much the total bus-harmonic is increasing. If the increase in the bus-harmonic is over a certain threshold, we can rethink if the dependency addition is justifiable compared to the functionalities it is providing.
  2. Similarly we can use these metrics in efforts where we look for opportunities to reduce the total number of dependencies - although this case may be less useful in practice.

cc @bmwill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant