There should be only one target manager
See original GitHub issueIn FR, each NetworkMonitor creates its own target manager. The target manager does things to targets as they attach. It may be bad to do this stuff multiple times when one would suffice.
Instead, we could add to Driver
a getTargetManagerForSession(session)
method that would return a cached target manager.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
The On-Time, On-Target Manager: How a "Last-Minute ...
Steve Gottry and Ken Blanchard wrote an amazingly simple book packed with practical ideas backed by spiritual concepts. You could read this book...
Read more >The-On-Time-On-Target-Manager-Read-Sample0001.pdf
Ken Blanchard and Steve Gottry have knocked it out of the park with The On-Time, On-Target. Manager. This book not only offers a...
Read more >Book Review: The On-Time On-Target Manager
I decided to purchase The On-time, On-target Manager as a recommendation during a personal development programme called 'Bring-it'.
Read more >The On-Time, On-Target Manager: How a Last-Minute ...
The author of the phenomenal New York Times bestselling classic The One-Minute® Manager explores one of the most common and.
Read more >Target Corporation Code of Ethics
Consider it an essential resource for making ethical choices – ... the items will only be in the aisle a short ... Vendor...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
a few things that came up today:
having a standalone TargetManager is great. The legacy auto attach logic is diffuse and appears general (e.g. we allow
sendCommand
to arbitrary session ids), but is actually used only for listening to iframe network requests. The new TargetManager is nice in that it admits it only does that one thing and does it mostly in one place, so it makes a bit of sense to be managed by network-monitor.But: if we want a single targetManager, it makes sense to invert control and have it as an easily available tool at the driver/connection/defaultSession/wherever level. For instance, I recently wanted to write a gatherer that did a
context.evaluate()
to inject aperformance.measure()
into every iframe. That would have to all be manually done in lighthouse right now, even though we autoattach to all targets and check for iframetargetInfo
s and everything 😃 There’s also no need to be as general as pptr (providing an API to find iframes and get a handle to them), because, again, we’re already auto-attaching to them.networkMonitoring should similarly be persistent while gathering, and it should be easily accessible from anywhere. waitFor and fullPageScreenshot can be clients of that, rather than driving it. Lighthouse is already getting all the CDP events, whether it’s being recorded or not, so there’s no reason you shouldn’t be able to just subscribe to
network-critical-idle
and be notified at any time, instead of having to fire up a networkMonitor of your own.but that’s not a P1 anymore, all P1 stuff done