Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/perfectcarl/play-profiler

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/perfectcarl/play-profiler

  • v0.0.0-20140812112039-b90c28caa5a9
  • Source
  • Go
  • Socket score

Version published
Created
Source

h1. profiler

The @profiler@ module is a simple but effective mini-profiler for @Play 1.2@ and @1.3@.

A demo is "available":http://play-profiler.appspot.com (the complete source code is available at "github":https://github.com/PerfectCarl/play-profiler-demo-gae)

!https://raw.githubusercontent.com/PerfectCarl/play-profiler/master/documentation/manual/profiler.PNG!

This project is heavily inspired from "mini-profiler":http://miniprofiler.com/ and java implementation done by alvin's "java-mini-profiler":https://github.com/alvins82/java-mini-profiler-core and

h2. Features

h3. Server side calls

The module logs the duration for the following:

  • total request (routing included): time spent from @PlayPlugin.routeRequest@ to the @PlayPlugin.afterInvocation@
  • action: time spent in the controller action

h3. Ajax calls

The module logs the subsequent Ajax calls:

!https://raw.githubusercontent.com/PerfectCarl/play-profiler/master/documentation/manual/profiler-js.PNG!

h3. Play internal monitoring

The module displays Play internal monitor statistics (querying "Jamon":http://jamonapi.sourceforge.net/ data).

h3. Custom code profiling

You may profile your own code using @MiniProfiler@ class.

bc.. import play.modules.profiler.MiniProfiler; import play.modules.profiler.Step; ...

public static void custom() {
    step = MiniProfiler.step("database", "DB calls");
    List result;
    try {
        result = Data.findAll();
    } finally {
        step.close();
    }
    render(result);
}

h3. Supports Google App Engine

The profiler works with Google App Engine which hosts the "demo":http://play-profiler.appspot.com

h2. Getting started

Add the module to your application:

bc. require: - play - carl -> profiler 0.6.9.3 repositories:
- githubModules: type: http artifact: "https://github.com/PerfectCarl/play-[module]/raw/master/dist/[module]-[revision].zip" contains: - carl -> *

Then include the profiler's css and javascript resources in your root template file(likely @main.html@) :

bc. ... ${profiler.styles.raw()}
... ${profiler.scripts.raw()}

h2. Sample application

A "complete sample":https://github.com/PerfectCarl/play-profiler/tree/master/sample is available demonstrating the use of the module.

h2. How to build

bc. play deps play build-module

The zip file is created in the @dist@ folder.

Then open the zip file created in the @dist/@ folder and delete the following:

  • the @sample@ folder
  • the @eclipse@ folder
  • @lib/appengine*.jar@

h2. "Changelog":https://github.com/PerfectCarl/play-profiler/blob/master/CHANGELOG.textile

FAQs

Package last updated on 12 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc