Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rule): add more perf timing metrics to rules #1472

Merged
merged 5 commits into from Apr 11, 2019
Merged

Conversation

straker
Copy link
Contributor

@straker straker commented Apr 3, 2019

Add metrics for rule.gather, rule.matches and axe.utils.isHidden. This allows us to see where a rule is taking the most time better. Also rename rules to be sortable based on id. Lastly, have axe only output metrics that were done after axe run, otherwise you get metrics that the website ran before axe did, which makes it really confusing when reading the metric logs.

Example output:

Measure rule_aria-valid-attr-value#gather_axe.utils.isHidden took 931ms
Measure rule_aria-valid-attr-value#gather took 931ms
Measure rule_aria-valid-attr-value took 937ms
Measure rule_aria-valid-attr-value#matches took 4ms
Measure rule_aria-valid-attr-value#runchecks took 2ms
Measure rule_aria-valid-attr#gather_axe.utils.isHidden took 960ms
Measure rule_aria-valid-attr#gather took 960ms
Measure rule_aria-valid-attr took 969ms
Measure rule_aria-valid-attr#matches took 9ms
Measure rule_aria-valid-attr#runchecks took 0ms
Measure rule_color-contrasr#gather_axe.utils.isHidden took 0ms
Measure rule_color-contrast#gather took 0ms 
Measure rule_color-contrast#matches took 860ms 
Measure rule_color-contrast took 1264ms 
Measure rule_color-contrast#runchecks took 404ms

Closes issue: N/A

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Has documentation updated, a DU ticket, or requires no documentation change
  • Includes new tests, or was unnecessary
  • Code is reviewed for security by: Stephen

@straker straker requested a review from a team as a code owner April 3, 2019 22:27
lib/core/base/rule.js Outdated Show resolved Hide resolved
@straker straker changed the title Feat: add more perf timing metrics to rules Feat(rule): add more perf timing metrics to rules Apr 5, 2019
@stephenmathieson stephenmathieson changed the title Feat(rule): add more perf timing metrics to rules feat(rule): add more perf timing metrics to rules Apr 5, 2019
@WilcoFiers WilcoFiers merged commit 98646e5 into develop Apr 11, 2019
@WilcoFiers WilcoFiers deleted the perfTimings branch April 11, 2019 10:39
@WilcoFiers WilcoFiers added this to the Axe-core 3.3 milestone May 1, 2019
@jeankaplansky
Copy link
Contributor

Not rule-help related.

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.

None yet

4 participants