macbre / phantomas

Headless Chromium-based web performance metrics collector and monitoring tool
https://www.npmjs.com/package/phantomas
BSD 2-Clause "Simplified" License
2.25k stars 141 forks source link

Some kinds of DOMqueries are ignored #374

Closed gmetais closed 9 years ago

gmetais commented 9 years ago

Hi @macbre!

Phantomas is tracking:

I believe they should be counted just like the others, don't you?

macbre commented 9 years ago

:+1:

gmetais commented 9 years ago

Hi @macbre!

Thanks a lot for fixing this issue so quickly. I was pretty happy with it but sorry, i just realized this changes were introducing another problem about the duplicated DOM queries.

For example:

element1.getElementsByClassName('foo')
element2.getElementsByClassName('foo')

These two queries are not the same and shouldn't be counted as duplicated. The context should be discriminent when counting duplicated queries with:

What do you think about it?