Fix DeepArrayOpsBenchmark.

When the caliper version was last updated, the protected void setUp()
method stopped getting executed, because it no longer inherited from
SimpleBenchmark. That meant that the array and array2 fields never got
initialized, so it was benchmarking Arrays.deepHashCode(null) and
Arrays.deepEquals(null, null).

This change also pads the @Param values with zeros, so that tools
which sort alphabetically do the right thing, switches to using the
@Benchmark annotation instead of relying on the testFoo method naming
convention (to be consistent with using @BeforeExperiment on the setUp
method), and removes two unused variables.

Test: vogar --benchmark libcore/benchmarks/src/benchmarks/DeepArrayOpsBenchmark.java
Bug: 74236526
Change-Id: If3d8037426b7bb6956848e883ffa1dcc9d5eb050
diff --git a/benchmarks/src/benchmarks/DeepArrayOpsBenchmark.java b/benchmarks/src/benchmarks/DeepArrayOpsBenchmark.java
index 1429062..624d823 100644
--- a/benchmarks/src/benchmarks/DeepArrayOpsBenchmark.java
+++ b/benchmarks/src/benchmarks/DeepArrayOpsBenchmark.java
@@ -16,21 +16,20 @@
 
 package benchmarks;
 
+import com.google.caliper.BeforeExperiment;
+import com.google.caliper.Benchmark;
 import com.google.caliper.Param;
 import java.lang.reflect.Array;
 import java.lang.reflect.Constructor;
 import java.util.Arrays;
 
 public class DeepArrayOpsBenchmark {
-    @Param({"1", "4", "16", "256", "2048"}) int arrayLength;
+    @Param({"0001", "0004", "0016", "0256", "2048"}) int arrayLength;
 
     private Object[] array;
     private Object[] array2;
 
-    private Object[] array3;
-    private Object[] array4;
-
-    protected void setUp() throws Exception {
+    @BeforeExperiment public void setUp() throws Exception {
         array = new Object[arrayLength * 13];
         array2 = new Object[arrayLength * 13];
         for (int i = 0; i < arrayLength; i += 13) {
@@ -77,13 +76,13 @@
         }
     }
 
-    public void timeDeepHashCode(int reps) {
+    @Benchmark public void deepHashCode(int reps) {
         for (int i = 0; i < reps; ++i) {
             Arrays.deepHashCode(array);
         }
     }
 
-    public void timeEquals(int reps) {
+    @Benchmark public void deepEquals(int reps) {
         for (int i = 0; i < reps; ++i) {
             Arrays.deepEquals(array, array2);
         }