From 6a22757bd058cdc468945c45a0b498876f8a7149 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ricau Date: Thu, 9 May 2024 17:21:31 -0700 Subject: [PATCH] quick updates --- docs/changelog.md | 8 ++------ shark/shark/src/main/java/shark/ObjectGrowthDetector.kt | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 567635da1b..2e6489ac48 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -87,16 +87,12 @@ class MyUiAutomatorTest { ### Heap Growth: Shark CLI -Install Shark CLI: - -``` -brew install leakcanary-shark -``` +Download the [Shark CLI Zip](https://github.com/square/leakcanary/releases/download/v3.0-alpha-2/shark-cli-3.0-alpha-2.zip) (alphas cannot be released to brew) and unzip it. Run the `heap-growth` command: ``` -$ shark-cli -p com.example.app.debug heap-growth +$ ~/Downloads/shark-cli-3.0-alpha-2/bin/shark-cli -p com.example.app.debug heap-growth ``` ## Version 2.14 (2024-04-17) diff --git a/shark/shark/src/main/java/shark/ObjectGrowthDetector.kt b/shark/shark/src/main/java/shark/ObjectGrowthDetector.kt index 58898640af..db2ad8492f 100644 --- a/shark/shark/src/main/java/shark/ObjectGrowthDetector.kt +++ b/shark/shark/src/main/java/shark/ObjectGrowthDetector.kt @@ -52,8 +52,8 @@ class ObjectGrowthDetector( if (output is HeapGrowthTraversal) { val scenarioCount = output.traversalCount * output.scenarioLoopsPerGraph SharkLog.d { - "After $scenarioCount scenario iterations and ${output.traversalCount} heap dumps: " + - "${output.growingObjects.size} growing nodes" + "After $scenarioCount scenario iterations and ${output.traversalCount} heap dumps, " + + "${output.growingObjects.size} growing nodes:\n" + output.growingObjects } } }