Closed lennym closed 5 years ago
I'm seeing a lot of Error: no user specified.
connecting to saucelabs in the travis build. It doesn't seem related to this PR.
I see what you want to do, but this seem too hacky, would be better to define proper interface protected by tests to do what you want to do.
No problem. I don't necessarily disagree at all about the hackiness.
If I get some time for another run at it I'll see what I can do, but it may not happen as I have a "working" (read: "monkey patched") solution already.
Did we wind up with a good solution for this?
Some calls to jsonWire endpoints - in particular
log
- can potentially return large volumes of data, which is not ideally suited to being aggregated in memory and returned in a callback, and is much better consumed by the client as a stream. So add an option to_jsonWireCall
to support building custom methods which can consume the response as a stream.The context for this is a tool I am working on (https://npmjs/timeliner) which exports the performance logs from chrome devtools when running a page in chromedriver to export various performance metrics. However the performance tracing logs can be quite large and so for long running pages frequently cause the process to crash due to memory limits when consuming the logs.
By streaming the logs I can filter out non-pertinent entries without aggregating the entire log into memory and so no longer hit memory limits. See also (https://github.com/lennym/timeliner/commit/0f1f2524499d7f523246ed00003580c9ed7f62db)