An open API service indexing awesome lists of open source software.

https://github.com/micmro/requirejs-profiler

RequireJS Profiler - trace dependency tree, loading patterns and module level load timing
https://github.com/micmro/requirejs-profiler

javascript profiler requirejs

Last synced: 10 months ago
JSON representation

RequireJS Profiler - trace dependency tree, loading patterns and module level load timing

Awesome Lists containing this project

README

          

RequireJS Profiler
=========

Tool to profile the loading of AMD modules loaded via [RequireJS](http://requirejs.org/).

![alt text](https://raw.githubusercontent.com/micmro/RequireJS-Profiler/screenshots/readme-assets/RequireJS-printDependencyTree.png "rjsProfiler.printDependencyTree() output example")

Using the profiler
===================

###### Adding the profiler
```HTML

//load first module
require(["common"]);

```
currently there is a dependency on jQuery, but it should be easy to replace.

###### Getting results from the profiler (from the console)
```javascript
//show a table of the loading times of modules
rjsProfiler.showResult()

//show dependency tree with loading times and initially loaded modules in iFrame
rjsProfiler.printDependencyTree(true)

//show dependency tree just in console
rjsProfiler.printDependencyTree()
```