summaryrefslogtreecommitdiff
path: root/core/tests/benchmarks
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2018-02-01 16:01:52 -0700
committerJeff Sharkey <jsharkey@android.com>2018-02-01 16:01:55 -0700
commit45c97df89d6c9d8b5252ba9fc27c41e75c81254d (patch)
tree437680ffe40d8ae996f34bcca1077bdbe15fcaf8 /core/tests/benchmarks
parent274ad5502115a9bd7ce15c5abff1867598c14ff7 (diff)
Move more folks to FileUtils.copy().
Also extend API to accept a "count" argument of exactly how many bytes to copy, and return the actual number of copied bytes. Improve docs. Test: bit FrameworksCoreTests:android.os.FileUtilsTest Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java Bug: 71932978 Change-Id: I8d255e4f97462838c02a8ecb6d2d221188c4eff0
Diffstat (limited to 'core/tests/benchmarks')
-rw-r--r--core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java b/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
index 4f7c924b1914..5989da7af655 100644
--- a/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
+++ b/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
@@ -54,7 +54,7 @@ public class FileUtilsBenchmark {
for (int i = 0; i < reps; i++) {
try (FileInputStream in = new FileInputStream(mSrc);
FileOutputStream out = new FileOutputStream(mDest)) {
- copyInternalUserspace(in.getFD(), out.getFD(), null, null);
+ copyInternalUserspace(in.getFD(), out.getFD(), null, null, Long.MAX_VALUE);
}
}
}
@@ -63,7 +63,7 @@ public class FileUtilsBenchmark {
for (int i = 0; i < reps; i++) {
try (FileInputStream in = new FileInputStream(mSrc);
FileOutputStream out = new FileOutputStream(mDest)) {
- copyInternalSendfile(in.getFD(), out.getFD(), null, null);
+ copyInternalSendfile(in.getFD(), out.getFD(), null, null, Long.MAX_VALUE);
}
}
}
@@ -72,7 +72,7 @@ public class FileUtilsBenchmark {
for (int i = 0; i < reps; i++) {
try (MemoryPipe in = MemoryPipe.createSource(mData);
FileOutputStream out = new FileOutputStream(mDest)) {
- copyInternalUserspace(in.getFD(), out.getFD(), null, null);
+ copyInternalUserspace(in.getFD(), out.getFD(), null, null, Long.MAX_VALUE);
}
}
}
@@ -81,7 +81,7 @@ public class FileUtilsBenchmark {
for (int i = 0; i < reps; i++) {
try (MemoryPipe in = MemoryPipe.createSource(mData);
FileOutputStream out = new FileOutputStream(mDest)) {
- copyInternalSplice(in.getFD(), out.getFD(), null, null);
+ copyInternalSplice(in.getFD(), out.getFD(), null, null, Long.MAX_VALUE);
}
}
}
@@ -90,7 +90,7 @@ public class FileUtilsBenchmark {
for (int i = 0; i < reps; i++) {
try (FileInputStream in = new FileInputStream(mSrc);
MemoryPipe out = MemoryPipe.createSink(mData)) {
- copyInternalUserspace(in.getFD(), out.getFD(), null, null);
+ copyInternalUserspace(in.getFD(), out.getFD(), null, null, Long.MAX_VALUE);
}
}
}
@@ -99,7 +99,7 @@ public class FileUtilsBenchmark {
for (int i = 0; i < reps; i++) {
try (FileInputStream in = new FileInputStream(mSrc);
MemoryPipe out = MemoryPipe.createSink(mData)) {
- copyInternalSplice(in.getFD(), out.getFD(), null, null);
+ copyInternalSplice(in.getFD(), out.getFD(), null, null, Long.MAX_VALUE);
}
}
}