Skip to content

Commit

Permalink
Add markdown syntax highlighting to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ulikoehler committed Jan 11, 2013
1 parent 4bf33b1 commit 0713876
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -45,20 +45,20 @@ formats:

Client code shouldn't load these directly. Instead, require 'stackvis' and use
lookupReader and lookupWriter:

```javascript
var mod_stackvis = require('stackvis');
var dtrace_reader = mod_stackvis.lookupReader('dtrace')
var collapsed_writer = mod_stackvis.lookupWriter('collapsed');

```
The main operation is translating from one representation to another (e.g.,
DTrace output to a flame graph) using pipeStacks() (which requires a Bunyan
logger):

```javascript
var mod_bunyan = require('bunyan');
var log = new mod_bunyan({ 'name': 'mytool', 'stream': process.stderr });
mod_stackvis.pipeStacks(log, process.stdin, dtrace_reader, collapsed_writer,
process.stdout, function () { console.error('translation finished'); });

```
This example instantiates a new dtrace_reader to read DTrace output from
process.stdin and then emits the result in collapsed form to process.stdout
through the collapsed_writer.
Expand Down

0 comments on commit 0713876

Please sign in to comment.