
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
github.com/PerfectCarl/play-profiler
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:
h3. Ajax calls
The module logs the subsequent Ajax calls:
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:
h2. "Changelog":https://github.com/PerfectCarl/play-profiler/blob/master/CHANGELOG.textile
FAQs
Unknown package
Did you know?
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.