You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes if the ViewController changes while a trace is in progress, we want to abandon the trace as the VC may or may not finish the process we're tracking. Calling stop() on the trace will log an incomplete trace, which is not what we want as it will negatively affect the average elapsed time reported in the console. I couldn't find any indication that this feature already exists, but it'd be great if we could call something like cancel() on the trace to abort it without logging the results. Basically the same thing as stop() just without the reporting to Firebase.
Thanks!
The text was updated successfully, but these errors were encountered:
We're still interested in this behavior. @morganchen12 I know you guys are busy, but do you think this is something we might get some day or is it more likely this will sit here until the heat-death of our universe? 🙃
In the mean time, can you recommend this as a workaround or is there a possible danger to orphaning the trace?
var exampleTrace: Trace? = Performance.startTrace(name: "exampleTrace")
// Cancel current trace
exampleTrace = nil
// Start a new trace
exampleTrace = Performance.startTrace(name: "exampleTrace")
Sometimes if the ViewController changes while a trace is in progress, we want to abandon the trace as the VC may or may not finish the process we're tracking. Calling stop() on the trace will log an incomplete trace, which is not what we want as it will negatively affect the average elapsed time reported in the console. I couldn't find any indication that this feature already exists, but it'd be great if we could call something like cancel() on the trace to abort it without logging the results. Basically the same thing as stop() just without the reporting to Firebase.
Thanks!
The text was updated successfully, but these errors were encountered: