* Use browsertime runTime for Graphite/Influx and Grafana anootations and data.
The old implementation always used the start time for all metrics sent except
browsertime.run metrics (data for each run).
This fix instead makes sure that if metrics (and annotations) uses the browsertime.pageSummary runTime (when the actual first iteration happen).
This makes more sense if you test multiple pages within the same test.
* Update Grafana auth settings to allow api token or basic auth
Current auth. configuration for Grafana restricts to use API key only.
This change will allow to use both auth. types:
Bearer {API_KEY}
or
Basic {USER_PASSWORD_HASH}
Co-authored-by: Vladimir Stepanov <vss1.odessa@gmail.com>
Co-authored-by: Peter Hedenskog <peter@soulgalore.com>
* test(cli): add basic coverage to test cli help output
- Add basic coverated when invoking the command without arguments
- Basic checks for grafana help
* feat(cli): delegate command line options configuration to the Grafana plugin
It uses the name of the plugin as a namespace for all options. Plugin authors _may_ use this
in the future to show helpful messages in the default sitespeed CLI help output.
- Move CLI options to its own module to not pollute the plugin's `index.js` file.
- Change the plugin interface to define a `.cliOptions` property or method containing the `yargs`
configuration to be used by the CLI code
- Add code coverage for the existing plugin API to ensure no regressions are introduced for Grafana
- Move parts of the `yargs`-related code to `cli/util.js`. Tests to ensure the initial proposition for
plugin-based CLI options are included.
Co-authored-by: Peter Hedenskog <peter@soulgalore.com>
* Added connectivity and location tag for WebPageTest
* If you test both using WPT and BT, wait for all metrics to arrive before sending the annotation
* Fix link to WebPageTest that before could link to old result