Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Use variables to configure node index parameter in aliasByNode #3

Open
gajus opened this issue Nov 16, 2016 · 1 comment
Open

Use variables to configure node index parameter in aliasByNode #3

gajus opened this issue Nov 16, 2016 · 1 comment

Comments

@gajus
Copy link

gajus commented Nov 16, 2016

At the moment, all the metric queries use hardcoded node index number to invokealiasByNode function, e.g.

aliasByNode(sitespeed_io.$path.summary.$group.$browser.$connectivity.browsertime.pageTimings.*.median, 8);

Here is an example in the code base,

"target": "aliasByNode(sitespeed_io.$path.pageSummary.$domain.$page.$browser.$connectivity.browsertime.statistics.timings.pageTimings.*.median, 11)",

This makes it very tedious to add new dimensions (e.g. such as this requirement sitespeedio/sitespeed.io#1327).

Consider using variables, e.g.

aliasByNode(sitespeed_io.$path.summary.$group.$browser.$connectivity.browsertime.pageTimings.*.median, $aliasNodeDepth);
@gajus
Copy link
Author

gajus commented Nov 16, 2016

Or even smarter approach would be to use a constant that defines a number of new dimensions after the default namespace, default being 1 and add this constant to whatever the metric depth is. Then if user adds a new depth to the data, user would only need to increment the former variable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant