Add BlackHole to enable controlling dead code elimination in Benchmark

Fixes: 286091643
Test: BlackHoleBenchmark
Relnote: "Added experimental `BlackHole.consume()` api to prevent dead
code elimination in microbenchmarks."

Change-Id: If681208c4e5ad5d054117c2320b4fd56b86f4ff5
diff --git a/benchmark/benchmark-junit4/proguard-rules.pro b/benchmark/benchmark-junit4/proguard-rules.pro
index cbc8983..544c831 100644
--- a/benchmark/benchmark-junit4/proguard-rules.pro
+++ b/benchmark/benchmark-junit4/proguard-rules.pro
@@ -1,5 +1,8 @@
 ## These rules enable microbenchmarking from a minified test, as an experimental feature
 
+# Custom JNI registration, so entire class must be kept
+-keepclasseswithmembers class androidx.benchmark.BlackHole { *; }
+
 # basic protection against junit/androidx.test reflection, shouldn't affect library/test code
 -keepclasseswithmembers class androidx.test.** { *; }
 -keepclasseswithmembers class org.junit.** { *; }