boyney123 / garie-lighthouse

Lighthouse Garie plugin. Polls websites to checkout performance metrics also supports webhooks.
MIT License
50 stars 24 forks source link

Adding ability to add custom labels to Lighthouse tests #16

Open baneDD opened 5 years ago

baneDD commented 5 years ago

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:

codecov-io commented 5 years ago

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