summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2016-08-18 20:33:18 +0100
committerTobias Thierer <tobiast@google.com>2016-08-19 17:14:44 +0100
commit57afdfdc64eee6693ad7055f3097f30ecce08d82 (patch)
tree5378c7087d443c1ccbf7d7ab10020ca5ba119c92 /annotations/generate_annotated_java_files.py
parentebf76412c9cead5082547c662259631478f3e0c8 (diff)
Use fallocate to speed up testSkipOnLargeFiles() by 21sec
This test used to write a 3GiByte file which took 21 seconds on a Nexus 6P. Since fallocate is available on current AOSP, we can use it to allocate the same file in much less than 1sec on file systems that support it (currently btrfs, ext4, ocfs2, and xfs); on other file systems, or if fallocate is not available, we fall back to writing the file ourselves. Since run cts -p android.core.tests.libcore.package.libcore runs the test twice (on 32bit and 64bit runtimes), this speeds up the libcore CTS test suite on a Nexus 6P by 42 seconds. The time for each of the two runs decreased to 507sec (from 528sec; was 587sec before http://r.android.com/258101 ) Also tweaked the test to close() the FileInputStream at the end. Test: cts-tradefed run cts -c libcore.java.io.FileInputStreamTest Bug: 30948560 Bug: 28192631 Change-Id: I740d7dec9bcc520b60f66fb8c8f05969610ef794
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions