Giter Club home page Giter Club logo

pcritical's Introduction

pcritical

A prototype critical-path finding tool for Go programs.

Given a specific directory in a Go module, this tool enumerates the dependencies of the target and tries to project what will be the critical path for the build. Build time is not measured directly, but rather compiled package size is used a a proxy for build time.

For example, consider the following Go package dependency graph:

                 +---+
                 | P |
                 +---+
                 /   \ 
                v     v
              +---+   +---+
              | Q |   | R |
              +---+   +---+
                |   \   |
                v    v  v
              +---+   +---+
              | S |   | T |
              +---+   +---+

Suppose that package build sizes/times are: { P=10, Q=11, R=11, T=29, S=3 }. In this case the critical path for building P is { T => R => P }.

On the other hand if instead { S = 99 }, then the critical path for P is { S => Q => P }.

Running pcritical

To run the tool, supply a target package and the name of a DOT file to generate. Here is an example of running pcritical on itself:

./pcritical -dotout me.dot -tgt github.com/thanm/pcritical 

which produces this graph:

dot diagram for pcritical

May take a while to run, since it builds packages to see how large they are.

Flags

The -nostd flag tells pcritical to ignore packages that are part of the Go standard library.

The -polyline flag tells pcritical to emit DOT output with polyline edges as opposed to splines.

pcritical's People

Contributors

thanm avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.