Hi folks.
I have a working patch, but before I tidy it up for submission I'd like to check whether it's likely to be well received.
Our web team wanted to capture the DevTools timeline memory graphs for our overnight Calabash tests, so I cooked up a ChromeDriver patch to make them available through the same sort of faux javascript mechanism as the ':takeHeapSnapshot' interface.
++ chrome/test/chromedriver/window_commands.cc
if (script == ":startMemoryStats")
return web_view->StartMemoryStats();
if (script == ":triggerGarbageCollection")
return web_view->TriggerGarbageCollection();
if (script == ":endMemoryStats")
return web_view->EndMemoryStats();
if (script == ":collectMemoryStats")
return web_view->CollectMemoryStats(value);
It's an extra few files and some minor tweaks. Seems to work well enough on Android - I've not used it against a desktop environment.
I made 'endMemoryStats' and 'collectMemoryStats' separate because it seemed like a good idea, but I notice that ':takeHeapSnapshot' used to have a ':getHeapSnapshot' call, so perhaps I should fold 'collect' into 'end' too.
Thanks in advance,
Tim