Tag CPU data and Lighthouse score in InfluxDB (#2225)
* Add specific tags for CPU data in InfluxDB Pre this version you could get the CPU data but it was kind of hard to understand the tags. With this fix we add a cpu tag that either is category or event. That way it's easier to pickup (and understand) that data. * Add audit tag for Lighthouse tests sent to InfluxDB Before the fix we just sent "score" but no tag telling which score. We now add a tag named audit that tells which audit that is used for the score. See #2222 and #2224
This commit is contained in:
parent
e0e82dc44f
commit
7a155cb33c
|
|
@ -107,6 +107,12 @@ class InfluxDBDataGenerator {
|
|||
if (keyArray.length >= 5) {
|
||||
tags[keyArray[2]] = keyArray[3];
|
||||
}
|
||||
|
||||
if (key.indexOf('cpu.categories') > -1) {
|
||||
tags.cpu = 'category';
|
||||
} else if (key.indexOf('cpu.events') > -1) {
|
||||
tags.cpu = 'event';
|
||||
}
|
||||
} else if (type === 'browsertime.summary') {
|
||||
// firstPaint.median
|
||||
// userTimings.marks.logoTime.median
|
||||
|
|
@ -174,6 +180,12 @@ class InfluxDBDataGenerator {
|
|||
if (key.indexOf('contentTypes') > -1) {
|
||||
tags.contentType = keyArray[2];
|
||||
}
|
||||
} else if (type === 'lighthouse.pageSummary') {
|
||||
// categories.seo.score
|
||||
// categories.performance.score
|
||||
if (key.indexOf('score') > -1) {
|
||||
tags.audit = keyArray[1];
|
||||
}
|
||||
} else {
|
||||
// console.log('Missed added tags to ' + key + ' ' + type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue