diff options
author | Tsu Chiang Chuang <tsu@google.com> | 2013-03-26 17:38:46 -0700 |
---|---|---|
committer | Tsu Chiang Chuang <tsu@google.com> | 2013-03-28 14:47:03 -0700 |
commit | 5a7833b406bb2716b057d3ed923f22f1f86b2a20 (patch) | |
tree | 7d0e79a91c627918879d379bc6362d20f79b512f /benchmarks | |
parent | 0b2e0fc3b8b8886cfebd27d279383d8cae61102d (diff) | |
download | libcore-5a7833b406bb2716b057d3ed923f22f1f86b2a20.zip libcore-5a7833b406bb2716b057d3ed923f22f1f86b2a20.tar.gz libcore-5a7833b406bb2716b057d3ed923f22f1f86b2a20.tar.bz2 |
Build Caliper microbenchmark tests.Also fix the URLConnectionBenchmark tests to use the external/mockwebserver.
Change-Id: I48ec32e94f992fe570a6d729bb38971b3f211188
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/Android.mk | 31 | ||||
-rw-r--r-- | benchmarks/libs/caliper.jar | bin | 0 -> 859232 bytes | |||
-rw-r--r-- | benchmarks/libs/caliper.jar.txt | 202 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/AdditionBenchmark.java (renamed from benchmarks/AdditionBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/ArrayCopyBenchmark.java (renamed from benchmarks/ArrayCopyBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/ArrayIterationBenchmark.java (renamed from benchmarks/ArrayIterationBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/ArrayListIterationBenchmark.java (renamed from benchmarks/ArrayListIterationBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/BufferedZipFileBenchmark.java (renamed from benchmarks/BufferedZipFileBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/FieldAccessBenchmark.java (renamed from benchmarks/FieldAccessBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/Foo.java (renamed from benchmarks/Foo.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/HashedCollectionsBenchmark.java (renamed from benchmarks/HashedCollectionsBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/MethodInvocationBenchmark.java (renamed from benchmarks/MethodInvocationBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/MultiplicationBenchmark.java (renamed from benchmarks/MultiplicationBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/StringIterationBenchmark.java (renamed from benchmarks/StringIterationBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/VirtualVersusInterfaceBenchmark.java (renamed from benchmarks/VirtualVersusInterfaceBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/XmlParseBenchmark.java (renamed from benchmarks/XmlParseBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/AnnotatedElementBenchmark.java (renamed from benchmarks/regression/AnnotatedElementBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/BigIntegerBenchmark.java (renamed from benchmarks/regression/BigIntegerBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/BitSetBenchmark.java (renamed from benchmarks/regression/BitSetBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ByteBufferBenchmark.java (renamed from benchmarks/regression/ByteBufferBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ByteBufferScalarVersusVectorBenchmark.java (renamed from benchmarks/regression/ByteBufferScalarVersusVectorBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/CharacterBenchmark.java (renamed from benchmarks/regression/CharacterBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/CharsetBenchmark.java (renamed from benchmarks/regression/CharsetBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/CharsetForNameBenchmark.java (renamed from benchmarks/regression/CharsetForNameBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ChecksumBenchmark.java (renamed from benchmarks/regression/ChecksumBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/CipherBenchmark.java (renamed from benchmarks/regression/CipherBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/DateToStringBenchmark.java (renamed from benchmarks/regression/DateToStringBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/DefaultCharsetBenchmark.java (renamed from benchmarks/regression/DefaultCharsetBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/DigestBenchmark.java (renamed from benchmarks/regression/DigestBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/DnsBenchmark.java (renamed from benchmarks/regression/DnsBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/DoPrivilegedBenchmark.java (renamed from benchmarks/regression/DoPrivilegedBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/DoubleBenchmark.java (renamed from benchmarks/regression/DoubleBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/EqualsHashCodeBenchmark.java (renamed from benchmarks/regression/EqualsHashCodeBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ExpensiveObjectsBenchmark.java (renamed from benchmarks/regression/ExpensiveObjectsBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/FloatBenchmark.java (renamed from benchmarks/regression/FloatBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/FormatterBenchmark.java (renamed from benchmarks/regression/FormatterBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/HostnameVerifierBenchmark.java (renamed from benchmarks/regression/HostnameVerifierBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/IntConstantDivisionBenchmark.java (renamed from benchmarks/regression/IntConstantDivisionBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/IntConstantMultiplicationBenchmark.java (renamed from benchmarks/regression/IntConstantMultiplicationBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/IntConstantRemainderBenchmark.java (renamed from benchmarks/regression/IntConstantRemainderBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/IntegerBenchmark.java (renamed from benchmarks/regression/IntegerBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/IntegralToStringBenchmark.java (renamed from benchmarks/regression/IntegralToStringBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/JarFileBenchmark.java (renamed from benchmarks/regression/JarFileBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/KeyPairGeneratorBenchmark.java (renamed from benchmarks/regression/KeyPairGeneratorBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/LoopingBackwardsBenchmark.java (renamed from benchmarks/regression/LoopingBackwardsBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/MathBenchmark.java (renamed from benchmarks/regression/MathBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/MessageDigestBenchmark.java (renamed from benchmarks/regression/MessageDigestBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/MutableIntBenchmark.java (renamed from benchmarks/regression/MutableIntBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/NativeMethodBenchmark.java (renamed from benchmarks/regression/NativeMethodBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ParseBenchmark.java (renamed from benchmarks/regression/ParseBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ParseBenchmarkData.zip (renamed from benchmarks/regression/ParseBenchmarkData.zip) | bin | 135922 -> 135922 bytes | |||
-rw-r--r-- | benchmarks/src/benchmarks/regression/PriorityQueueBenchmark.java (renamed from benchmarks/regression/PriorityQueueBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/PropertyAccessBenchmark.java (renamed from benchmarks/regression/PropertyAccessBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/RandomBenchmark.java (renamed from benchmarks/regression/RandomBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/RealToStringBenchmark.java (renamed from benchmarks/regression/RealToStringBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ReflectionBenchmark.java (renamed from benchmarks/regression/ReflectionBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java (renamed from benchmarks/regression/SSLSocketBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/SchemePrefixBenchmark.java (renamed from benchmarks/regression/SchemePrefixBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/SerializationBenchmark.java (renamed from benchmarks/regression/SerializationBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/SignatureBenchmark.java (renamed from benchmarks/regression/SignatureBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StrictMathBenchmark.java (renamed from benchmarks/regression/StrictMathBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StringBenchmark.java (renamed from benchmarks/regression/StringBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StringBuilderBenchmark.java (renamed from benchmarks/regression/StringBuilderBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StringCaseMappingBenchmark.java (renamed from benchmarks/regression/StringCaseMappingBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StringIsEmptyBenchmark.java (renamed from benchmarks/regression/StringIsEmptyBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StringLengthBenchmark.java (renamed from benchmarks/regression/StringLengthBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StringSplitBenchmark.java (renamed from benchmarks/regression/StringSplitBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/StringToRealBenchmark.java (renamed from benchmarks/regression/StringToRealBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/SystemPropertiesBenchmark.java (renamed from benchmarks/regression/SystemPropertiesBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/ThreadLocalBenchmark.java (renamed from benchmarks/regression/ThreadLocalBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/TimeZoneBenchmark.java (renamed from benchmarks/regression/TimeZoneBenchmark.java) | 0 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/URLConnectionBenchmark.java (renamed from benchmarks/regression/URLConnectionBenchmark.java) | 15 | ||||
-rw-r--r-- | benchmarks/src/benchmarks/regression/XmlEntitiesBenchmark.java (renamed from benchmarks/regression/XmlEntitiesBenchmark.java) | 0 |
73 files changed, 241 insertions, 7 deletions
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk new file mode 100644 index 0000000..ea4e91b --- /dev/null +++ b/benchmarks/Android.mk @@ -0,0 +1,31 @@ +LOCAL_PATH:= $(call my-dir) +################################################## +include $(CLEAR_VARS) + +# Only compile source java files in this apk. +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_MODULE := benchmarks + +LOCAL_STATIC_JAVA_LIBRARIES := \ + caliper-prebuilt \ + core-tests + +LOCAL_JAVA_LIBRARIES := \ + bouncycastle \ + core + +LOCAL_MODULE_TAGS := tests + +LOCAL_MODULE_PATH := $(PRODUCT_OUT)/data/caliperperf + +include $(BUILD_JAVA_LIBRARY) + +################################################## +# Prebuilt Java libraries +include $(CLEAR_VARS) + +LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ + caliper-prebuilt:libs/caliper.jar + +include $(BUILD_MULTI_PREBUILT) diff --git a/benchmarks/libs/caliper.jar b/benchmarks/libs/caliper.jar Binary files differnew file mode 100644 index 0000000..715e698 --- /dev/null +++ b/benchmarks/libs/caliper.jar diff --git a/benchmarks/libs/caliper.jar.txt b/benchmarks/libs/caliper.jar.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/benchmarks/libs/caliper.jar.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/benchmarks/AdditionBenchmark.java b/benchmarks/src/benchmarks/AdditionBenchmark.java index a18856e..a18856e 100644 --- a/benchmarks/AdditionBenchmark.java +++ b/benchmarks/src/benchmarks/AdditionBenchmark.java diff --git a/benchmarks/ArrayCopyBenchmark.java b/benchmarks/src/benchmarks/ArrayCopyBenchmark.java index 75ad243..75ad243 100644 --- a/benchmarks/ArrayCopyBenchmark.java +++ b/benchmarks/src/benchmarks/ArrayCopyBenchmark.java diff --git a/benchmarks/ArrayIterationBenchmark.java b/benchmarks/src/benchmarks/ArrayIterationBenchmark.java index bdc255b..bdc255b 100644 --- a/benchmarks/ArrayIterationBenchmark.java +++ b/benchmarks/src/benchmarks/ArrayIterationBenchmark.java diff --git a/benchmarks/ArrayListIterationBenchmark.java b/benchmarks/src/benchmarks/ArrayListIterationBenchmark.java index 4e5f145..4e5f145 100644 --- a/benchmarks/ArrayListIterationBenchmark.java +++ b/benchmarks/src/benchmarks/ArrayListIterationBenchmark.java diff --git a/benchmarks/BufferedZipFileBenchmark.java b/benchmarks/src/benchmarks/BufferedZipFileBenchmark.java index f4d3822..f4d3822 100644 --- a/benchmarks/BufferedZipFileBenchmark.java +++ b/benchmarks/src/benchmarks/BufferedZipFileBenchmark.java diff --git a/benchmarks/FieldAccessBenchmark.java b/benchmarks/src/benchmarks/FieldAccessBenchmark.java index 19cb060..19cb060 100644 --- a/benchmarks/FieldAccessBenchmark.java +++ b/benchmarks/src/benchmarks/FieldAccessBenchmark.java diff --git a/benchmarks/Foo.java b/benchmarks/src/benchmarks/Foo.java index d288dd6..d288dd6 100644 --- a/benchmarks/Foo.java +++ b/benchmarks/src/benchmarks/Foo.java diff --git a/benchmarks/HashedCollectionsBenchmark.java b/benchmarks/src/benchmarks/HashedCollectionsBenchmark.java index a826271..a826271 100644 --- a/benchmarks/HashedCollectionsBenchmark.java +++ b/benchmarks/src/benchmarks/HashedCollectionsBenchmark.java diff --git a/benchmarks/MethodInvocationBenchmark.java b/benchmarks/src/benchmarks/MethodInvocationBenchmark.java index 7a5e1b6..7a5e1b6 100644 --- a/benchmarks/MethodInvocationBenchmark.java +++ b/benchmarks/src/benchmarks/MethodInvocationBenchmark.java diff --git a/benchmarks/MultiplicationBenchmark.java b/benchmarks/src/benchmarks/MultiplicationBenchmark.java index b2f945b..b2f945b 100644 --- a/benchmarks/MultiplicationBenchmark.java +++ b/benchmarks/src/benchmarks/MultiplicationBenchmark.java diff --git a/benchmarks/StringIterationBenchmark.java b/benchmarks/src/benchmarks/StringIterationBenchmark.java index 22c6ae2..22c6ae2 100644 --- a/benchmarks/StringIterationBenchmark.java +++ b/benchmarks/src/benchmarks/StringIterationBenchmark.java diff --git a/benchmarks/VirtualVersusInterfaceBenchmark.java b/benchmarks/src/benchmarks/VirtualVersusInterfaceBenchmark.java index f029c81..f029c81 100644 --- a/benchmarks/VirtualVersusInterfaceBenchmark.java +++ b/benchmarks/src/benchmarks/VirtualVersusInterfaceBenchmark.java diff --git a/benchmarks/XmlParseBenchmark.java b/benchmarks/src/benchmarks/XmlParseBenchmark.java index b5e7b93..b5e7b93 100644 --- a/benchmarks/XmlParseBenchmark.java +++ b/benchmarks/src/benchmarks/XmlParseBenchmark.java diff --git a/benchmarks/regression/AnnotatedElementBenchmark.java b/benchmarks/src/benchmarks/regression/AnnotatedElementBenchmark.java index 6c33968..6c33968 100644 --- a/benchmarks/regression/AnnotatedElementBenchmark.java +++ b/benchmarks/src/benchmarks/regression/AnnotatedElementBenchmark.java diff --git a/benchmarks/regression/BigIntegerBenchmark.java b/benchmarks/src/benchmarks/regression/BigIntegerBenchmark.java index 841b901..841b901 100644 --- a/benchmarks/regression/BigIntegerBenchmark.java +++ b/benchmarks/src/benchmarks/regression/BigIntegerBenchmark.java diff --git a/benchmarks/regression/BitSetBenchmark.java b/benchmarks/src/benchmarks/regression/BitSetBenchmark.java index ee91993..ee91993 100644 --- a/benchmarks/regression/BitSetBenchmark.java +++ b/benchmarks/src/benchmarks/regression/BitSetBenchmark.java diff --git a/benchmarks/regression/ByteBufferBenchmark.java b/benchmarks/src/benchmarks/regression/ByteBufferBenchmark.java index 7812013..7812013 100644 --- a/benchmarks/regression/ByteBufferBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ByteBufferBenchmark.java diff --git a/benchmarks/regression/ByteBufferScalarVersusVectorBenchmark.java b/benchmarks/src/benchmarks/regression/ByteBufferScalarVersusVectorBenchmark.java index 7c75deb..7c75deb 100644 --- a/benchmarks/regression/ByteBufferScalarVersusVectorBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ByteBufferScalarVersusVectorBenchmark.java diff --git a/benchmarks/regression/CharacterBenchmark.java b/benchmarks/src/benchmarks/regression/CharacterBenchmark.java index 953513b..953513b 100644 --- a/benchmarks/regression/CharacterBenchmark.java +++ b/benchmarks/src/benchmarks/regression/CharacterBenchmark.java diff --git a/benchmarks/regression/CharsetBenchmark.java b/benchmarks/src/benchmarks/regression/CharsetBenchmark.java index 6ecada7..6ecada7 100644 --- a/benchmarks/regression/CharsetBenchmark.java +++ b/benchmarks/src/benchmarks/regression/CharsetBenchmark.java diff --git a/benchmarks/regression/CharsetForNameBenchmark.java b/benchmarks/src/benchmarks/regression/CharsetForNameBenchmark.java index 87dfb8b..87dfb8b 100644 --- a/benchmarks/regression/CharsetForNameBenchmark.java +++ b/benchmarks/src/benchmarks/regression/CharsetForNameBenchmark.java diff --git a/benchmarks/regression/ChecksumBenchmark.java b/benchmarks/src/benchmarks/regression/ChecksumBenchmark.java index 0e7bf8d..0e7bf8d 100644 --- a/benchmarks/regression/ChecksumBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ChecksumBenchmark.java diff --git a/benchmarks/regression/CipherBenchmark.java b/benchmarks/src/benchmarks/regression/CipherBenchmark.java index 56d549b..56d549b 100644 --- a/benchmarks/regression/CipherBenchmark.java +++ b/benchmarks/src/benchmarks/regression/CipherBenchmark.java diff --git a/benchmarks/regression/DateToStringBenchmark.java b/benchmarks/src/benchmarks/regression/DateToStringBenchmark.java index 7fee61c..7fee61c 100644 --- a/benchmarks/regression/DateToStringBenchmark.java +++ b/benchmarks/src/benchmarks/regression/DateToStringBenchmark.java diff --git a/benchmarks/regression/DefaultCharsetBenchmark.java b/benchmarks/src/benchmarks/regression/DefaultCharsetBenchmark.java index bc7b013..bc7b013 100644 --- a/benchmarks/regression/DefaultCharsetBenchmark.java +++ b/benchmarks/src/benchmarks/regression/DefaultCharsetBenchmark.java diff --git a/benchmarks/regression/DigestBenchmark.java b/benchmarks/src/benchmarks/regression/DigestBenchmark.java index 7d00fec..7d00fec 100644 --- a/benchmarks/regression/DigestBenchmark.java +++ b/benchmarks/src/benchmarks/regression/DigestBenchmark.java diff --git a/benchmarks/regression/DnsBenchmark.java b/benchmarks/src/benchmarks/regression/DnsBenchmark.java index 2a71716..2a71716 100644 --- a/benchmarks/regression/DnsBenchmark.java +++ b/benchmarks/src/benchmarks/regression/DnsBenchmark.java diff --git a/benchmarks/regression/DoPrivilegedBenchmark.java b/benchmarks/src/benchmarks/regression/DoPrivilegedBenchmark.java index effb284..effb284 100644 --- a/benchmarks/regression/DoPrivilegedBenchmark.java +++ b/benchmarks/src/benchmarks/regression/DoPrivilegedBenchmark.java diff --git a/benchmarks/regression/DoubleBenchmark.java b/benchmarks/src/benchmarks/regression/DoubleBenchmark.java index aa692ac..aa692ac 100644 --- a/benchmarks/regression/DoubleBenchmark.java +++ b/benchmarks/src/benchmarks/regression/DoubleBenchmark.java diff --git a/benchmarks/regression/EqualsHashCodeBenchmark.java b/benchmarks/src/benchmarks/regression/EqualsHashCodeBenchmark.java index a15a41a..a15a41a 100644 --- a/benchmarks/regression/EqualsHashCodeBenchmark.java +++ b/benchmarks/src/benchmarks/regression/EqualsHashCodeBenchmark.java diff --git a/benchmarks/regression/ExpensiveObjectsBenchmark.java b/benchmarks/src/benchmarks/regression/ExpensiveObjectsBenchmark.java index 535e298..535e298 100644 --- a/benchmarks/regression/ExpensiveObjectsBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ExpensiveObjectsBenchmark.java diff --git a/benchmarks/regression/FloatBenchmark.java b/benchmarks/src/benchmarks/regression/FloatBenchmark.java index a92bb69..a92bb69 100644 --- a/benchmarks/regression/FloatBenchmark.java +++ b/benchmarks/src/benchmarks/regression/FloatBenchmark.java diff --git a/benchmarks/regression/FormatterBenchmark.java b/benchmarks/src/benchmarks/regression/FormatterBenchmark.java index 0d4cf26..0d4cf26 100644 --- a/benchmarks/regression/FormatterBenchmark.java +++ b/benchmarks/src/benchmarks/regression/FormatterBenchmark.java diff --git a/benchmarks/regression/HostnameVerifierBenchmark.java b/benchmarks/src/benchmarks/regression/HostnameVerifierBenchmark.java index e9218c4..e9218c4 100644 --- a/benchmarks/regression/HostnameVerifierBenchmark.java +++ b/benchmarks/src/benchmarks/regression/HostnameVerifierBenchmark.java diff --git a/benchmarks/regression/IntConstantDivisionBenchmark.java b/benchmarks/src/benchmarks/regression/IntConstantDivisionBenchmark.java index 498b783..498b783 100644 --- a/benchmarks/regression/IntConstantDivisionBenchmark.java +++ b/benchmarks/src/benchmarks/regression/IntConstantDivisionBenchmark.java diff --git a/benchmarks/regression/IntConstantMultiplicationBenchmark.java b/benchmarks/src/benchmarks/regression/IntConstantMultiplicationBenchmark.java index ca1349c..ca1349c 100644 --- a/benchmarks/regression/IntConstantMultiplicationBenchmark.java +++ b/benchmarks/src/benchmarks/regression/IntConstantMultiplicationBenchmark.java diff --git a/benchmarks/regression/IntConstantRemainderBenchmark.java b/benchmarks/src/benchmarks/regression/IntConstantRemainderBenchmark.java index 6174721..6174721 100644 --- a/benchmarks/regression/IntConstantRemainderBenchmark.java +++ b/benchmarks/src/benchmarks/regression/IntConstantRemainderBenchmark.java diff --git a/benchmarks/regression/IntegerBenchmark.java b/benchmarks/src/benchmarks/regression/IntegerBenchmark.java index 601bb5d..601bb5d 100644 --- a/benchmarks/regression/IntegerBenchmark.java +++ b/benchmarks/src/benchmarks/regression/IntegerBenchmark.java diff --git a/benchmarks/regression/IntegralToStringBenchmark.java b/benchmarks/src/benchmarks/regression/IntegralToStringBenchmark.java index cab9e98..cab9e98 100644 --- a/benchmarks/regression/IntegralToStringBenchmark.java +++ b/benchmarks/src/benchmarks/regression/IntegralToStringBenchmark.java diff --git a/benchmarks/regression/JarFileBenchmark.java b/benchmarks/src/benchmarks/regression/JarFileBenchmark.java index 626ca21..626ca21 100644 --- a/benchmarks/regression/JarFileBenchmark.java +++ b/benchmarks/src/benchmarks/regression/JarFileBenchmark.java diff --git a/benchmarks/regression/KeyPairGeneratorBenchmark.java b/benchmarks/src/benchmarks/regression/KeyPairGeneratorBenchmark.java index 762c935..762c935 100644 --- a/benchmarks/regression/KeyPairGeneratorBenchmark.java +++ b/benchmarks/src/benchmarks/regression/KeyPairGeneratorBenchmark.java diff --git a/benchmarks/regression/LoopingBackwardsBenchmark.java b/benchmarks/src/benchmarks/regression/LoopingBackwardsBenchmark.java index 054eff9..054eff9 100644 --- a/benchmarks/regression/LoopingBackwardsBenchmark.java +++ b/benchmarks/src/benchmarks/regression/LoopingBackwardsBenchmark.java diff --git a/benchmarks/regression/MathBenchmark.java b/benchmarks/src/benchmarks/regression/MathBenchmark.java index 25a871d..25a871d 100644 --- a/benchmarks/regression/MathBenchmark.java +++ b/benchmarks/src/benchmarks/regression/MathBenchmark.java diff --git a/benchmarks/regression/MessageDigestBenchmark.java b/benchmarks/src/benchmarks/regression/MessageDigestBenchmark.java index c9d8074..c9d8074 100644 --- a/benchmarks/regression/MessageDigestBenchmark.java +++ b/benchmarks/src/benchmarks/regression/MessageDigestBenchmark.java diff --git a/benchmarks/regression/MutableIntBenchmark.java b/benchmarks/src/benchmarks/regression/MutableIntBenchmark.java index ee4f2d9..ee4f2d9 100644 --- a/benchmarks/regression/MutableIntBenchmark.java +++ b/benchmarks/src/benchmarks/regression/MutableIntBenchmark.java diff --git a/benchmarks/regression/NativeMethodBenchmark.java b/benchmarks/src/benchmarks/regression/NativeMethodBenchmark.java index 2e482ef..2e482ef 100644 --- a/benchmarks/regression/NativeMethodBenchmark.java +++ b/benchmarks/src/benchmarks/regression/NativeMethodBenchmark.java diff --git a/benchmarks/regression/ParseBenchmark.java b/benchmarks/src/benchmarks/regression/ParseBenchmark.java index b44b429..b44b429 100644 --- a/benchmarks/regression/ParseBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ParseBenchmark.java diff --git a/benchmarks/regression/ParseBenchmarkData.zip b/benchmarks/src/benchmarks/regression/ParseBenchmarkData.zip Binary files differindex 7838e8a..7838e8a 100644 --- a/benchmarks/regression/ParseBenchmarkData.zip +++ b/benchmarks/src/benchmarks/regression/ParseBenchmarkData.zip diff --git a/benchmarks/regression/PriorityQueueBenchmark.java b/benchmarks/src/benchmarks/regression/PriorityQueueBenchmark.java index 2fe661b..2fe661b 100644 --- a/benchmarks/regression/PriorityQueueBenchmark.java +++ b/benchmarks/src/benchmarks/regression/PriorityQueueBenchmark.java diff --git a/benchmarks/regression/PropertyAccessBenchmark.java b/benchmarks/src/benchmarks/regression/PropertyAccessBenchmark.java index cabd6ed..cabd6ed 100644 --- a/benchmarks/regression/PropertyAccessBenchmark.java +++ b/benchmarks/src/benchmarks/regression/PropertyAccessBenchmark.java diff --git a/benchmarks/regression/RandomBenchmark.java b/benchmarks/src/benchmarks/regression/RandomBenchmark.java index 0792805..0792805 100644 --- a/benchmarks/regression/RandomBenchmark.java +++ b/benchmarks/src/benchmarks/regression/RandomBenchmark.java diff --git a/benchmarks/regression/RealToStringBenchmark.java b/benchmarks/src/benchmarks/regression/RealToStringBenchmark.java index 8914cf6..8914cf6 100644 --- a/benchmarks/regression/RealToStringBenchmark.java +++ b/benchmarks/src/benchmarks/regression/RealToStringBenchmark.java diff --git a/benchmarks/regression/ReflectionBenchmark.java b/benchmarks/src/benchmarks/regression/ReflectionBenchmark.java index fe00fa2..fe00fa2 100644 --- a/benchmarks/regression/ReflectionBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ReflectionBenchmark.java diff --git a/benchmarks/regression/SSLSocketBenchmark.java b/benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java index fd72a79..fd72a79 100644 --- a/benchmarks/regression/SSLSocketBenchmark.java +++ b/benchmarks/src/benchmarks/regression/SSLSocketBenchmark.java diff --git a/benchmarks/regression/SchemePrefixBenchmark.java b/benchmarks/src/benchmarks/regression/SchemePrefixBenchmark.java index d90fe29..d90fe29 100644 --- a/benchmarks/regression/SchemePrefixBenchmark.java +++ b/benchmarks/src/benchmarks/regression/SchemePrefixBenchmark.java diff --git a/benchmarks/regression/SerializationBenchmark.java b/benchmarks/src/benchmarks/regression/SerializationBenchmark.java index bc958eb..bc958eb 100644 --- a/benchmarks/regression/SerializationBenchmark.java +++ b/benchmarks/src/benchmarks/regression/SerializationBenchmark.java diff --git a/benchmarks/regression/SignatureBenchmark.java b/benchmarks/src/benchmarks/regression/SignatureBenchmark.java index 383dcfd..383dcfd 100644 --- a/benchmarks/regression/SignatureBenchmark.java +++ b/benchmarks/src/benchmarks/regression/SignatureBenchmark.java diff --git a/benchmarks/regression/StrictMathBenchmark.java b/benchmarks/src/benchmarks/regression/StrictMathBenchmark.java index 44c030a..44c030a 100644 --- a/benchmarks/regression/StrictMathBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StrictMathBenchmark.java diff --git a/benchmarks/regression/StringBenchmark.java b/benchmarks/src/benchmarks/regression/StringBenchmark.java index e09ee8b..e09ee8b 100644 --- a/benchmarks/regression/StringBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StringBenchmark.java diff --git a/benchmarks/regression/StringBuilderBenchmark.java b/benchmarks/src/benchmarks/regression/StringBuilderBenchmark.java index 79eff2a..79eff2a 100644 --- a/benchmarks/regression/StringBuilderBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StringBuilderBenchmark.java diff --git a/benchmarks/regression/StringCaseMappingBenchmark.java b/benchmarks/src/benchmarks/regression/StringCaseMappingBenchmark.java index ba5b59e..ba5b59e 100644 --- a/benchmarks/regression/StringCaseMappingBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StringCaseMappingBenchmark.java diff --git a/benchmarks/regression/StringIsEmptyBenchmark.java b/benchmarks/src/benchmarks/regression/StringIsEmptyBenchmark.java index a3be80a..a3be80a 100644 --- a/benchmarks/regression/StringIsEmptyBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StringIsEmptyBenchmark.java diff --git a/benchmarks/regression/StringLengthBenchmark.java b/benchmarks/src/benchmarks/regression/StringLengthBenchmark.java index 962e395..962e395 100644 --- a/benchmarks/regression/StringLengthBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StringLengthBenchmark.java diff --git a/benchmarks/regression/StringSplitBenchmark.java b/benchmarks/src/benchmarks/regression/StringSplitBenchmark.java index 37fdf8f..37fdf8f 100644 --- a/benchmarks/regression/StringSplitBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StringSplitBenchmark.java diff --git a/benchmarks/regression/StringToRealBenchmark.java b/benchmarks/src/benchmarks/regression/StringToRealBenchmark.java index ef7a633..ef7a633 100644 --- a/benchmarks/regression/StringToRealBenchmark.java +++ b/benchmarks/src/benchmarks/regression/StringToRealBenchmark.java diff --git a/benchmarks/regression/SystemPropertiesBenchmark.java b/benchmarks/src/benchmarks/regression/SystemPropertiesBenchmark.java index 9c675e1..9c675e1 100644 --- a/benchmarks/regression/SystemPropertiesBenchmark.java +++ b/benchmarks/src/benchmarks/regression/SystemPropertiesBenchmark.java diff --git a/benchmarks/regression/ThreadLocalBenchmark.java b/benchmarks/src/benchmarks/regression/ThreadLocalBenchmark.java index df0715b..df0715b 100644 --- a/benchmarks/regression/ThreadLocalBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ThreadLocalBenchmark.java diff --git a/benchmarks/regression/TimeZoneBenchmark.java b/benchmarks/src/benchmarks/regression/TimeZoneBenchmark.java index ccef392..ccef392 100644 --- a/benchmarks/regression/TimeZoneBenchmark.java +++ b/benchmarks/src/benchmarks/regression/TimeZoneBenchmark.java diff --git a/benchmarks/regression/URLConnectionBenchmark.java b/benchmarks/src/benchmarks/regression/URLConnectionBenchmark.java index e5ceec4..36c5666 100644 --- a/benchmarks/regression/URLConnectionBenchmark.java +++ b/benchmarks/src/benchmarks/regression/URLConnectionBenchmark.java @@ -18,12 +18,13 @@ package benchmarks.regression; import com.google.caliper.Param; import com.google.caliper.SimpleBenchmark; +import com.google.mockwebserver.MockResponse; +import com.google.mockwebserver.MockWebServer; import java.io.IOException; import java.io.InputStream; +import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; -import tests.http.MockResponse; -import tests.http.MockWebServer; public final class URLConnectionBenchmark extends SimpleBenchmark { @@ -46,7 +47,8 @@ public final class URLConnectionBenchmark extends SimpleBenchmark { transferEncoding.setBody(response, bodySize, chunkSize); server.enqueue(response); - server.setContinuousServing(true); + // keep serving the same response for all iterations + server.setSingleResponse(true); server.play(); url = server.getUrl("/"); @@ -60,9 +62,7 @@ public final class URLConnectionBenchmark extends SimpleBenchmark { * threads. Instead, read the last continuously-served request, and then * cause the server to close the otherwise-reusable HTTP connection. */ - server.setContinuousServing(false); - server.enqueue(new MockResponse().setDisconnectAtEnd(true)); - get(); + server.setSingleResponse(false); get(); server.shutdown(); } @@ -77,7 +77,8 @@ public final class URLConnectionBenchmark extends SimpleBenchmark { private int get() throws IOException { int totalBytesRead = 0; - URLConnection connection = url.openConnection(); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + // URLConnection connection = url.openConnection(); InputStream in = connection.getInputStream(); int count; while ((count = in.read(readBuffer)) != -1) { diff --git a/benchmarks/regression/XmlEntitiesBenchmark.java b/benchmarks/src/benchmarks/regression/XmlEntitiesBenchmark.java index 4c5cc18..4c5cc18 100644 --- a/benchmarks/regression/XmlEntitiesBenchmark.java +++ b/benchmarks/src/benchmarks/regression/XmlEntitiesBenchmark.java |