Class MXMetricManager

  • All Implemented Interfaces:
    NSObject

    public class MXMetricManager
    extends NSObject
    MXMetricManager An instance of this class can be used to retrieve periodic, aggregated power and performance metrics. To receive metrics, clients must acquire a reference to the shared instance of the metric manager and add an eligible MXMetricManagerSubscriber. Metrics are not guaranteed to be delivered, but can be expected atleast once per day when conditions permit. Subscribers to the metric manager can remove themselves using removeSubscriber:subscriber if they no longer wish to receive metrics. API-Since: 13.0
    • Constructor Detail

      • MXMetricManager

        protected MXMetricManager​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addSubscriber

        public void addSubscriber​(@NotNull
                                  @NotNull MXMetricManagerSubscriber subscriber)
        addSubscriber:subscriber Adds a subscriber to the metric manager. Subscribers can receive metric payloads by conforming to the MXMetricManagerSubscriber protocol.
        Parameters:
        subscriber - An object that conforms to the MXMetricManagerSubscriber protocol.
      • allocWithZone

        public static MXMetricManager allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • makeLogHandleWithCategory

        @NotNull
        public static @NotNull os_log_t makeLogHandleWithCategory​(@NotNull
                                                                  @NotNull java.lang.String category)
        makeLogHandleWithCategory:category Retrieve a log handle for flagging critical sections with os_signpost(). The log handle configures persistence for any signposts emit while using the log handle.
        Parameters:
        category - A string used to define a log category
        Returns:
        A log handle that can be used with the logging framework.
      • pastPayloads

        @NotNull
        public @NotNull NSArray<? extends MXMetricPayload> pastPayloads()
        [@property] pastPayloads A list of past metric payloads received.
      • removeSubscriber

        public void removeSubscriber​(@NotNull
                                     @NotNull MXMetricManagerSubscriber subscriber)
        removeSubscriber:subscriber Removes a subscriber from the metric manager. The subscriber indicated, if previously registered, will no longer receive metric payloads.
        Parameters:
        subscriber - An object that conforms to the MXMetricManagerSubscriber protocol.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • sharedManager

        @NotNull
        public static @NotNull MXMetricManager sharedManager()
        [@property] sharedManager Singleton instance of MXMetricManager.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • pastDiagnosticPayloads

        @NotNull
        public @NotNull NSArray<? extends MXDiagnosticPayload> pastDiagnosticPayloads()
        [@property] pastDiagnosticPayloads A list of past diagnostic payloads received. API-Since: 14.0
      • extendLaunchMeasurementForTaskIDError

        public static boolean extendLaunchMeasurementForTaskIDError​(@NotNull
                                                                    @NotNull java.lang.String taskID,
                                                                    @Nullable
                                                                    @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        extendLaunchMeasurementForTaskID:error: Start measuring an extended launch task with the given task id. This method tracks extra setup tasks required to make the application perceived as fully launched, such as loading up content from the disk or refreshing data from the network, rendering images, etc. The first task needs to start before or during @c UISceneDelegate.scene(_:restoreInteractionStateWith:) or before @c UISceneDelegate.sceneDidBecomeActive(_:) is called on the first scene to connect. For example, at the time @c UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:) is called. Other tasks need to start before the last current task is finished, otherwise the extended launch measurement will end. The maximum number of tasks is 16. This method needs to be called on the main thread.
        Parameters:
        taskID - The task identifier. Must be an unique nonnull custom string.
        error - If an error occurs, this will contain a valid @c NSError object on exit.
        Returns:
        Returns @c YES if the measurement started successfully and @c NO otherwise. API-Since: 16.0
      • finishExtendedLaunchMeasurementForTaskIDError

        public static boolean finishExtendedLaunchMeasurementForTaskIDError​(@NotNull
                                                                            @NotNull java.lang.String taskID,
                                                                            @Nullable
                                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        finishExtendedLaunchMeasurementForTaskID:error: Signal the end of an extended launch task previously started with @c extendLaunchMeasurementForTaskID:error: . This method needs to be called on the main thread.
        Parameters:
        taskID - The task identifier. Must match the task identifier passed to @c extendLaunchMeasurementForTaskID:error: .
        error - If an error occurs, this will contain a valid @c NSError object on exit.
        Returns:
        Returns @c YES if the measurement for the task finished successfully and @c NO otherwise. API-Since: 16.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.