//leakcanary-repo/shark/HeapDiff/Companion
Companion¶
[jvm]\ object Companion
Functions¶
Name | Summary |
---|---|
repeatingAndroidInProcessScenario | [androidJvm] fun HeapDiff.Companion.repeatingAndroidInProcessScenario(objectGrowthDetector: ObjectGrowthDetector = ObjectGrowthDetector.forAndroidHeap(), heapDumpDirectoryProvider: HeapDumpDirectoryProvider = TargetContextHeapDumpDirectoryProvider( heapDumpDirectoryName = "heap_dumps_object_growth" ), heapDumper: HeapDumper = HeapDumper.forAndroidInProcess() .withGc(gcTrigger = GcTrigger.inProcess()) .withDetectorWarmup(objectGrowthDetector, androidHeap = true), heapDumpStorageStrategy: HeapDumpStorageStrategy = HeapDumpStorageStrategy.DeleteOnHeapDumpClose()): RepeatingScenarioObjectGrowthDetector Creates a RepeatingScenarioObjectGrowthDetector suitable for Android in process tests, such as Espresso tests. |
repeatingJvmInProcessScenario | [jvm] fun HeapDiff.Companion.repeatingJvmInProcessScenario(objectGrowthDetector: ObjectGrowthDetector = ObjectGrowthDetector.forJvmHeap(), heapDumpDirectoryProvider: HeapDumpDirectoryProvider = RepositoryRootHeapDumpDirectoryProvider( "heap_dumps_object_growth" ), heapDumper: HeapDumper = HeapDumper.forJvmInProcess() .withGc(gcTrigger = GcTrigger.inProcess()) .withDetectorWarmup(objectGrowthDetector, androidHeap = false), heapDumpStorageStrategy: HeapDumpStorageStrategy = HeapDumpStorageStrategy.DeleteOnHeapDumpClose()): RepeatingScenarioObjectGrowthDetector Creates a RepeatingScenarioObjectGrowthDetector suitable for JVM in process tests. |
repeatingUiAutomatorScenario | [androidJvm] fun HeapDiff.Companion.repeatingUiAutomatorScenario(objectGrowthDetector: ObjectGrowthDetector = ObjectGrowthDetector.forAndroidHeap(), dumpedAppPackageName: String = InstrumentationRegistry.getInstrumentation().targetContext.packageName, heapDumpDirectoryProvider: HeapDumpDirectoryProvider = AndroidDeviceTempHeapDumpDirectoryProvider( heapDumpDirectoryName = "heap_dumps_object_growth_$dumpedAppPackageName" ), heapDumper: HeapDumper = HeapDumper.forUiAutomatorAsShell( withGc = true, dumpedAppPackageName = dumpedAppPackageName ), heapDumpStorageStrategy: HeapDumpStorageStrategy = HeapDumpStorageStrategy.DeleteOnHeapDumpClose { heapDumpFile -> UiAutomatorShellFileDeleter.deleteFileUsingShell(heapDumpFile) }): RepeatingScenarioObjectGrowthDetector Creates a RepeatingScenarioObjectGrowthDetector suitable for Android UI Automator tests. |