Updated references, test, cleaned up PR
diff --git a/build.gradle b/build.gradle
index 47beac4..bde76f6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,7 +22,8 @@
           test: [
               core: 'androidx.test:core:1.0.0',
               espresso: 'androidx.test.espresso:espresso-core:3.1.0',
-              rules: 'androidx.test:rules:1.1.0',
+              ext: 'androidx.test.ext:junit:1.1.1',
+              rules: 'androidx.test:rules:1.2.0',
               runner: 'androidx.test:runner:1.2.0',
               orchestrator: 'androidx.test:orchestrator:1.1.0',
           ],
diff --git a/gradle.properties b/gradle.properties
index 624e830..c75179b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -21,3 +21,6 @@
 org.gradle.caching=true
 org.gradle.configureondemand=true
 org.gradle.parallel=true
+
+# Benchmark library pulls additional data from device
+android.enableAdditionalTestOutput=true
diff --git a/leakcanary-android-benchmark/build.gradle b/leakcanary-android-benchmark/build.gradle
index 4bd2a04..d5d11e9 100644
--- a/leakcanary-android-benchmark/build.gradle
+++ b/leakcanary-android-benchmark/build.gradle
@@ -8,11 +8,11 @@
   implementation deps.androidx.test.runner
   implementation deps.kotlin.stdlib
 
-  androidTestImplementation deps.androidx.test.core
-  androidTestImplementation deps.androidx.test.espresso
-  androidTestImplementation deps.androidx.test.rules
-  androidTestImplementation deps.androidx.fragment
   androidTestImplementation deps.androidx.benchmark
+  androidTestImplementation deps.androidx.fragment
+  androidTestImplementation deps.androidx.test.ext
+  androidTestImplementation deps.androidx.test.rules
+  androidTestImplementation deps.androidx.test.runner
 }
 
 android {
diff --git a/leakcanary-android-benchmark/src/androidTest/java/leakcanary/BenchmarkTest.kt b/leakcanary-android-benchmark/src/androidTest/java/leakcanary/BenchmarkTest.kt
deleted file mode 100644
index 5a7eacb..0000000
--- a/leakcanary-android-benchmark/src/androidTest/java/leakcanary/BenchmarkTest.kt
+++ /dev/null
@@ -1,66 +0,0 @@
-package leakcanary
-
-import android.util.Log
-import android.util.LruCache
-import androidx.benchmark.junit4.BenchmarkRule
-import androidx.benchmark.junit4.measureRepeated
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.runner.AndroidJUnit4
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import shark.AndroidObjectInspectors
-import shark.AndroidReferenceMatchers
-import shark.HeapAnalyzer
-import shark.KeyedWeakReferenceFinder
-import shark.OnAnalysisProgressListener
-import shark.OnAnalysisProgressListener.Step
-import java.io.File
-import java.io.FileOutputStream
-
-@RunWith(AndroidJUnit4::class)
-class BenchmarkTest {
-
-  @get:Rule
-  val benchmarkRule = BenchmarkRule()
-
-  @Test fun lruTest() {
-    val cache = LruCache<Long, String>(3000)
-    benchmarkRule.measureRepeated {
-      for (i in 0..3000) {
-        cache.put(i + 1500L, "Haha $i")
-      }
-    }
-  }
-
-  // Kept for reference
-
-  /*@Test fun analyzeLargeDump() {
-      profileAnalysis("large-dump.hprof")
-  }*/
-
-  private fun profileAnalysis(fileName: String) {
-    val instrumentation = InstrumentationRegistry.getInstrumentation()
-    val context = instrumentation.targetContext
-
-    val heapDumpFile = File(context.filesDir, "ProfiledTest.hprof")
-    context.assets.open(fileName)
-        .copyTo(FileOutputStream(heapDumpFile))
-
-    val analyzer = HeapAnalyzer(object : OnAnalysisProgressListener {
-      override fun onAnalysisProgress(step: Step) {
-        Log.d("LeakCanary", step.name)
-      }
-    })
-
-    analyzer.analyze(
-        heapDumpFile = heapDumpFile,
-        leakingObjectFinder = KeyedWeakReferenceFinder,
-        referenceMatchers = AndroidReferenceMatchers.appDefaults,
-        objectInspectors = AndroidObjectInspectors.appDefaults,
-        computeRetainedHeapSize = true
-    )
-  }
-
-}
-
diff --git a/leakcanary-android-benchmark/src/androidTest/java/leakcanary/LruCacheBenchmarkTest.kt b/leakcanary-android-benchmark/src/androidTest/java/leakcanary/LruCacheBenchmarkTest.kt
new file mode 100644
index 0000000..b63fa81
--- /dev/null
+++ b/leakcanary-android-benchmark/src/androidTest/java/leakcanary/LruCacheBenchmarkTest.kt
@@ -0,0 +1,48 @@
+package leakcanary
+
+import android.util.LruCache
+import androidx.benchmark.junit4.BenchmarkRule
+import androidx.benchmark.junit4.measureRepeated
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class LruCacheBenchmarkTest {
+
+  /*
+  * Don't forget to run ./gradlew lockClocks on Rooted Device!
+  */
+
+  @get:Rule
+  val lruRule = BenchmarkRule()
+
+  @Test fun lruInsertTest() {
+    val cache = LruCache<Long, String>(3000)
+    lruRule.measureRepeated {
+      fillCache(cache)
+    }
+  }
+
+  @Test fun lruReadTest() {
+    val cache = LruCache<Long, String>(3000)
+    fillCache(cache)
+    lruRule.measureRepeated {
+      var value: String? = null
+      for (i in 0..100000) {
+        value = cache[i + i * 1500L]
+      }
+    }
+  }
+  private fun fillCache(cache: LruCache<Long, String>) {
+    for (i in 0..100000) {
+      cache.put(i + i * 1500L, VALUE)
+    }
+  }
+
+  companion object {
+    const val VALUE = "HAHA"
+  }
+}
+
diff --git a/leakcanary-android-benchmark/src/androidTest/res/values/bools.xml b/leakcanary-android-benchmark/src/androidTest/res/values/bools.xml
new file mode 100644
index 0000000..de1623f
--- /dev/null
+++ b/leakcanary-android-benchmark/src/androidTest/res/values/bools.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+  <bool name="leak_canary_allow_in_non_debuggable_build">true</bool>
+</resources>