Android SDK Version
  • java.lang.Object
    • com.facebook.appevents.PerformanceGuardian

public class PerformanceGuardian
extends java.lang.Object
Avoid process activities which process time exceed threshold. Reboot the process if app version changed.
Nested Class Summary
Modifier and TypeClass and Description
static class PerformanceGuardian.UseCase 
Constructor Summary
Constructor and Description
PerformanceGuardian() 
Method Summary
Modifier and TypeMethod and Description
static booleanisBannedActivity(java.lang.String activityName, PerformanceGuardian.UseCase useCase)
Return true when current activity is banned.
static voidlimitProcessTime(java.lang.String activityName, PerformanceGuardian.UseCase useCase, long startTime, long endTime)
Calculate current activity process time.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

PerformanceGuardian

public PerformanceGuardian()
Method Detail

isBannedActivity

public static boolean isBannedActivity(java.lang.String activityName,
                                       PerformanceGuardian.UseCase useCase)
Return true when current activity is banned. Activities which process time exceed limit multiple times will be added into banned set.

limitProcessTime

public static void limitProcessTime(java.lang.String activityName,
                                    PerformanceGuardian.UseCase useCase,
                                    long startTime,
                                    long endTime)
Calculate current activity process time. Return without action if current process time is normal. Add current activity to banned activity set if exceed activity process time threshold. Update app version.