Code Monkey home page Code Monkey logo

ghcprofview-hs's Introduction

ghcprofview README

Build Status

This is GHC .prof files viewer, implemented in Haskell + Gtk3.

Unlike profiterole and profiteur, ghcprofview uses a traditional approach to profiling. It allows you to view cost centres tree as it is and browse it interactively, and allows you to do some actions that you may be used to in, for example, Java's visualvm.

See also a very similar application in Python + Qt5 - ghcprofview-py.

Screenshot

Features

  • GUI is tab-oriented. Default tab is called "All" and contains the whole tree. Other tabs may appear when you do filtering or some other actions. You may close unneeded tabs.
  • Two additional columns in addition to what we have in standard GHC's text .prof output:
    • Time Relative: share of "Time Inherited" of this item with relation to it's parent item. For example, if this item has "Time Inherited" 20%, and it's parent has "Time Inherited" 30%, then "Time Relative" is 20% / 30% = 66.66%.
    • Alloc Relative: same, but about "Alloc Inherited".
  • Click on column header to sort by that column.
  • Right-click on table header to select which columns to display.
  • Double-click at the edge of column header to adjust column width automatically.
  • Use Search and Next buttons to search function by name. There are three search modes available: Contains (search by substring), Exact (search for exact match), Reg.Exp (search by regular expression).
  • Use filters to display interesting records only. Filter results will be shown in separate tab.
    • Supported fields for filtering are: Entries, Time Individual, Alloc Individual, Time Inherited, Alloc Inherited, Module (by substring match), Source (by substring match).
    • Filter works by AND; so if you set Entries = 5, Module = "Gui", then you will be searching for items that have entries >= 5 AND in module "Gui".
    • Logic of filter application to the tree is the following: it keeps an item if that item conforms to filter conditions, OR if it has child items that conform to filter condition.
  • "Narrow view to selected item" in right-click menu. This will open a tab and show only selected item and it's descendants.
  • "Group all outgoing calls" in right-click menu. This does the following:
    • Searches for all occurences of selected function in the tree.
    • Merges call subtrees of these occurences into new tree; for example, if function "search" appeared in one place with "time inherited" of 15%, and in another place with 10%, then in the merged tree you will see it with 25%.
    • Displays the result in a new tab.
  • "Group all incoming calls" in right-click menu. This does the following:
    • Searches for all occurences of selected function in the tree.
    • Reverses call stacks of found occurences and merges them into a new tree. So in that tree, the root will be the item you selected, and it's children will be all functions that call the selected function, and so on. Numbers are merged similar to "group all outgoing calls" function.
    • Displays the result in a new tab.
  • Text format of .prof files is supported; there is support for Json format, but it is buggy currently.

Installation

Install it by stack:

$ git clone https://github.com/portnov/ghcprofview-hs.git
$ cd ghcprofview-hs/
$ stack install

ghcprofview-hs's People

Contributors

arrowd avatar portnov 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.