Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53494

libdeps graph linter: public deps efficiency threshold

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Dev Platform 2022-07-25

      The transitive tree of edges created by a public libdeps declaration may be added to many link lines but not actually used.

      A given public libdep can be given an efficiency percentage calculated by (the number of transitive edges that really need the link)/(the number of edges in that transitive tree).

       

      First we should implement a query so that for a given node, you can print the efficiency of all direct public libdeps on that node. 

       

      We should then also implement a linter which checks all direct public libdeps edges efficiency percentages, and if a percentage is below a given threshold it is reported. It may be that it is desirable that a node which has, say for example a %2 percent efficiency and is actually needed in only two link lines, but is transitively added to 100 link lines, would instead just use two LIBDEPS_PRIVATE links where needed.

       

       

       

            Assignee:
            mitch.wagner@mongodb.com Mitch Wagner (Inactive)
            Reporter:
            daniel.moody@mongodb.com Daniel Moody
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: