Commit b9ad76c2 authored by Pete Gillin's avatar Pete Gillin
Browse files

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
parent f68cabbe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment