Giter Site home page Giter Site logo

profile-sh's Introduction

profile-sh

a bash script profiling tool

Usage

$ record-sh ./fibonacci.sh 10
89
$ report-sh ./profile.out
    1239|./fibonacci.sh|
     113|./fibonacci.sh|main main
    2743|./fibonacci.sh|main main fib
    2655|./fibonacci.sh|main main fib fib
    5244|./fibonacci.sh|main main fib fib fib
    9831|./fibonacci.sh|main main fib fib fib fib
   22597|./fibonacci.sh|main main fib fib fib fib fib
   36948|./fibonacci.sh|main main fib fib fib fib fib fib
   40756|./fibonacci.sh|main main fib fib fib fib fib fib fib
   19147|./fibonacci.sh|main main fib fib fib fib fib fib fib fib
    3980|./fibonacci.sh|main main fib fib fib fib fib fib fib fib fib
     143|./fibonacci.sh|main main fib fib fib fib fib fib fib fib fib fib
$

record-sh runs a bash script and records its profile data in profile.out.

report-sh produces a report from the profile file. The first column is the number of microseconds spent in the stackframe. The second column is the name of the script of the stackframe. The third column is the stackframe within the script.

Installation

profile-sh requires dpm. Install dpm first then run the following command to install profile-sh:

$ dpm install https://github.com/markuskimius/profile-sh.git

Then log out and log back in.

Credit

Inspired by FlameGraph.

License

GPLv2

profile-sh's People

Contributors

markuskimius avatar

Watchers

James Cloos 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.