Trace

class Trace : NSObject, PerformanceAttributable

FIRTrace objects contain information about a Trace, which is a sequence of steps. Traces can be used to measure the time taken for a sequence of steps. Traces also include Counters. Counters are used to track information which is cumulative in nature (e.g., Bytes downloaded). Counters are scoped to an FIRTrace object.

  • Name of the trace.

    Declaration

    Swift

    var name: String { get }
  • Not a valid initializer.

  • Starts the trace.

    Declaration

    Swift

    func start()
  • Stops the trace if the trace is active.

    Declaration

    Swift

    func stop()
  • Increments the counter for the provided counter name by 1. If it is a new counter name, the counter value will be initialized to 1. Does nothing if the trace has not been started or has already been stopped.

    Declaration

    Swift

    func incrementCounter(named counterName: String)

    Parameters

    counterName

    The name of the counter to increment.

  • Increments the counter for the provided counter name with the provided value. If it is a new counter name, the counter value will be initialized to the value. Does nothing if the trace has not been started or has already been stopped.

    Declaration

    Swift

    func incrementCounter(named counterName: String, by incrementValue: Int)

    Parameters

    counterName

    The name of the counter to increment.

    incrementValue

    The value the counter would be incremented with.