4.0.0 • Published 10 years ago
raptor-query v4.0.0
raptor-query
Simple API to generate an InfluxQB query for Raptor data
Installation
npm install --save raptor-query
Usage
var query = require('raptor-query/lib');
query({
measurement: 'measure',
context: 'clock.gaiamobile.org',
metric: 'visuallyLoaded',
branch: 'master',
device: 'flame-kk',
memory: '319',
test: 'cold-launch',
timeFilter: 'time > now() - 7d'
});
// SELECT MEAN(value) as value FROM "measure" WHERE "metric" = 'visuallyLoaded' AND "context" = 'clock.gaiamobile.org' AND "branch" = 'master' AND "device" = 'flame-kk' AND "memory" = '319' AND "test" = 'cold-launch' AND time > now() - 7d GROUP BY "revisionId" fill(none)Measurements
Common options:
branch: git branch, e.g.master,v2.5device: physically-tested device, e.g.flame-kk,ariesmemory: configured device memory in MB, e.g.319,512,2048timeFilter: InfluxDB-compatible time clause, e.g.time > now() - 7d,time = 2015-10-01database: InfluxDB database namehost: InfluxDB database hostnameport: InfluxDB database portusername: InfluxDB database usernamepassword: InfluxDB database passwordprotocol: InfluxDB database protocol
measurement: 'measure' options:
context: application context, e.g.clock.gaiamobile.org,communications.gaiamobile.org@contactsmetric: performance measurement, e.g.visuallyLoaded,fullyLoadedtest: performance test, e.g.cold-launch,reboot
measurement: 'memory' options:
context: application context, e.g.clock.gaiamobile.org,communications.gaiamobile.org@contactsmetric: performance memory, e.g.uss,psstest: performance test, e.g.cold-launch,reboot
measurement: 'power' options:
context: application context, e.g.clock.gaiamobile.org,communications.gaiamobile.org@contactstest: power test, e.g.camera_video,video_playback
measurement: 'mtbf' options:
node: lab environment, e.g.moztwlab01,mozmtv01