FIRPerformance


@interface FIRPerformance : NSObject

This class allows you to configure the Firebase Performance Reporting SDK. It also provides the

  • interfaces to create timers and enable or disable automatic metrics capture. *
  • This SDK uses a Firebase Instance ID token to identify the app instance and periodically sends
  • data to the Firebase backend. (see [FIRInstanceID getIDWithHandler:]).
  • To stop the periodic sync, call [FIRInstanceID deleteIDWithHandler:] and
  • either disable this SDK or set FIRPerformance.dataCollectionEnabled to NO.
  • Controls the capture of performance data. When this value is set to NO, none of the performance data will sent to the server. Default is YES.

    This setting is persisted, and is applied on future invocations of your application. Once explicitly set, it overrides any settings in your Info.plist.

    Declaration

    Objective-C

    @property (getter=isDataCollectionEnabled, assign, readwrite, nonatomic)
        BOOL dataCollectionEnabled;
  • Controls the instrumentation of the app to capture performance data. When this value is set to NO, the app will not be instrumented to collect performance data (in scenarios like app_start, networking monitoring). Default is YES.

    This setting is persisted, and is applied on future invocations of your application. Once explicitly set, it overrides any settings in your Info.plist.

    Declaration

    Objective-C

    @property (getter=isInstrumentationEnabled, assign, readwrite, nonatomic)
        BOOL instrumentationEnabled;
  • Declaration

    Objective-C

    + (nonnull instancetype)sharedInstance;

    Return Value

    The shared instance.

  • Creates an instance of FIRTrace after creating the shared instance of FIRPerformance. The trace will automatically be started on a successful creation of the instance. The |name| of the trace cannot be an empty string.

    Declaration

    Objective-C

    + (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name;

    Parameters

    name

    The name of the Trace.

    Return Value

    The FIRTrace object.

  • Creates an instance of FIRTrace. This API does not start the trace. To start the trace, use the -start API on the returned |FIRTrace| object. The |name| cannot be an empty string.

    Declaration

    Objective-C

    - (nullable FIRTrace *)traceWithName:(nonnull NSString *)name;

    Parameters

    name

    The name of the Trace.

    Return Value

    The FIRTrace object.