Git Product home page Git Product logo

forp-ui's Introduction

Introduction

forp-ui is a GUI utility that allows you to view and explore profiles dump.

It is very easy to integrate forp-ui into an HTML page, it is written in JavaScript.

Basic features

  • search engine
  • tree representation of the stack
  • top 20 duration
  • top 20 memory
  • top 20 calls
  • grouping of functions
  • metrics and quality grades
  • "called from" view
  • "backtrace" view
  • inspector

Integration into an HTML page and example

Download the minified version from the release branch of forp-ui on Github. Put it in the js directory of your project, then run forp-ui as in the example below.

<script src="src/built/forp.min.js"></script>
<script>
(function($) {
    $("body").forp({
        stack :
        {
            "utime" : 0,
            "stime" : 0,
            "stack" :
            [
                {
                "file":"\/var\/www\/forp-ui\/js_demo.php",
                "function":"{main}",
                "usec":618,
                "pusec":5,
                "bytes":14516,
                "level":0
                },
                {
                "file":"\/var\/www\/forp-ui\/common.php",
                "function":"include",
                "lineno":6,
                "usec":347,
                "pusec":6,
                "bytes":7364,
                "level":1,
                "parent":0
                }
            ]
        },
        mode : "fixed"
    });
})(jMicro);
</script>

Build

Use src/build.php to build src/built/forp.min.js file.

$ cd src
$ php build.php

Options:

--skin name : gstyle, consolas (default)

Communication with forp PHP profiler

forp-ui is the perfect tool to treat the forp PHP profiles dump (https://github.com/aterrien/forp). forp extension gives us PHP profiling datas, forp-ui helps you to refine it clientside.

Screenshots (example : Yii PHP framework)

tree representation of the stack

tree

top 20 duration

duration

Click on a stack entry displays backtrace in sidebar :

duration details

top 20 memory

memory

top 20 Calls

calls

grouping of functions

This is the result of forp @ProfileGroup annotation.

groups

Click on a group entry displays "called from" block :

groups details

search engine

search

metrics and quality grades

Samples

Samples are in the "samples" directory :

  • "free" : simple example free of programming language.
  • php : simple example of PHP profiling with forp PHP profiler.

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.