https://github.com/stasm/raptor-parse
Parse Raptor's LDJSON metrics files
https://github.com/stasm/raptor-parse
Last synced: over 1 year ago
JSON representation
Parse Raptor's LDJSON metrics files
- Host: GitHub
- URL: https://github.com/stasm/raptor-parse
- Owner: stasm
- Created: 2015-10-27T15:46:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-28T13:47:12.000Z (over 10 years ago)
- Last Synced: 2025-03-16T15:52:16.412Z (over 1 year ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
raptor-parse [![Build Status][travisimage]][travislink]
============================================================
[travisimage]: https://travis-ci.org/stasm/raptor-parse.png?branch=master
[travislink]: https://travis-ci.org/stasm/raptor-parse
Parse Raptor's LDJSON metrics files into the following JSON hierarchy:
- app origin
- timestamp of the test series
- performance metric
- array of values
Usage
-----
$ raptor-parse metrics.ldjson
API
---
You can also use _raptor-parse_ programmatically. It exposes two functions
for working with Raptor data: `read` reads in a LDJSON stream with the raw
metrics data and `parse` aggregates the data into a JSON object.
```javascript
// Needed for Node.js 0.10 and 0.12.
require('babel/polyfill');
var fs = require('fs');
var rp = require('raptor-parse');
rp.read(fs.createReadStream(filename))
.then(rp.parse)
.then(console.log)
.catch(console.error);
```
Installation
------------
npm install -g raptor-parse