diff options
| author | 2022-04-11 10:04:05 +0000 | |
|---|---|---|
| committer | 2022-04-11 10:04:05 +0000 | |
| commit | bfb23e71079d90e50f18e786dc766a3c2d2f28cc (patch) | |
| tree | bf07bd62ee65a1804545b039b9c421b1954aace7 | |
| parent | 7d7fa82fe4adb6524763d2866087787af82ed6cc (diff) | |
| parent | e25e36ace0dbaa8faab2071bddf4677eff33a15a (diff) | |
Merge "Correct AdditionPerfTest to return void." am: 4e7f5518f1 am: c7c95e1859 am: e25e36ace0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2059947
Change-Id: I25d820c331eaa65ff3beccf29ff43c3d1aad821e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | apct-tests/perftests/core/src/android/libcore/AdditionPerfTest.java | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/apct-tests/perftests/core/src/android/libcore/AdditionPerfTest.java b/apct-tests/perftests/core/src/android/libcore/AdditionPerfTest.java index ea3d172b2e5f..aa47e0a29695 100644 --- a/apct-tests/perftests/core/src/android/libcore/AdditionPerfTest.java +++ b/apct-tests/perftests/core/src/android/libcore/AdditionPerfTest.java @@ -37,79 +37,71 @@ public class AdditionPerfTest { public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter(); @Test - public int timeAddConstantToLocalInt() { + public void timeAddConstantToLocalInt() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); int result = 0; while (state.keepRunning()) { result += 123; } - return result; } @Test - public int timeAddTwoLocalInts() { + public void timeAddTwoLocalInts() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); int result = 0; int constant = 123; while (state.keepRunning()) { result += constant; } - return result; } @Test - public long timeAddConstantToLocalLong() { + public void timeAddConstantToLocalLong() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); long result = 0; while (state.keepRunning()) { result += 123L; } - return result; } @Test - public long timeAddTwoLocalLongs() { + public void timeAddTwoLocalLongs() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); long result = 0; long constant = 123L; while (state.keepRunning()) { result += constant; } - return result; } @Test - public float timeAddConstantToLocalFloat() { + public void timeAddConstantToLocalFloat() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); float result = 0.0f; while (state.keepRunning()) { result += 123.0f; } - return result; } @Test - public float timeAddTwoLocalFloats() { + public void timeAddTwoLocalFloats() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); float result = 0.0f; float constant = 123.0f; while (state.keepRunning()) { result += constant; } - return result; } @Test - public double timeAddConstantToLocalDouble() { + public void timeAddConstantToLocalDouble() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); double result = 0.0; while (state.keepRunning()) { result += 123.0; } - return result; } @Test - public double timeAddTwoLocalDoubles() { + public void timeAddTwoLocalDoubles() { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); double result = 0.0; double constant = 123.0; while (state.keepRunning()) { result += constant; } - return result; } } |