Skip to content

Adding ability to add custom labels to Lighthouse tests#16

Open
baneDD wants to merge 4 commits intoboyney123:masterfrom
baneDD:master
Open

Adding ability to add custom labels to Lighthouse tests#16
baneDD wants to merge 4 commits intoboyney123:masterfrom
baneDD:master

Conversation

@baneDD
Copy link

@baneDD baneDD commented Apr 10, 2019

What: Added ability to label Lighthouse report and data points.

Why: This can be used to differentiate between reports for same URL made with different Lighthouse plugin confg, for example "desktop" and "mobile". There is no provision to do so in the current setup as reports are saved with the timestamp only and data is added to the database with URL being the only label.

How: I added a parameter called "label" to each Lighthouse config. It's then passed to the functions that save reports and add the data to InfluxDB. If there is no label data is stored in the same format as previously. Otherwise it's stored with ~label added to the end of both filename and the URL for InfluxDB data.

Checklist:

  • [ x ] Documentation
  • [ x ] Tests
  • [ x ] Ready to be merged
  • [ N/A ] Added myself to contributors table

@codecov-io
Copy link

Codecov Report

Merging #16 into master will increase coverage by 0.09%.
The diff coverage is 92.85%.

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
+ Coverage   93.33%   93.43%   +0.09%     
==========================================
  Files           5        5              
  Lines         135      137       +2     
  Branches       25       27       +2     
==========================================
+ Hits          126      128       +2     
  Misses          9        9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants