WebKit / Speedometer

An open source repository for the Speedometer benchmark
Other
592 stars 70 forks source link

Remove the PageElement wrapper #369

Open julienw opened 7 months ago

julienw commented 7 months ago

Working on #368 led me to take a step back and think more about the PageElement wrapper. What is the purpose of this wrapper? My understanding is that this serves 2 purposes: 1/ Limits the things we can do with a retrieved element. Is this purpose useful in the context of this benchmark? I'd like to argue that it's not. 2/ Provides some common functionality (all the event dispatchers especially). This is useful, but could be provided with a more functional model taking the element as parameter.

Therefore my proposal (for speedometer 4) would be to get rid of the wrapper that brings more complexity than it resolves problems.

Thoughts?

camillobruni commented 6 months ago

Let's have a bigger discussion around this with thorsten as well.

On our end we've been thinking that it would likely make more sense to make the workloads completely independent from the main runner by reporting metrics directly instead of being instrumented form the outside. Using a small shared library between the workloads could easily facilitate this and drop the need for the PageElement (or click events from the outside).

I think the runner-based click events made a lot of sense back when all the workloads were essentially doing the same thing. Once you have diverse workloads there is really not much beyond needing consistent metrics (and some minimal synchronisation).

Some background as to why we originally pushed for the PageElement:

The last point is likely not going to happen on our end any time soon though.