-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split provider into it's own repositories
- Loading branch information
Showing
41 changed files
with
1,611 additions
and
1,936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
ui | ||
coverage | ||
ui | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
{ | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"node": true, | ||
"es6": true, | ||
"mocha": true | ||
}, | ||
"rules": { | ||
"semi": [2, "always"], | ||
"no-unused-vars": ["error", { "vars": "all", "args": "none" }], | ||
"quotes": ["error", "single", { "avoidEscape": true } ], | ||
"space-before-function-paren": ["error", "never"] | ||
} | ||
} | ||
{ | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"node": true, | ||
"es6": true, | ||
"mocha": true | ||
}, | ||
"rules": { | ||
"semi": [2, "always"], | ||
"strict": ["error", "global"], | ||
"no-unused-vars": ["error", { "vars": "all", "args": "none" }], | ||
"quotes": ["error", "single", { "avoidEscape": true } ], | ||
"space-before-function-paren": ["error", "never"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pids | ||
*.pid | ||
*.seed | ||
*.rdb | ||
*.DS_STORE | ||
lib-cov | ||
coverage | ||
.nyc_output | ||
.grunt | ||
.lock-wscript | ||
build/Release | ||
node_modules | ||
jspm_packages | ||
.npm | ||
.node_repl_history | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pids | ||
*.pid | ||
*.seed | ||
*.rdb | ||
*.DS_STORE | ||
lib-cov | ||
coverage | ||
.nyc_output | ||
.grunt | ||
.lock-wscript | ||
build/Release | ||
node_modules | ||
jspm_packages | ||
.npm | ||
.node_repl_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "ui"] | ||
path = ui | ||
url = https://github.com/MiniProfiler/ui.git | ||
[submodule "ui"] | ||
path = ui | ||
url = https://github.com/MiniProfiler/ui.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
coverage | ||
tests | ||
node_modules | ||
coverage | ||
tests | ||
node_modules | ||
examples | ||
.travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "5" | ||
- "stable" | ||
|
||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
before_script: | ||
- npm run lint | ||
|
||
after_script: | ||
- npm run coverage | ||
- npm run check-coverage | ||
- npm run update-coveralls | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "5" | ||
- "stable" | ||
|
||
before_script: | ||
- npm run lint | ||
|
||
after_script: | ||
- npm run coverage | ||
- npm run check-coverage | ||
- npm run update-coveralls | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
##### `The project is still under development, the API will change! Use with caution. NPM package is currently outdated.` | ||
|
||
# node-miniprofiler | ||
|
||
Node.js implementation of Stack Exchange's MiniProfiler | ||
|
||
[![NPM](https://img.shields.io/npm/v/miniprofiler.svg)](https://img.shields.io/npm/v/miniprofiler.svg) | ||
[![Build](https://travis-ci.org/MiniProfiler/node.svg)](https://travis-ci.org/MiniProfiler/node) | ||
[![Coverage](https://coveralls.io/repos/github/MiniProfiler/node/badge.svg?branch=master)](https://coveralls.io/github/MiniProfiler/node?branch=master) | ||
![Dependencies](https://david-dm.org/MiniProfiler/node.svg) | ||
![devDependencies](https://david-dm.org/MiniProfiler/node/dev-status.svg#info=devDependencies) | ||
|
||
## Installation (via [npm](https://npmjs.org/package/miniprofiler)) | ||
|
||
```bash | ||
$ npm install miniprofiler | ||
``` | ||
|
||
## Usage | ||
|
||
### Simple usage using express.js | ||
|
||
`server.js` | ||
|
||
```javascript | ||
var express = require('express') | ||
, miniprofiler = require('miniprofiler') | ||
, app = express(); | ||
|
||
app.set('view engine', 'pug'); | ||
app.use(miniprofiler.profile()); | ||
|
||
app.get('/', function(req, res) { | ||
req.miniprofiler.step('Step 1', function() { | ||
req.miniprofiler.step('Step 2', function() { | ||
res.render('home'); | ||
}); | ||
}); | ||
}); | ||
|
||
app.listen(8080); | ||
``` | ||
|
||
`home.pug` | ||
|
||
```javascript | ||
doctype html | ||
html | ||
head | ||
title MiniProfiler Node.js Example | ||
body | ||
h1 Home Page | ||
| !{miniprofiler.include()} | ||
``` | ||
|
||
When visiting `localhost:8080`, you should see this. | ||
|
||
![](/examples/images/example0.png) | ||
|
||
See [tests/servers/<your web framework>](/tests/servers) for more examples. | ||
|
||
![](/examples/images/example1.png) | ||
![](/examples/images/example2.png) | ||
|
||
# Want to help? | ||
|
||
Things to do: | ||
|
||
- Refactor/Remove TODO comments | ||
- transform test cases into runnable examples (npm run example) | ||
- storing of client timings on first result postback (there's a todo in the `results` function about where to do this) | ||
- document more things | ||
- add providers for pg, mongodb, mysql, redis and more | ||
##### `The project is still under development, the API will change! Use with caution. NPM package is currently outdated.` | ||
|
||
# node-miniprofiler | ||
|
||
Node.js implementation of Stack Exchange's MiniProfiler | ||
|
||
[![NPM](https://img.shields.io/npm/v/miniprofiler.svg)](https://img.shields.io/npm/v/miniprofiler.svg) | ||
[![Build](https://travis-ci.org/MiniProfiler/node.svg)](https://travis-ci.org/MiniProfiler/node) | ||
[![Coverage](https://coveralls.io/repos/github/MiniProfiler/node/badge.svg?branch=master)](https://coveralls.io/github/MiniProfiler/node?branch=master) | ||
![Dependencies](https://david-dm.org/MiniProfiler/node.svg) | ||
![devDependencies](https://david-dm.org/MiniProfiler/node/dev-status.svg#info=devDependencies) | ||
|
||
## Installation (via [npm](https://npmjs.org/package/miniprofiler)) | ||
|
||
```bash | ||
$ npm install miniprofiler | ||
``` | ||
|
||
## Usage | ||
|
||
### Simple usage using express.js | ||
|
||
`server.js` | ||
|
||
```javascript | ||
var express = require('express') | ||
, miniprofiler = require('miniprofiler') | ||
, app = express(); | ||
|
||
app.set('view engine', 'pug'); | ||
app.use(miniprofiler.profile()); | ||
|
||
app.get('/', function(req, res) { | ||
req.miniprofiler.step('Step 1', function() { | ||
req.miniprofiler.step('Step 2', function() { | ||
res.render('home'); | ||
}); | ||
}); | ||
}); | ||
|
||
app.listen(8080); | ||
``` | ||
|
||
`home.pug` | ||
|
||
```javascript | ||
doctype html | ||
html | ||
head | ||
title MiniProfiler Node.js Example | ||
body | ||
h1 Home Page | ||
| !{miniprofiler.include()} | ||
``` | ||
|
||
When visiting `localhost:8080`, you should see this. | ||
|
||
![](/examples/images/example0.png) | ||
|
||
See [tests/servers/<your web framework>](/tests/servers) for more examples. | ||
|
||
![](/examples/images/example1.png) | ||
![](/examples/images/example2.png) | ||
|
||
# Want to help? | ||
|
||
Things to do: | ||
|
||
- Refactor/Remove TODO comments | ||
- transform test cases into runnable examples (npm run example) | ||
- storing of client timings on first result postback (there's a todo in the `results` function about where to do this) | ||
- document more things | ||
- add providers for pg, mongodb, mysql, redis and more |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.