Showing preview only (1,110K chars total). Download the full file or copy to clipboard to get everything.
Repository: hank-whu/rpc-benchmark
Branch: master
Commit: 1fd6fda3aae7
Files: 288
Total size: 1008.5 KB
Directory structure:
gitextract_s2n0yisx/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── armeria-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── armeria-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ ├── rpc/
│ │ └── Server.java
│ └── service/
│ └── ArmeriaUserServiceServerImpl.java
├── benchmark-base/
│ ├── .java-version
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ ├── bean/
│ │ ├── Page.java
│ │ └── User.java
│ ├── pool/
│ │ ├── ConcurrentObjectPool.java
│ │ ├── LockObjectPool.java
│ │ ├── UnsafeUtils.java
│ │ ├── ViberObjectPool.java
│ │ └── WaitStrategy.java
│ ├── rpc/
│ │ ├── AbstractClient.java
│ │ ├── protocol/
│ │ │ ├── Request.java
│ │ │ └── Response.java
│ │ ├── route/
│ │ │ └── RouteService.java
│ │ └── util/
│ │ ├── ByteBufferUtils.java
│ │ ├── HttpClientUtils.java
│ │ └── JsonUtils.java
│ └── service/
│ ├── ServiceRegister.java
│ ├── UserService.java
│ ├── UserServiceJsonHttpClientImpl.java
│ └── UserServiceServerImpl.java
├── benchmark.java
├── brpc-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ └── logback.xml
├── brpc-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ └── logback.xml
├── dubbo-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ ├── consumer.xml
│ └── logback.xml
├── dubbo-kryo-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ ├── consumer.xml
│ └── logback.xml
├── dubbo-kryo-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ ├── logback.xml
│ └── provider.xml
├── dubbo-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ ├── logback.xml
│ └── provider.xml
├── grpc-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── grpc/
│ │ ├── GrpcUserServiceClient.java
│ │ └── UserServiceGrpcClientImpl.java
│ ├── proto/
│ │ └── UserService.proto
│ └── resources/
│ └── logback.xml
├── grpc-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── grpc/
│ │ └── server/
│ │ └── UserServiceGrpcServerImpl.java
│ ├── proto/
│ │ └── UserService.proto
│ └── resources/
│ └── logback.xml
├── hprose-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ └── consumer.xml
├── hprose-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ └── provider.xml
├── jupiter-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── rpc/
│ │ │ └── Client.java
│ │ └── service/
│ │ └── JupiterUserService.java
│ └── resources/
│ ├── META-INF/
│ │ └── services/
│ │ └── org.jupiter.rpc.consumer.processor.ConsumerExecutorFactory
│ ├── logback.xml
│ └── spring-consumer.xml
├── jupiter-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── rpc/
│ │ │ └── Server.java
│ │ └── service/
│ │ ├── JupiterUserService.java
│ │ └── JupiterUserServiceServerImpl.java
│ └── resources/
│ ├── META-INF/
│ │ └── services/
│ │ └── org.jupiter.rpc.provider.processor.ProviderExecutorFactory
│ ├── logback.xml
│ └── spring-provider.xml
├── motan-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── bean/
│ │ │ └── MotanUser.java
│ │ ├── rpc/
│ │ │ └── Client.java
│ │ └── service/
│ │ ├── MotanUserService.java
│ │ └── MotanUserServiceServerImpl.java
│ └── resources/
│ └── motan_client.xml
├── motan-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── bean/
│ │ │ └── MotanUser.java
│ │ ├── rpc/
│ │ │ └── Server.java
│ │ └── service/
│ │ ├── MotanUserService.java
│ │ └── MotanUserServiceServerImpl.java
│ └── resources/
│ └── motan_server.xml
├── netty-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── netty/
│ │ ├── client/
│ │ │ ├── NettyClientConnector.java
│ │ │ ├── UserServiceNettyClientImpl.java
│ │ │ ├── codec/
│ │ │ │ ├── ProtocolDecoder.java
│ │ │ │ └── ProtocolEncoder.java
│ │ │ ├── future/
│ │ │ │ └── FutureContainer.java
│ │ │ └── handler/
│ │ │ ├── BenchmarkChannelInitializer.java
│ │ │ └── BenchmarkClientHandler.java
│ │ └── serializer/
│ │ ├── BooleanSerializer.java
│ │ ├── FastestSerializer.java
│ │ ├── IntegerSerializer.java
│ │ ├── LocalDateSerializer.java
│ │ ├── LocalDateTimeSerializer.java
│ │ ├── LocalTimeSerializer.java
│ │ ├── LongSerializer.java
│ │ ├── ObjectSerializer.java
│ │ ├── Register.java
│ │ ├── RequestSerializer.java
│ │ ├── ResponseSerializer.java
│ │ ├── Serializer.java
│ │ ├── StringSerializer.java
│ │ ├── UserPageSerializer.java
│ │ ├── UserSerializer.java
│ │ └── VoidSerializer.java
│ └── resources/
│ └── logback.xml
├── netty-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ ├── Server.java
│ └── netty/
│ ├── serializer/
│ │ ├── BooleanSerializer.java
│ │ ├── FastestSerializer.java
│ │ ├── IntegerSerializer.java
│ │ ├── LocalDateSerializer.java
│ │ ├── LocalDateTimeSerializer.java
│ │ ├── LocalTimeSerializer.java
│ │ ├── LongSerializer.java
│ │ ├── ObjectSerializer.java
│ │ ├── Register.java
│ │ ├── RequestSerializer.java
│ │ ├── ResponseSerializer.java
│ │ ├── Serializer.java
│ │ ├── StringSerializer.java
│ │ ├── UserPageSerializer.java
│ │ ├── UserSerializer.java
│ │ └── VoidSerializer.java
│ └── server/
│ ├── codec/
│ │ ├── ProtocolDecoder.java
│ │ └── ProtocolEncoder.java
│ └── handler/
│ ├── BenchmarkChannelInitializer.java
│ └── BenchmarkServerHandler.java
├── pom.xml
├── rapidoid-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── rapidoid-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ ├── Server.java
│ └── rapidoid/
│ └── server/
│ ├── CreateUserController.java
│ ├── GetUserController.java
│ ├── ListUserController.java
│ └── UserExistController.java
├── rsocket-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── rsocket/
│ │ └── UserServiceRsocketClientImpl.java
│ └── proto/
│ └── UserService.proto
├── rsocket-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── rsocket/
│ │ └── server/
│ │ └── UserServiceRsocketServerImpl.java
│ └── proto/
│ └── UserService.proto
├── servicecomb-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ ├── META-INF/
│ │ └── spring/
│ │ └── benchmark.consumer.bean.xml
│ ├── config/
│ │ └── log4j.demo.properties
│ ├── log4j.properties
│ └── microservice.yaml
├── servicecomb-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── rpc/
│ │ │ └── Server.java
│ │ └── service/
│ │ └── ServiceCombUserServiceServerImpl.java
│ └── resources/
│ ├── META-INF/
│ │ └── spring/
│ │ └── benchmark.provider.bean.xml
│ ├── config/
│ │ └── log4j.demo.properties
│ ├── log4j.properties
│ └── microservice.yaml
├── sofa-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ └── logback.xml
├── sofa-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ └── logback.xml
├── springboot-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── springboot-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── springboot/
│ │ └── server/
│ │ ├── CreateUserController.java
│ │ ├── GetUserController.java
│ │ ├── ListUserController.java
│ │ └── UserExistController.java
│ └── resources/
│ └── application.yml
├── springboot-undertow-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── springboot-undertow-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── springboot/
│ │ └── server/
│ │ ├── CreateUserController.java
│ │ ├── GetUserController.java
│ │ ├── ListUserController.java
│ │ └── UserExistController.java
│ └── resources/
│ └── application.yml
├── springwebflux-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── springwebflux-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── webflux/
│ │ └── server/
│ │ ├── CreateUserController.java
│ │ ├── GetUserController.java
│ │ ├── ListUserController.java
│ │ └── UserExistController.java
│ └── resources/
│ └── application.yml
├── thrift-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── thrift/
│ │ ├── Converter.java
│ │ ├── TServiceClientNoPrint.java
│ │ ├── ThriftUserServiceClient.java
│ │ ├── User.java
│ │ ├── UserPage.java
│ │ ├── UserService.java
│ │ └── UserServiceThriftClientImpl.java
│ ├── resources/
│ │ └── logback.xml
│ └── thrift/
│ └── UserService.thrift
├── thrift-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── thrift/
│ │ ├── Converter.java
│ │ ├── User.java
│ │ ├── UserPage.java
│ │ ├── UserService.java
│ │ └── UserServiceThriftServerImpl.java
│ └── thrift/
│ ├── UserService.thrift
│ └── gen-java/
│ └── benchmark/
│ └── rpc/
│ └── thrift/
│ ├── User.java
│ ├── UserPage.java
│ └── UserService.java
├── turbo-rest-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ ├── rpc/
│ │ └── Client.java
│ └── service/
│ └── TurboUserServiceJsonHttpClientImpl.java
├── turbo-rest-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── service/
│ │ ├── TurboUserService.java
│ │ └── TurboUserServiceServerImpl.java
│ └── resources/
│ └── logback.xml
├── turbo-rpc-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── service/
│ │ └── TurboUserService.java
│ └── resources/
│ ├── logback.xml
│ └── turbo-client.conf
├── turbo-rpc-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── service/
│ │ ├── TurboUserService.java
│ │ └── TurboUserServiceServerImpl.java
│ └── resources/
│ ├── logback.xml
│ └── turbo-server.conf
├── undertow-async-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── undertow-async-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ ├── benchmark/
│ │ │ └── rpc/
│ │ │ ├── Server.java
│ │ │ └── undertow/
│ │ │ └── server/
│ │ │ ├── CreateUserHandler.java
│ │ │ ├── GetUserHandler.java
│ │ │ ├── ListUserHandler.java
│ │ │ └── UserExistHandler.java
│ │ └── io/
│ │ └── undertow/
│ │ └── async/
│ │ ├── handler/
│ │ │ └── AsyncHttpHandler.java
│ │ ├── io/
│ │ │ ├── PooledByteBufferInputStream.java
│ │ │ └── PooledByteBufferOutputStream.java
│ │ └── util/
│ │ └── UnsafeUtils.java
│ └── resources/
│ └── logback.xml
├── undertow-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
└── undertow-server/
├── .gitignore
├── pom.xml
└── src/
└── main/
├── java/
│ └── benchmark/
│ └── rpc/
│ ├── Server.java
│ └── undertow/
│ └── server/
│ ├── CreateUserHandler.java
│ ├── GetUserHandler.java
│ ├── ListUserHandler.java
│ └── UserExistHandler.java
└── resources/
└── logback.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
================================================
FILE: .gitignore
================================================
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar
*.gz
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
*/.classpath
*/.factorypath
*/.project
*/.settings
*/.idea
*/target
*.bak
*.iml
.idea
.settings
.project
*.iml
================================================
FILE: LICENSE
================================================
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.
================================================
FILE: README.md
================================================
# RPC Benchmark
几乎所有的 RPC 框架都宣称自己是“高性能”的, 那么实际结果到底如何呢, 让我们来做一个性能测试吧.
## 测试结果
- Round-5 2019-02-11 https://www.jianshu.com/p/cdd94d0853c3
- Round-4 2018-08-05 https://www.jianshu.com/p/72b98dc67d9d
- Round-3 2018-05-12 https://www.jianshu.com/p/caf51f5cfbaa
- Round-2 2018-03-25 https://www.jianshu.com/p/f0f494cfce94
- Round-1 2018-01-28 https://www.jianshu.com/p/18c95649b1a4
## 测试说明
- 仅限于Java.
- 客户端使用JMH进行压测, 32 线程, 3 轮预热 3 轮测试 每轮 10s
- 每次运行前都会执行 ***killall java***, 但没有在每轮测试时重启操作系统
- 所有类库版本在发布时都是最新的, 除非存在bug
- 所有框架都尽量参考该项目自带的Benchmark实现
- 将会一直持续, 不定期发布测试结果
- 更多说明请移步: [怎样对 RPC 进行有效的性能测试](https://www.jianshu.com/p/cbcdf05eaa5c)
## 测试用例
1. boolean existUser(String email), 判断某个 email 是否存在
2. boolean createUser(User user), 添加一个 User
3. User getUser(long id), 根据 id 获取一个用户
4. Page<User> listUser(int pageNo), 获取用户列表
## 运行说明
1. 需要两台机器,一台作为客户端,一台作为服务端
2. 系统要求为 linux x64, 至少 4GB ram
3. 客户端需要安装 jdk 11, maven 3
4. 服务端需要安装 jdk 11
5. 客户端服务端均需要设置 hosts
> 10.0.0.88 benchmark-client<br>
> 10.0.0.99 benchmark-server
6. 服务端需要添加用户 benchmark, 需要配置成客户端免密登录, 也就是客户端可以通过如下方式访问服务端
> ssh benchmark@benchmark-server "ls -lh"
7. 客户端执行如下命令, 结果输出到 benchmark/benchmark-result
> git clone https://github.com/hank-whu/rpc-benchmark.git<br>
> cd rpc-benchmark<br>
> java benchmark.java
## 开发者必读
1. cd benchmark-base && mvn install
2. 配置好 hosts: benchmark-client benchmark-server
3. 修改或者实现 xxx-server xxx-client
4. 启动 Server, 然后启动 Client, 确保能不出错跑完所有测试项目
5. 提交 Pull Request
## 免责声明
- 能力所限错误在所难免, 本测试用例及测试结果仅供参考.
- 如果你认为xx框架的代码或配置存在问题,那么欢迎发起Pull Request.
- 利益相关: 本测试用例作者同时为 [turbo](https://github.com/hank-whu/turbo-rpc), [undertow-async](https://github.com/hank-whu/undertow-async) 的作者.
## 关注微信公众号: rpcBenchmark

================================================
FILE: armeria-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>armeria-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>armeria-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Client</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: armeria-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.service.UserService;
import benchmark.service.UserServiceJsonHttpClientImpl;
@State(Scope.Benchmark)
public class Client extends AbstractClient {
public static final int CONCURRENCY = 32;
private final UserService userService = new UserServiceJsonHttpClientImpl(CONCURRENCY);
@Override
protected UserService getUserService() {
return userService;
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean existUser() throws Exception {
return super.existUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean createUser() throws Exception {
return super.createUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public User getUser() throws Exception {
return super.getUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public Page<User> listUser() throws Exception {
return super.listUser();
}
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
}
}
================================================
FILE: armeria-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>armeria-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>armeria-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<armeria.version>0.79.0</armeria.version>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>com.linecorp.armeria</groupId>
<artifactId>armeria</artifactId>
<version>${armeria.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Server</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: armeria-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import java.net.InetSocketAddress;
import com.linecorp.armeria.server.ServerBuilder;
import benchmark.service.ArmeriaUserServiceServerImpl;
public class Server {
public static void main(String[] args) throws Exception {
ServerBuilder sb = new ServerBuilder();
// Configure an HTTP port.
sb.http(new InetSocketAddress("benchmark-server", 8080));
// Using an annotated service object:
sb.annotatedService(new ArmeriaUserServiceServerImpl());
sb.build().start().join();
}
}
================================================
FILE: armeria-server/src/main/java/benchmark/service/ArmeriaUserServiceServerImpl.java
================================================
package benchmark.service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.linecorp.armeria.common.HttpResponse;
import com.linecorp.armeria.server.annotation.Get;
import com.linecorp.armeria.server.annotation.Param;
import com.linecorp.armeria.server.annotation.Post;
import com.linecorp.armeria.server.annotation.RequestObject;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.rpc.util.JsonUtils;
/**
* only for server
*
* @author Hank
*
*/
public class ArmeriaUserServiceServerImpl {
private final ObjectMapper objectMapper = JsonUtils.objectMapper;
@Get("/user-exist")
public HttpResponse existUser(@Param("email") String email) {
if (email == null || email.isEmpty()) {
return HttpResponse.of(String.valueOf(Boolean.TRUE));
}
if (email.charAt(email.length() - 1) < '5') {
return HttpResponse.of(String.valueOf(Boolean.FALSE));
}
return HttpResponse.of(String.valueOf(Boolean.TRUE));
}
@Get("/get-user")
public HttpResponse getUser(@Param("id") long id) throws JsonProcessingException {
User user = new User();
user.setId(id);
user.setName("Doug Lea");
user.setSex(1);
user.setBirthday(LocalDate.of(1968, 12, 8));
user.setEmail("dong.lea@gmail.com");
user.setMobile("18612345678");
user.setAddress("北京市 中关村 中关村大街1号 鼎好大厦 1605");
user.setIcon("https://www.baidu.com/img/bd_logo1.png");
user.setStatus(1);
user.setCreateTime(LocalDateTime.now());
user.setUpdateTime(user.getCreateTime());
List<Integer> permissions = new ArrayList<>(List.of(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
return HttpResponse.of(objectMapper.writeValueAsString(user));
}
@Get("/list-user")
public HttpResponse listUser(@Param("pageNo") int pageNo) throws JsonProcessingException {
List<User> userList = new ArrayList<>(15);
for (int i = 0; i < 15; i++) {
User user = new User();
user.setId(i);
user.setName("Doug Lea" + i);
user.setSex(1);
user.setBirthday(LocalDate.of(1968, 12, 8));
user.setEmail("dong.lea@gmail.com" + i);
user.setMobile("18612345678" + i);
user.setAddress("北京市 中关村 中关村大街1号 鼎好大厦 1605" + i);
user.setIcon("https://www.baidu.com/img/bd_logo1.png" + i);
user.setStatus(1);
user.setCreateTime(LocalDateTime.now());
user.setUpdateTime(user.getCreateTime());
List<Integer> permissions = new ArrayList<>(List.of(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
userList.add(user);
}
Page<User> page = new Page<>();
page.setPageNo(pageNo);
page.setTotal(1000);
page.setResult(userList);
return HttpResponse.of(objectMapper.writeValueAsString(page));
}
@Post("/create-user")
public HttpResponse createUser(@RequestObject User user) {
if (user == null) {
return HttpResponse.of(String.valueOf(Boolean.FALSE));
}
return HttpResponse.of(String.valueOf(Boolean.TRUE));
}
}
================================================
FILE: benchmark-base/.java-version
================================================
11
================================================
FILE: benchmark-base/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>benchmark-base</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.jmh>1.21</version.jmh>
<version.logback>1.2.3</version.logback>
<version.httpclient>4.5.7</version.httpclient>
<version.jackson>2.9.8</version.jackson>
<version.kryo>4.0.2</version.kryo>
<version.protostuff>1.6.0</version.protostuff>
<version.jsr250>1.0</version.jsr250>
<version.vibur>22.2</version.vibur>
<version.conversantmedia-disruptor>1.2.15</version.conversantmedia-disruptor>
</properties>
<dependencies>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${version.jmh}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${version.jmh}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${version.logback}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${version.httpclient}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${version.jackson}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>${version.jackson}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${version.jackson}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-afterburner</artifactId>
<version>${version.jackson}</version>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>${version.kryo}</version>
</dependency>
<dependency>
<groupId>io.protostuff</groupId>
<artifactId>protostuff-core</artifactId>
<version>${version.protostuff}</version>
</dependency>
<dependency>
<groupId>io.protostuff</groupId>
<artifactId>protostuff-runtime</artifactId>
<version>${version.protostuff}</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>${version.jsr250}</version>
</dependency>
<dependency>
<groupId>org.vibur</groupId>
<artifactId>vibur-object-pool</artifactId>
<version>${version.vibur}</version>
</dependency>
<dependency>
<groupId>com.conversantmedia</groupId>
<artifactId>disruptor</artifactId>
<version>${version.conversantmedia-disruptor}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: benchmark-base/src/main/java/benchmark/bean/Page.java
================================================
package benchmark.bean;
import java.io.Serializable;
import java.util.List;
public class Page<T> implements Serializable {
private static final long serialVersionUID = -7529237188686406553L;
private int pageNo;
private int total;
private List<T> result;
public int getPageNo() {
return pageNo;
}
public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public List<T> getResult() {
return result;
}
public void setResult(List<T> result) {
this.result = result;
}
@Override
public String toString() {
return "Page [pageNo=" + pageNo + ", total=" + total + ", result=" + result + "]";
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/bean/User.java
================================================
package benchmark.bean;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
public class User implements Serializable {
private static final long serialVersionUID = 2566816725396650300L;
private long id;
private String name;
private int sex;
private LocalDate birthday;
private String email;
private String mobile;
private String address;
private String icon;
private List<Integer> permissions;
private int status;
private LocalDateTime createTime;
private LocalDateTime updateTime;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public LocalDate getBirthday() {
return birthday;
}
public void setBirthday(LocalDate birthday) {
this.birthday = birthday;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public List<Integer> getPermissions() {
return permissions;
}
public void setPermissions(List<Integer> permissions) {
this.permissions = permissions;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "User [id=" + id + ", name=" + name + ", sex=" + sex + ", birthday=" + birthday + ", email=" + email
+ ", mobile=" + mobile + ", address=" + address + ", icon=" + icon + ", permissions=" + permissions
+ ", status=" + status + ", createTime=" + createTime + ", updateTime=" + updateTime + "]";
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/pool/ConcurrentObjectPool.java
================================================
package benchmark.pool;
import static benchmark.pool.UnsafeUtils.unsafe;
import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.ThreadLocalRandom;
import java.util.function.Supplier;
/**
* @author Hank
*
* @param <T>
*/
@SuppressWarnings("unchecked")
public class ConcurrentObjectPool<T> implements Closeable {
private static final long EXCHANGE;
private static final int ABASE;
private static final int ASHIFT;
private static final Object EMPTY = new Object();
private static final WaitStrategy WAIT_STRATEGY = new WaitStrategy();
private final int size;
volatile long p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17;
private final Object[] array;
private final Object[] closeList;
volatile long q0, q1, q2, q3, q4, q5, q6, q7, q8, q9, q10, q11, q12, q13, q14, q15, q16, q17;
private volatile Object exchange = EMPTY;
volatile long r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17;
public ConcurrentObjectPool(int poolSize, Supplier<T> producer) {
this.size = poolSize;
this.closeList = new Object[poolSize];
this.array = new Object[poolSize];
for (int i = 0; i < poolSize; i++) {
T t = producer.get();
array[i] = t;
closeList[i] = t;
}
}
public T borrow() {
T fast = exchange();
if (fast != null) {// 抢到了
return fast;
}
for (int i = 0; i < Integer.MAX_VALUE; i++) {
int random = ThreadLocalRandom.current().nextInt(size);
for (int j = 0; j < size; j++) {
long offset = offset((random + j) % size);
Object obj = unsafe().getObjectVolatile(array, offset);
if (obj != EMPTY) {
if (unsafe().compareAndSwapObject(array, offset, obj, EMPTY)) {
return (T) obj;
} else {
break;
}
}
}
WAIT_STRATEGY.idle(i);
}
return null;
}
public void release(final T t) {
if (t == null) {
return;
}
final boolean exchanged = exchange(t);
for (int i = 0; i < Integer.MAX_VALUE; i++) {
int random = ThreadLocalRandom.current().nextInt(size);
for (int j = 0; j < size; j++) {
if (exchanged && !checkExchange(t)) {
return;
}
long offset = offset((random + j) % size);
Object obj = unsafe().getObjectVolatile(array, offset);
if (obj == EMPTY) {
if (exchanged && !cancelExchange(t)) {// 被其他线程抢走了
return;
}
if (unsafe().compareAndSwapObject(array, offset, obj, t)) {// 归还资源
return;
}
break;
}
}
WAIT_STRATEGY.idle(i);
}
}
private boolean exchange(final Object value) {
return unsafe().compareAndSwapObject(this, EXCHANGE, EMPTY, value);
}
private boolean cancelExchange(final Object value) {
return unsafe().compareAndSwapObject(this, EXCHANGE, value, EMPTY);
}
private boolean checkExchange(final Object value) {
return value == exchange;
}
private T exchange() {
Object fast = exchange;
// 抢一下
if (fast != EMPTY && unsafe().compareAndSwapObject(this, EXCHANGE, fast, EMPTY)) {
return (T) fast;// 抢到了
}
// 没抢到
return null;
}
@Override
public void close() throws IOException {
for (int i = 0; i < closeList.length; i++) {
Object obj = closeList[i];
if (obj instanceof AutoCloseable) {
try {
((AutoCloseable) obj).close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
private static final long offset(int key) {
return ((long) key << ASHIFT) + ABASE;
}
static {
try {
EXCHANGE = unsafe().objectFieldOffset(ConcurrentObjectPool.class.getDeclaredField("exchange"));
ABASE = unsafe().arrayBaseOffset(Object[].class);
int scale = unsafe().arrayIndexScale(Object[].class);
if ((scale & (scale - 1)) != 0) {
throw new Error("array index scale not a power of two");
}
ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
} catch (Exception e) {
throw new Error(e);
}
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/pool/LockObjectPool.java
================================================
package benchmark.pool;
import java.io.Closeable;
import java.io.IOException;
import java.util.IdentityHashMap;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Supplier;
/**
* @author Hank
*
* @param <T>
*/
@SuppressWarnings("unchecked")
public class LockObjectPool<T> implements Closeable {
static class ObjectWithLock {
public final Object obj;
public final Lock lock;
public ObjectWithLock(Object obj) {
this.obj = obj;
this.lock = new ReentrantLock();
}
}
private final ObjectWithLock[] array;
private final IdentityHashMap<Object, ObjectWithLock> lockMap;
private final int poolSize;
public LockObjectPool(int poolSize, Supplier<T> producer) {
this.poolSize = poolSize;
lockMap = new IdentityHashMap<>(poolSize * 2);
array = new ObjectWithLock[poolSize];
for (int i = 0; i < poolSize; i++) {
T t = producer.get();
ObjectWithLock objectWithLock = new ObjectWithLock(t);
array[i] = objectWithLock;
lockMap.put(t, objectWithLock);
}
}
public T borrow() {
int index = ThreadLocalRandom.current().nextInt(poolSize);
ObjectWithLock objectWithLock = array[index];
objectWithLock.lock.lock();
return (T) objectWithLock.obj;
}
public void release(T t) {
if (t == null) {
return;
}
lockMap.get(t).lock.unlock();
}
@Override
public void close() throws IOException {
for (int i = 0; i < array.length; i++) {
Object obj = array[i].obj;
if (obj instanceof AutoCloseable) {
try {
((AutoCloseable) obj).close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/pool/UnsafeUtils.java
================================================
package benchmark.pool;
import sun.misc.Unsafe;
public class UnsafeUtils {
final static private Unsafe _unsafe;
static {
Unsafe tmpUnsafe = null;
try {
java.lang.reflect.Field field = sun.misc.Unsafe.class.getDeclaredField("theUnsafe");
field.setAccessible(true);
tmpUnsafe = (sun.misc.Unsafe) field.get(null);
} catch (java.lang.Exception e) {
throw new Error(e);
}
_unsafe = tmpUnsafe;
}
public static final Unsafe unsafe() {
return _unsafe;
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/pool/ViberObjectPool.java
================================================
package benchmark.pool;
import java.io.Closeable;
import java.io.IOException;
import java.util.function.Supplier;
import org.vibur.objectpool.ConcurrentPool;
import org.vibur.objectpool.PoolObjectFactory;
import org.vibur.objectpool.PoolService;
import org.vibur.objectpool.util.ConcurrentCollection;
import org.vibur.objectpool.util.MultithreadConcurrentQueueCollection;
public class ViberObjectPool<T> implements Closeable {
private final PoolService<T> pool;
public ViberObjectPool(int poolSize, Supplier<T> producer) {
PoolObjectFactory<T> poolObjectFactory = new PoolObjectFactory<T>() {
@Override
public T create() {
return producer.get();
}
@Override
public boolean readyToTake(T obj) {
return true;
}
@Override
public boolean readyToRestore(T obj) {
return true;
}
@Override
public void destroy(T obj) {
if (obj instanceof AutoCloseable) {
try {
((AutoCloseable) obj).close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
};
ConcurrentCollection<T> concurrentCollection = new MultithreadConcurrentQueueCollection<>(poolSize);
pool = new ConcurrentPool<>(concurrentCollection, poolObjectFactory, poolSize, poolSize, false);
}
public T borrow() {
return pool.take();
}
public void release(T t) {
if (t == null) {
return;
}
pool.restore(t);
}
@Override
public void close() throws IOException {
pool.close();
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/pool/WaitStrategy.java
================================================
package benchmark.pool;
import java.util.concurrent.locks.LockSupport;
public final class WaitStrategy {
public final int idle(final int idleCounter) {
final int idled = idleCounter + 1;
if (idleCounter < 10) {
Thread.onSpinWait();
return idled;
}
if (idleCounter < 10 + 10) {
Thread.yield();
return idled;
}
LockSupport.parkNanos(1L);
return idled;
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/rpc/AbstractClient.java
================================================
package benchmark.rpc;
import java.util.concurrent.atomic.AtomicInteger;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.service.UserService;
import benchmark.service.UserServiceServerImpl;
public abstract class AbstractClient {
private final AtomicInteger counter = new AtomicInteger(0);
private final UserService _serviceUserService = new UserServiceServerImpl();
protected abstract UserService getUserService();
public boolean existUser() throws Exception {
String email = String.valueOf(counter.getAndIncrement());
return getUserService().existUser(email);
}
public boolean createUser() throws Exception {
int id = counter.getAndIncrement();
User user = _serviceUserService.getUser(id);
return getUserService().createUser(user);
}
public User getUser() throws Exception {
int id = counter.getAndIncrement();
return getUserService().getUser(id);
}
public Page<User> listUser() throws Exception {
int pageNo = counter.getAndIncrement();
return getUserService().listUser(pageNo);
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/rpc/protocol/Request.java
================================================
package benchmark.rpc.protocol;
import java.io.Serializable;
import java.util.Arrays;
public class Request implements Serializable {
private static final long serialVersionUID = 7798556948864269597L;
private long requestId;
private int serviceId;
private Object[] params;
public long getRequestId() {
return requestId;
}
public void setRequestId(long requestId) {
this.requestId = requestId;
}
public int getServiceId() {
return serviceId;
}
public void setServiceId(int serviceId) {
this.serviceId = serviceId;
}
public Object[] getParams() {
return params;
}
public void setParams(Object[] params) {
this.params = params;
}
@Override
public String toString() {
return "Request [requestId=" + requestId + ", serviceId=" + serviceId + ", params=" + Arrays.toString(params)
+ "]";
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/rpc/protocol/Response.java
================================================
package benchmark.rpc.protocol;
import java.io.Serializable;
public class Response implements Serializable {
private static final long serialVersionUID = -2827803061483152127L;
private long requestId;
private byte statusCode;
private Object result;
public long getRequestId() {
return requestId;
}
public void setRequestId(long requestId) {
this.requestId = requestId;
}
public byte getStatusCode() {
return statusCode;
}
public void setStatusCode(byte statusCode) {
this.statusCode = statusCode;
}
public Object getResult() {
return result;
}
public void setResult(Object result) {
this.result = result;
}
@Override
public String toString() {
return "Response [requestId=" + requestId + ", statusCode=" + statusCode + ", result=" + result + "]";
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/rpc/route/RouteService.java
================================================
package benchmark.rpc.route;
import static benchmark.service.ServiceRegister.CREATE_USER;
import static benchmark.service.ServiceRegister.EXIST_USER;
import static benchmark.service.ServiceRegister.GET_USER;
import static benchmark.service.ServiceRegister.LIST_USER;
import benchmark.bean.User;
import benchmark.service.UserService;
import benchmark.service.UserServiceServerImpl;
public class RouteService {
private final UserService userService = new UserServiceServerImpl();
public Object invoke(int serviceId, Object[] params) {
switch (serviceId) {
case EXIST_USER:
return userService.existUser((String) params[0]);
case CREATE_USER:
return userService.createUser((User) params[0]);
case GET_USER:
return userService.getUser((Long) params[0]);
case LIST_USER:
return userService.listUser((Integer) params[0]);
default:
break;
}
return null;
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/rpc/util/ByteBufferUtils.java
================================================
package benchmark.rpc.util;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.nio.ByteBuffer;
public class ByteBufferUtils {
public static ByteBuffer allocateDirect(String str) {
return _allocateByteBuffer(str.getBytes(UTF_8), true);
}
public static ByteBuffer allocate(String str) {
return _allocateByteBuffer(str.getBytes(UTF_8), false);
}
public static ByteBuffer allocate(byte[] bytes) {
return _allocateByteBuffer(bytes, false);
}
private static ByteBuffer _allocateByteBuffer(byte[] bytes, boolean isDirect) {
final ByteBuffer buffer = isDirect ? //
ByteBuffer.allocateDirect(bytes.length) : //
ByteBuffer.allocate(bytes.length);
buffer.put(bytes);
buffer.flip();
return buffer;
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/rpc/util/HttpClientUtils.java
================================================
package benchmark.rpc.util;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.config.SocketConfig;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
public class HttpClientUtils {
public static final int SOCKET_TIMEOUT = 60000;
public static final int CONNECTION_REQUEST_TIMEOUT = 60000;
public static final int CONNECT_TIMEOUT = 60000;
public static CloseableHttpClient createHttpClient(int concurrency) {
HttpClientBuilder builder = HttpClientBuilder.create();
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager();
connManager.setDefaultMaxPerRoute(concurrency);
connManager.setMaxTotal(concurrency);
RequestConfig requestConfig = RequestConfig.custom()//
.setAuthenticationEnabled(true)//
.setSocketTimeout(SOCKET_TIMEOUT)//
.setConnectionRequestTimeout(CONNECTION_REQUEST_TIMEOUT)//
.setConnectTimeout(CONNECT_TIMEOUT)//
.setRedirectsEnabled(true)//
.setRelativeRedirectsAllowed(true)//
.setMaxRedirects(15)//
.build();
SocketConfig socketConfig = SocketConfig.custom()//
.setSoKeepAlive(true)//
.setSoReuseAddress(true)//
.build();
builder.setConnectionManager(connManager);
builder.setDefaultSocketConfig(socketConfig);
builder.setDefaultRequestConfig(requestConfig);
return builder.build();
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/rpc/util/JsonUtils.java
================================================
package benchmark.rpc.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
public class JsonUtils {
public static final ObjectMapper objectMapper = new ObjectMapper();
static {
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new JavaTimeModule());
objectMapper.registerModule(new AfterburnerModule());
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/service/ServiceRegister.java
================================================
package benchmark.service;
public interface ServiceRegister {
public static final int EXIST_USER = 0;
public static final int CREATE_USER = 1;
public static final int GET_USER = 2;
public static final int LIST_USER = 3;
}
================================================
FILE: benchmark-base/src/main/java/benchmark/service/UserService.java
================================================
package benchmark.service;
import benchmark.bean.Page;
import benchmark.bean.User;
public interface UserService {
public boolean existUser(String email);
public boolean createUser(User user);
public User getUser(long id);
public Page<User> listUser(int pageNo);
}
================================================
FILE: benchmark-base/src/main/java/benchmark/service/UserServiceJsonHttpClientImpl.java
================================================
package benchmark.service;
import java.nio.charset.StandardCharsets;
import org.apache.http.HttpEntity;
import org.apache.http.client.entity.EntityBuilder;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.util.EntityUtils;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.rpc.util.HttpClientUtils;
import benchmark.rpc.util.JsonUtils;
/**
* only for client
*
* @author Hank
*
*/
public class UserServiceJsonHttpClientImpl implements UserService {
private static final String URL_EXIST_USER = "http://benchmark-server:8080/user-exist?email=";
private static final String URL_CREATE_USER = "http://benchmark-server:8080/create-user";
private static final String URL_GET_USER = "http://benchmark-server:8080/get-user?id=";
private static final String URL_LIST_USER = "http://benchmark-server:8080/list-user?pageNo=";
private final CloseableHttpClient client;
private final ObjectMapper objectMapper = JsonUtils.objectMapper;
private final JavaType userPageType = objectMapper.getTypeFactory()//
.constructParametricType(Page.class, User.class);
public UserServiceJsonHttpClientImpl(int concurrency) {
client = HttpClientUtils.createHttpClient(concurrency);
}
@Override
public boolean existUser(String email) {
try {
String url = URL_EXIST_USER + email;
HttpGet request = new HttpGet(url);
CloseableHttpResponse response = client.execute(request);
String result = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
return "true".equals(result);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public boolean createUser(User user) {
try {
byte[] bytes = objectMapper.writeValueAsBytes(user);
HttpPost request = new HttpPost(URL_CREATE_USER);
HttpEntity entity = EntityBuilder.create().setBinary(bytes).build();
request.setEntity(entity);
CloseableHttpResponse response = client.execute(request);
String result = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
return "true".equals(result);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public User getUser(long id) {
try {
String url = URL_GET_USER + id;
HttpGet request = new HttpGet(url);
CloseableHttpResponse response = client.execute(request);
byte[] bytes = EntityUtils.toByteArray(response.getEntity());
return objectMapper.readValue(bytes, User.class);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public Page<User> listUser(int pageNo) {
try {
String url = URL_LIST_USER + pageNo;
HttpGet request = new HttpGet(url);
CloseableHttpResponse response = client.execute(request);
byte[] bytes = EntityUtils.toByteArray(response.getEntity());
return objectMapper.readValue(bytes, userPageType);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public static void main(String[] args) throws Exception {
UserService userService = new UserServiceJsonHttpClientImpl(256);
System.out.println(userService.existUser("1236"));
System.out.println(userService.getUser(123));
System.out.println(userService.listUser(123));
}
}
================================================
FILE: benchmark-base/src/main/java/benchmark/service/UserServiceServerImpl.java
================================================
package benchmark.service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import benchmark.bean.Page;
import benchmark.bean.User;
/**
* only for server
*
* @author Hank
*
*/
public class UserServiceServerImpl implements UserService {
@Override
public boolean existUser(String email) {
if (email == null || email.isEmpty()) {
return true;
}
if (email.charAt(email.length() - 1) < '5') {
return false;
}
return true;
}
@Override
public User getUser(long id) {
User user = new User();
user.setId(id);
user.setName(new String("Doug Lea"));
user.setSex(1);
user.setBirthday(LocalDate.of(1968, 12, 8));
user.setEmail(new String("dong.lea@gmail.com"));
user.setMobile(new String("18612345678"));
user.setAddress(new String("北京市 中关村 中关村大街1号 鼎好大厦 1605"));
user.setIcon(new String("https://www.baidu.com/img/bd_logo1.png"));
user.setStatus(1);
user.setCreateTime(LocalDateTime.now());
user.setUpdateTime(user.getCreateTime());
List<Integer> permissions = new ArrayList<Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
return user;
}
@Override
public Page<User> listUser(int pageNo) {
List<User> userList = new ArrayList<>(15);
for (int i = 0; i < 15; i++) {
User user = new User();
user.setId(i);
user.setName("Doug Lea" + i);
user.setSex(1);
user.setBirthday(LocalDate.of(1968, 12, 8));
user.setEmail("dong.lea@gmail.com" + i);
user.setMobile("18612345678" + i);
user.setAddress("北京市 中关村 中关村大街1号 鼎好大厦 1605" + i);
user.setIcon("https://www.baidu.com/img/bd_logo1.png" + i);
user.setStatus(1);
user.setCreateTime(LocalDateTime.now());
user.setUpdateTime(user.getCreateTime());
List<Integer> permissions = new ArrayList<Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
userList.add(user);
}
Page<User> page = new Page<>();
page.setPageNo(pageNo);
page.setTotal(1000);
page.setResult(userList);
return page;
}
@Override
public boolean createUser(User user) {
if (user == null) {
return false;
}
return true;
}
}
================================================
FILE: benchmark.java
================================================
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class benchmark {
private final static String jvmOps = "java -server -Xmx1g -Xms1g -XX:MaxDirectMemorySize=1g -XX:+UseG1GC";
private final static File resultFolder = new File("benchmark-result");
private final static List<String> funOrder = List.of("existUser", "createUser", "getUser", "listUser");
Item emptyItem = new Item(null, Typ.Thrpt, null, 0D);
public static void main(String[] args) throws Exception {
installBenchmarkBase();
var allTasks = getAllTasks()
.filter(t -> !t.startsWith("jupiter"))
//.filter(t -> t.compareTo("jupiter") > 0)
.collect(Collectors.toList());
System.out.println("找到以下benchmark项目:");
System.out.println(allTasks);
allTasks.forEach(benchmark::benchmark);
report();
}
private static void installBenchmarkBase() throws Exception {
exec("benchmark-base", "mvn clean install");
}
private static Stream<String> getAllTasks() {
var folder = new File(".");
return Stream.of(folder.list())
.filter(name -> name.endsWith("-client"))
.map(name -> name.substring(0, name.length() - "-client".length()))
.sorted();
}
private static void benchmark(String taskName) {
try {
var serverPackage = packageAndGet(new File(taskName + "-server"));
var clientPackage = packageAndGet(new File(taskName + "-client"));
startServer(serverPackage);
//等服务器启动起来在启动客户端
TimeUnit.SECONDS.sleep(5);
startClient(clientPackage);
stopServer(serverPackage);
} catch (Exception e) {
e.printStackTrace();
}
}
private static File packageAndGet(File project) throws Exception {
exec(project, "mvn clean package", null);
var childList = new File(project, "target").listFiles();
var opt = Stream.of(childList)
.filter(f -> f.getName().endsWith("-jar-with-dependencies.jar"))
.findFirst();
if (opt.isPresent()) {
return opt.get();
}
return Stream.of(childList)
.filter(f -> !f.getName().startsWith("original-"))
.filter(f -> f.getName().endsWith(".jar"))
.findFirst()
.get();
}
private static String taskName(File pkg) {
var name = pkg.getName();
if (name.endsWith("-jar-with-dependencies.jar")) {
return name.substring(0, name.length() - "-jar-with-dependencies.jar".length());
} else {
return name.substring(0, name.length() - ".jar".length());
}
}
private static void startServer(File serverPackage) throws Exception {
var name = serverPackage.getName();
System.out.printf("start %s\r\n", name);
var resultPath = taskName(serverPackage) + ".log";
//copy到benchmark-server
exec(serverPackage.getParentFile(), "scp " + name + " benchmark@benchmark-server:~", null);
if (name.contains("servicecomb")) {
//杀掉benchmark-server上的老servicecomb-service-center进程
exec("ssh", "benchmark@benchmark-server", "killall service-center");
//benchmark-server上启动servicecomb-service-center服务
var downloadCommand = "wget https://mirrors.tuna.tsinghua.edu.cn/apache/servicecomb/servicecomb-service-center/1.1.0/apache-servicecomb-service-center-1.1.0-linux-amd64.tar.gz";
var unzipCommand = "tar xvf apache-servicecomb-service-center-1.1.0-linux-amd64.tar.gz";
var confCommand = "sed -i \"s/127.0.0.1/benchmark-server/g\" ~/apache-servicecomb-service-center-1.1.0-linux-amd64/conf/app.conf";
var runCommand = "bash apache-servicecomb-service-center-1.1.0-linux-amd64/start-service-center.sh";
exec("ssh", "benchmark@benchmark-server", downloadCommand);
exec("ssh", "benchmark@benchmark-server", unzipCommand);
exec("ssh", "benchmark@benchmark-server", confCommand);
exec("ssh", "benchmark@benchmark-server", runCommand);
}
//杀掉benchmark-server上的老进程
exec("ssh", "benchmark@benchmark-server", "killall java");
//benchmark-server上启动服务器
var remoteCommand = String.format("nohup %s -jar %s >> %s &", jvmOps, name, resultPath);
exec("ssh", "benchmark@benchmark-server", remoteCommand);
}
private static void stopServer(File serverPackage) throws Exception {
var name = serverPackage.getName();
System.out.println("stop " + name);
//benchmark-server上启动服务器
exec("ssh", "benchmark@benchmark-server", "killall java");
if (name.contains("servicecomb")) {
//杀掉benchmark-server上的老servicecomb-service-center进程
exec("ssh", "benchmark@benchmark-server", "killall service-center");
}
}
private static void startClient(File clientPackage) throws Exception {
var name = clientPackage.getName();
System.out.println("start " + name);
var resultFile = new File(resultFolder, taskName(clientPackage) + ".log");
var command = jvmOps + " -jar " + name;
//启动客户端
exec(clientPackage.getParentFile(), command, resultFile);
}
private static void exec(String path, String command) throws Exception {
if (path != null) {
exec(new File(path), command, null);
} else {
exec((File) null, command, null);
}
}
private static void exec(String command) throws Exception {
exec((File) null, command, null);
}
private static void exec(File file, String command, File redirect) throws Exception {
var process = Runtime.getRuntime().exec(command, null, file);
if (redirect != null && !redirect.exists()) {
redirect.getParentFile().mkdirs();
}
try (var inputStream = process.getInputStream();
var inputStreamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
var reader = new BufferedReader(inputStreamReader);
var output = redirect != null ? new FileOutputStream(redirect) : null;) {
var line = "";
while ((line = reader.readLine()) != null) {
System.out.println(line);
if (output != null) {
output.write(line.getBytes("UTF-8"));
output.write("\r\n".getBytes("UTF-8"));
}
}
} catch (Throwable t) {
t.printStackTrace();
}
process.waitFor();
process.destroy();
}
private static void exec(String... commands) throws Exception {
System.out.println(Arrays.toString(commands));
var process = Runtime.getRuntime().exec(commands);
try (var inputStream = process.getInputStream();
var inputStreamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
var reader = new BufferedReader(inputStreamReader);) {
var line = "";
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
} catch (Throwable t) {
t.printStackTrace();
}
process.waitFor();
process.destroy();
}
public static void report() throws Exception {
var reportFile = new File(resultFolder, "benchmark-report.md");
var reportWriter = new FileWriter(reportFile, StandardCharsets.UTF_8);
var props = System.getProperties();
reportWriter.write("# RPC性能报告\r\n");
reportWriter.write("> 生成时间: " + LocalDateTime.now() + "<br>\r\n");
reportWriter.write("> 运行环境: " + props.getProperty("os.name") + ", " + props.getProperty("java.vm.name") + " " + props.getProperty("java.runtime.version") + "<br>\r\n");
reportWriter.write("> 启动参数: " + jvmOps + "<br>\r\n");
reportWriter.write("\r\n");
var header = "| framework | thrpt (ops/ms) | avgt (ms) | p90 (ms) | p99 (ms) | p999 (ms) |\r\n"
+ "|:--- |:---:|:---:|:---:|:---:|:---:|\r\n";
Stream.of(resultFolder.listFiles())
.filter(f -> f.getName().endsWith(".log"))
.filter(f -> f.getName().contains("-client-"))
.flatMap(resultFile -> {
var name = resultFile.getName();
var index = name.indexOf("-client-");
var task = name.substring(0, index);
return uncheck(() -> Files
.lines(resultFile.toPath(), StandardCharsets.UTF_8)
.filter(line -> line.startsWith("Client."))
.map(line -> extract(task, line))
.filter(item -> item != null));
})
.collect(Collectors.groupingBy(i -> i.fun))
.entrySet()
.stream()
.sorted(Comparator.comparingInt(kv -> funOrder.indexOf(kv.getKey())))
.forEach(kv -> {
var fun = kv.getKey();
var items = kv.getValue();
var records = toRecords(items);
uncheck(() -> reportWriter.write("\r\n## " + fun + "\r\n"));
uncheck(() -> reportWriter.write(header));
records.forEach(record -> {
var line = Stream
.of(record.task, record.thrpt, record.avgt, record.p90, record.p99, record.p999)
.map(Objects::toString)
.collect(Collectors.joining("|", "|", "|\r\n"));
uncheck(() -> reportWriter.write(line));
});
uncheck(() -> reportWriter.write("\r\n"));
});
reportWriter.flush();
reportWriter.close();
System.out.println("成功生成性能报告: " + reportFile.getAbsolutePath());
}
private static List<Record> toRecords(List<Item> items) {
return items
.stream()
.collect(Collectors.groupingBy(item -> item.task))
.values()
.stream()
.map(list -> {
var task = list.get(0).task;
var thrpt = getScore(list, Typ.Thrpt);
var avgt = getScore(list, Typ.Avgt);
var p90 = getScore(list, Typ.P90);
var p99 = getScore(list, Typ.P99);
var p999 = getScore(list, Typ.P999);
return new Record(task, thrpt, avgt, p90, p99, p999);
})
.sorted(Comparator.comparingDouble(r -> -r.thrpt))
.collect(Collectors.toList());
}
private static double getScore(List<Item> items, Typ typ) {
return items.stream().filter(i -> i.typ == typ).findFirst().get().score;
}
private static Item extract(String task, String line) {
if (line == null || line.length() == 0) {
return null;
}
if (line.contains(" thrpt ")) {
var array = line.split("\\s+");
var fun = array[0].replace("Client.", "");
var score = Double.parseDouble(array[3]);
return new Item(task, Typ.Thrpt, fun, score);
}
if (line.contains(" avgt ")) {
var array = line.split("\\s+");
var fun = array[0].replace("Client.", "");
var score = Double.parseDouble(array[3]);
return new Item(task, Typ.Avgt, fun, score);
}
if (line.contains("·p0.90 ")) {
var array = line.split("\\s+");
var fun = array[0];
var begin = fun.indexOf(':') + 1;
var end = fun.indexOf('·');
fun = fun.substring(begin, end);
var score = Double.parseDouble(array[2]);
return new Item(task, Typ.P90, fun, score);
}
if (line.contains("·p0.99 ")) {
var array = line.split("\\s+");
var fun = array[0];
var begin = fun.indexOf(':') + 1;
var end = fun.indexOf('·');
fun = fun.substring(begin, end);
var score = Double.parseDouble(array[2]);
return new Item(task, Typ.P99, fun, score);
}
if (line.contains("·p0.999 ")) {
var array = line.split("\\s+");
var fun = array[0];
var begin = fun.indexOf(':') + 1;
var end = fun.indexOf('·');
fun = fun.substring(begin, end);
var score = Double.parseDouble(array[2]);
return new Item(task, Typ.P999, fun, score);
}
return null;
}
private static <T> T uncheck(UncheckedSupplier<T> fun) {
try {
return fun.get();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private static void uncheck(UncheckedFunction fun) {
try {
fun.apply();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@FunctionalInterface
private static interface UncheckedSupplier<T> {
T get() throws Exception;
}
@FunctionalInterface
private static interface UncheckedFunction {
void apply() throws Exception;
}
}
enum Typ {
Thrpt("Thrpt"), Avgt("Avgt"), P90("P90"), P99("P99"), P999("P999");
public final String name;
private Typ(String name) {
this.name = name;
}
}
class Item {
public final String task;
public final Typ typ;
public final String fun;
public final double score;
public Item(String task, Typ typ, String fun, double score) {
this.task = task;
this.typ = typ;
this.fun = fun;
this.score = score;
}
}
class Record {
public final String task;
public final double thrpt;
public final double avgt;
public final double p90;
public final double p99;
public final double p999;
public Record(String task, double thrpt, double avgt, double p90, double p99, double p999) {
this.task = task;
this.thrpt = thrpt;
this.avgt = avgt;
this.p90 = p90;
this.p99 = p99;
this.p999 = p999;
}
}
================================================
FILE: brpc-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>brpc-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>brpc-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.brpc>2.5.1</version.brpc>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java</artifactId>
<version>${version.brpc}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Client</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: brpc-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.service.UserService;
import com.baidu.brpc.client.BrpcProxy;
import com.baidu.brpc.client.RpcClient;
import com.baidu.brpc.client.RpcClientOptions;
import com.baidu.brpc.client.loadbalance.LoadBalanceStrategy;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
@State(Scope.Benchmark)
public class Client extends AbstractClient {
public static final int CONCURRENCY = 32;
private final UserService userService;
private final RpcClient rpcClient;
public Client() {
RpcClientOptions clientOption = new RpcClientOptions();
clientOption.setProtocolType(com.baidu.brpc.protocol.Options.ProtocolType.PROTOCOL_HTTP_JSON_VALUE);
clientOption.setWriteTimeoutMillis(1000);
clientOption.setReadTimeoutMillis(1000);
clientOption.setMaxTotalConnections(1000);
clientOption.setMinIdleConnections(10);
clientOption.setLoadBalanceType(LoadBalanceStrategy.LOAD_BALANCE_RANDOM);
clientOption.setCompressType(com.baidu.brpc.protocol.Options.CompressType.COMPRESS_TYPE_ZLIB);
String serviceUrl = "list://benchmark-server:8002";
this.rpcClient = new RpcClient(serviceUrl, clientOption);
this.userService = BrpcProxy.getProxy(rpcClient, UserService.class);
}
@Override
protected UserService getUserService() {
return userService;
}
@TearDown
public void close() throws IOException {
this.rpcClient.stop();
}
@Benchmark
@BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SampleTime})
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean existUser() throws Exception {
return super.existUser();
}
@Benchmark
@BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SampleTime})
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean createUser() throws Exception {
return super.createUser();
}
@Benchmark
@BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SampleTime})
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public User getUser() throws Exception {
return super.getUser();
}
@Benchmark
@BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SampleTime})
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public Page<User> listUser() throws Exception {
return super.listUser();
}
public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
}
}
================================================
FILE: brpc-client/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-client.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<!-- <appender-ref ref="console" /> -->
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: brpc-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>brpc-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>brpc-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.brpc>2.5.1</version.brpc>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java</artifactId>
<version>${version.brpc}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Server</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: brpc-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import benchmark.service.UserServiceServerImpl;
import com.baidu.brpc.protocol.Options;
import com.baidu.brpc.server.RpcServer;
import com.baidu.brpc.server.RpcServerOptions;
public class Server {
public static void main(String[] args) throws InterruptedException {
int port = 8002;
RpcServerOptions options = new RpcServerOptions();
options.setReceiveBufferSize(64 * 1024 * 1024);
options.setSendBufferSize(64 * 1024 * 1024);
options.setKeepAliveTime(20);
options.setProtocolType(Options.ProtocolType.PROTOCOL_HTTP_JSON_VALUE);
final RpcServer rpcServer = new RpcServer(port, options);
rpcServer.registerService(new UserServiceServerImpl());
rpcServer.start();
System.out.println("START");
Thread.sleep(Long.MAX_VALUE);
}
}
================================================
FILE: brpc-server/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-client.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<!-- <appender-ref ref="console" /> -->
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: dubbo-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>dubbo-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>dubbo-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.dubbo>2.7.3</version.dubbo>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${version.dubbo}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Client</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: dubbo-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.service.UserService;
@State(Scope.Benchmark)
public class Client extends AbstractClient {
public static final int CONCURRENCY = 32;
private final ClassPathXmlApplicationContext context;
private final UserService userService;
public Client() {
context = new ClassPathXmlApplicationContext("consumer.xml");
context.start();
userService = (UserService) context.getBean("userService"); // 获取远程服务代理
}
@Override
protected UserService getUserService() {
return userService;
}
@TearDown
public void close() throws IOException {
context.close();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean existUser() throws Exception {
return super.existUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean createUser() throws Exception {
return super.createUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public User getUser() throws Exception {
return super.getUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public Page<User> listUser() throws Exception {
return super.listUser();
}
public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
}
}
================================================
FILE: dubbo-client/src/main/resources/consumer.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 -->
<dubbo:application name="benchmark.rpc.dubbo-client" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="userService" check="false"
interface="benchmark.service.UserService" url="dubbo://benchmark-server:8080" />
<!-- dubbo://benchmark-rpc:8080?serialization=kryo -->
</beans>
================================================
FILE: dubbo-client/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-client.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<!-- <appender-ref ref="console" /> -->
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: dubbo-kryo-client/.gitignore
================================================
/.apt_generated_tests/
================================================
FILE: dubbo-kryo-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>dubbo-kryo-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>dubbo-kryo-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.dubbo>2.7.3</version.dubbo>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${version.dubbo}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-serialization-kryo</artifactId>
<version>${version.dubbo}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Client</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: dubbo-kryo-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.service.UserService;
@State(Scope.Benchmark)
public class Client extends AbstractClient {
public static final int CONCURRENCY = 32;
private final ClassPathXmlApplicationContext context;
private final UserService userService;
public Client() {
context = new ClassPathXmlApplicationContext("consumer.xml");
context.start();
userService = (UserService) context.getBean("userService"); // 获取远程服务代理
}
@Override
protected UserService getUserService() {
return userService;
}
@TearDown
public void close() throws IOException {
context.close();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean existUser() throws Exception {
return super.existUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean createUser() throws Exception {
return super.createUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public User getUser() throws Exception {
return super.getUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public Page<User> listUser() throws Exception {
return super.listUser();
}
public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
}
}
================================================
FILE: dubbo-kryo-client/src/main/resources/consumer.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 -->
<dubbo:application name="benchmark.rpc.dubbo-client" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="userService" check="false"
interface="benchmark.service.UserService" url="dubbo://benchmark-server:8080" />
<!-- dubbo://benchmark-rpc:8080?serialization=kryo -->
</beans>
================================================
FILE: dubbo-kryo-client/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-client.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<!-- <appender-ref ref="console" /> -->
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: dubbo-kryo-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>dubbo-kryo-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>dubbo-kryo-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.dubbo>2.7.3</version.dubbo>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${version.dubbo}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-serialization-kryo</artifactId>
<version>${version.dubbo}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Server</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: dubbo-kryo-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Server {
public static void main(String[] args) throws InterruptedException {
try (ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("provider.xml");) {
context.start();
Thread.sleep(Integer.MAX_VALUE);
}
}
}
================================================
FILE: dubbo-kryo-server/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-client.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<!-- <appender-ref ref="console" /> -->
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: dubbo-kryo-server/src/main/resources/provider.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="benchmark.rpc.dubbo-server" />
<!-- 用dubbo协议在8080端口暴露服务 -->
<dubbo:protocol name="dubbo" host="benchmark-server"
port="8080" serialization="kryo" />
<!-- <dubbo:protocol name="dubbo" port="8080" serialization="kryo" /> -->
<dubbo:registry address="N/A" />
<!-- 声明需要暴露的服务接口 -->
<dubbo:service interface="benchmark.service.UserService"
ref="userService" />
<!-- 和本地bean一样实现服务 -->
<bean id="userService" class="benchmark.service.UserServiceServerImpl" />
</beans>
================================================
FILE: dubbo-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>dubbo-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>dubbo-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.dubbo>2.7.3</version.dubbo>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${version.dubbo}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Server</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: dubbo-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Server {
public static void main(String[] args) throws InterruptedException {
try (ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("provider.xml");) {
context.start();
Thread.sleep(Integer.MAX_VALUE);
}
}
}
================================================
FILE: dubbo-server/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-client.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<!-- <appender-ref ref="console" /> -->
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: dubbo-server/src/main/resources/provider.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="benchmark.rpc.dubbo-server" />
<!-- 用dubbo协议在8080端口暴露服务 -->
<dubbo:protocol name="dubbo" host="benchmark-server"
port="8080" />
<!-- <dubbo:protocol name="dubbo" port="8080" serialization="kryo" /> -->
<dubbo:registry address="N/A" />
<!-- 声明需要暴露的服务接口 -->
<dubbo:service interface="benchmark.service.UserService"
ref="userService" />
<!-- 和本地bean一样实现服务 -->
<bean id="userService" class="benchmark.service.UserServiceServerImpl" />
</beans>
================================================
FILE: grpc-client/.gitignore
================================================
/bin/
================================================
FILE: grpc-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>grpc-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>grpc-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.grpc>1.18.0</version.grpc>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>${version.grpc}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>${version.grpc}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>${version.grpc}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.1</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.6.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${version.grpc}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Client</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/proto</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: grpc-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.rpc.grpc.UserServiceGrpcClientImpl;
import benchmark.service.UserService;
@State(Scope.Benchmark)
public class Client extends AbstractClient {
public static final int CONCURRENCY = 32;
private final UserServiceGrpcClientImpl userService = new UserServiceGrpcClientImpl();
@Override
protected UserService getUserService() {
return userService;
}
@TearDown
public void close() throws IOException {
userService.close();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean existUser() throws Exception {
return super.existUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean createUser() throws Exception {
return super.createUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public User getUser() throws Exception {
return super.getUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public Page<User> listUser() throws Exception {
return super.listUser();
}
public static void main(String[] args) throws Exception {
Client client = new Client();
for (int i = 0; i < 60; i++) {
try {
System.out.println(client.getUser());
break;
} catch (Exception e) {
Thread.sleep(1000);
}
}
client.close();
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
}
}
================================================
FILE: grpc-client/src/main/java/benchmark/rpc/grpc/GrpcUserServiceClient.java
================================================
package benchmark.rpc.grpc;
import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
public class GrpcUserServiceClient implements Closeable {
public final ManagedChannel channel;
public final UserServiceGrpc.UserServiceBlockingStub userServiceBlockingStub;
public GrpcUserServiceClient(String host, int port) {
ManagedChannelBuilder<?> channelBuilder = ManagedChannelBuilder//
.forAddress(host, port)//
.idleTimeout(5, TimeUnit.SECONDS)//
.usePlaintext(true);
channel = channelBuilder.build();
userServiceBlockingStub = UserServiceGrpc.newBlockingStub(channel);
}
@Override
public void close() throws IOException {
try {
channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw new IOException(e);
}
}
}
================================================
FILE: grpc-client/src/main/java/benchmark/rpc/grpc/UserServiceGrpcClientImpl.java
================================================
package benchmark.rpc.grpc;
import java.io.Closeable;
import java.io.IOException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.rpc.grpc.UserServiceOuterClass.CreateUserResponse;
import benchmark.rpc.grpc.UserServiceOuterClass.GetUserRequest;
import benchmark.rpc.grpc.UserServiceOuterClass.ListUserRequest;
import benchmark.rpc.grpc.UserServiceOuterClass.UserExistRequest;
import benchmark.rpc.grpc.UserServiceOuterClass.UserExistResponse;
import benchmark.rpc.grpc.UserServiceOuterClass.UserPage;
import benchmark.service.UserService;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
public class UserServiceGrpcClientImpl implements UserService, Closeable {
private final String host = "benchmark-server";
private final int port = 8080;
private final ManagedChannel channel;
private final UserServiceGrpc.UserServiceBlockingStub userServiceBlockingStub;
public UserServiceGrpcClientImpl() {
ManagedChannelBuilder<?> channelBuilder = ManagedChannelBuilder.forAddress(host, port).usePlaintext(true);
channel = channelBuilder.build();
userServiceBlockingStub = UserServiceGrpc.newBlockingStub(channel);
}
@Override
public void close() throws IOException {
try {
channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
@Override
public boolean existUser(String email) {
UserExistRequest request = UserExistRequest.newBuilder().setEmail(email).build();
UserExistResponse response = userServiceBlockingStub.userExist(request);
return response.getExist();
}
@Override
public boolean createUser(User user) {
benchmark.rpc.grpc.UserServiceOuterClass.User request = benchmark.rpc.grpc.UserServiceOuterClass.User
.newBuilder()//
.setId(user.getId())//
.setName(user.getName())//
.setSex(user.getSex())//
.setBirthday((int) (user.getBirthday().toEpochDay()))//
.setEmail(user.getEmail())//
.setMobile(user.getMobile())//
.setAddress(user.getAddress())//
.setIcon(user.getIcon())//
.addAllPermissions(user.getPermissions())//
.setStatus(user.getStatus())//
.setCreateTime(user.getCreateTime().toEpochSecond(ZoneOffset.UTC))//
.setUpdateTime(user.getUpdateTime().toEpochSecond(ZoneOffset.UTC))//
.build();
CreateUserResponse response = userServiceBlockingStub.createUser(request);
return response.getSuccess();
}
@Override
public User getUser(long id) {
GetUserRequest request = GetUserRequest.newBuilder().setId(id).build();
benchmark.rpc.grpc.UserServiceOuterClass.User response = userServiceBlockingStub.getUser(request);
User user = new User();
user.setId(response.getId());
user.setName(response.getName());
user.setSex(response.getSex());
user.setBirthday(LocalDate.ofEpochDay(response.getBirthday()));
user.setEmail(response.getEmail());
user.setMobile(response.getMobile());
user.setAddress(response.getAddress());
user.setIcon(response.getIcon());
user.setPermissions(response.getPermissionsList());
user.setStatus(response.getStatus());
user.setCreateTime(LocalDateTime.ofEpochSecond(response.getCreateTime(), 0, ZoneOffset.UTC));
user.setUpdateTime(LocalDateTime.ofEpochSecond(response.getUpdateTime(), 0, ZoneOffset.UTC));
return user;
}
@Override
public Page<User> listUser(int pageNo) {
ListUserRequest request = ListUserRequest.newBuilder().setPageNo(pageNo).build();
UserPage response = userServiceBlockingStub.listUser(request);
Page<User> page = new Page<>();
page.setPageNo(response.getPageNo());
page.setTotal(response.getTotal());
List<User> userList = new ArrayList<>(response.getResultCount());
for (benchmark.rpc.grpc.UserServiceOuterClass.User u : response.getResultList()) {
User user = new User();
user.setId(u.getId());
user.setName(u.getName());
user.setSex(u.getSex());
user.setBirthday(LocalDate.ofEpochDay(u.getBirthday()));
user.setEmail(u.getEmail());
user.setMobile(u.getMobile());
user.setAddress(u.getAddress());
user.setIcon(u.getIcon());
user.setPermissions(u.getPermissionsList());
user.setStatus(u.getStatus());
user.setCreateTime(LocalDateTime.ofEpochSecond(u.getCreateTime(), 0, ZoneOffset.UTC));
user.setUpdateTime(LocalDateTime.ofEpochSecond(u.getUpdateTime(), 0, ZoneOffset.UTC));
userList.add(user);
}
page.setResult(userList);
return page;
}
}
================================================
FILE: grpc-client/src/main/proto/UserService.proto
================================================
syntax = "proto3";
package grpc;
import public "google/protobuf/timestamp.proto";
option java_package = "benchmark.rpc.grpc";
service UserService {
rpc userExist (UserExistRequest) returns (UserExistResponse) {}
rpc createUser (User) returns (CreateUserResponse) {}
rpc getUser (GetUserRequest) returns (User) {}
rpc listUser (ListUserRequest) returns (UserPage) {}
}
message UserExistRequest {
string email = 1;
}
message UserExistResponse {
bool exist = 1;
}
message GetUserRequest {
int64 id = 1;
}
message User {
int64 id = 1;
string name = 2;
int32 sex = 3;
int32 birthday = 4;
string email = 5;
string mobile = 6;
string address = 7;
string icon = 8;
repeated int32 permissions = 9;
int32 status = 10;
int64 createTime = 11;
int64 updateTime = 12;
}
message CreateUserResponse {
bool success = 1;
}
message ListUserRequest {
int32 pageNo = 1;
}
message UserPage {
int32 pageNo = 1;
int32 total = 2;
repeated User result = 3;
}
================================================
FILE: grpc-client/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-client.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<appender-ref ref="console" />
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: grpc-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>grpc-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>grpc-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.grpc>1.18.0</version.grpc>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>${version.grpc}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>${version.grpc}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>${version.grpc}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.1</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.6.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${version.grpc}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Server</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/proto</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: grpc-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import benchmark.rpc.grpc.server.UserServiceGrpcServerImpl;
import io.grpc.ServerBuilder;
public class Server {
public static final String host = "benchmark-server";
public static final int port = 8080;
public static void main(String[] args) throws Exception {
ServerBuilder//
.forPort(port)//
.addService(new UserServiceGrpcServerImpl())//
.build()//
.start()//
.awaitTermination();
}
}
================================================
FILE: grpc-server/src/main/java/benchmark/rpc/grpc/server/UserServiceGrpcServerImpl.java
================================================
package benchmark.rpc.grpc.server;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.List;
import benchmark.bean.Page;
import benchmark.rpc.grpc.UserServiceGrpc.UserServiceImplBase;
import benchmark.rpc.grpc.UserServiceOuterClass.CreateUserResponse;
import benchmark.rpc.grpc.UserServiceOuterClass.GetUserRequest;
import benchmark.rpc.grpc.UserServiceOuterClass.ListUserRequest;
import benchmark.rpc.grpc.UserServiceOuterClass.User;
import benchmark.rpc.grpc.UserServiceOuterClass.UserExistRequest;
import benchmark.rpc.grpc.UserServiceOuterClass.UserExistResponse;
import benchmark.rpc.grpc.UserServiceOuterClass.UserPage;
import benchmark.service.UserService;
import benchmark.service.UserServiceServerImpl;
import io.grpc.stub.StreamObserver;
public class UserServiceGrpcServerImpl extends UserServiceImplBase {
private final UserService userService = new UserServiceServerImpl();
@Override
public void userExist(UserExistRequest request, StreamObserver<UserExistResponse> responseObserver) {
String email = request.getEmail();
boolean isExist = userService.existUser(email);
UserExistResponse reply = UserExistResponse.newBuilder().setExist(isExist).build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
}
@Override
public void getUser(GetUserRequest request, StreamObserver<User> responseObserver) {
long id = request.getId();
benchmark.bean.User user = userService.getUser(id);
User reply = User.newBuilder()//
.setId(user.getId())//
.setName(user.getName())//
.setSex(user.getSex())//
.setBirthday((int) (user.getBirthday().toEpochDay()))//
.setEmail(user.getEmail())//
.setMobile(user.getMobile())//
.setAddress(user.getAddress())//
.setIcon(user.getIcon())//
.addAllPermissions(user.getPermissions())//
.setStatus(user.getStatus())//
.setCreateTime(user.getCreateTime().toEpochSecond(ZoneOffset.UTC))//
.setUpdateTime(user.getUpdateTime().toEpochSecond(ZoneOffset.UTC))//
.build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
}
@Override
public void createUser(User request, StreamObserver<CreateUserResponse> responseObserver) {
benchmark.bean.User user = new benchmark.bean.User();
user.setId(request.getId());
user.setName(request.getName());
user.setSex(request.getSex());
user.setBirthday(LocalDate.ofEpochDay(request.getBirthday()));
user.setEmail(request.getEmail());
user.setMobile(request.getMobile());
user.setAddress(request.getAddress());
user.setIcon(request.getIcon());
user.setPermissions(request.getPermissionsList());
user.setStatus(request.getStatus());
user.setCreateTime(LocalDateTime.ofEpochSecond(request.getCreateTime(), 0, ZoneOffset.UTC));
user.setUpdateTime(LocalDateTime.ofEpochSecond(request.getUpdateTime(), 0, ZoneOffset.UTC));
boolean success = userService.createUser(user);
CreateUserResponse reply = CreateUserResponse.newBuilder().setSuccess(success).build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
}
@Override
public void listUser(ListUserRequest request, StreamObserver<UserPage> responseObserver) {
int pageNo = request.getPageNo();
Page<benchmark.bean.User> page = userService.listUser(pageNo);
List<User> userList = new ArrayList<>(page.getResult().size());
for (benchmark.bean.User user : page.getResult()) {
User u = User.newBuilder()//
.setId(user.getId())//
.setName(user.getName())//
.setSex(user.getSex())//
.setBirthday((int) (user.getBirthday().toEpochDay()))//
.setEmail(user.getEmail())//
.setMobile(user.getMobile())//
.setAddress(user.getAddress())//
.setIcon(user.getIcon())//
.addAllPermissions(user.getPermissions())//
.setStatus(user.getStatus())//
.setCreateTime(user.getCreateTime().toEpochSecond(ZoneOffset.UTC))//
.setUpdateTime(user.getUpdateTime().toEpochSecond(ZoneOffset.UTC))//
.build();
userList.add(u);
}
UserPage reply = UserPage.newBuilder()//
.setPageNo(page.getPageNo())//
.setTotal(page.getTotal())//
.addAllResult(userList)//
.build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
}
}
================================================
FILE: grpc-server/src/main/proto/UserService.proto
================================================
syntax = "proto3";
package grpc;
import public "google/protobuf/timestamp.proto";
option java_package = "benchmark.rpc.grpc";
service UserService {
rpc userExist (UserExistRequest) returns (UserExistResponse) {}
rpc createUser (User) returns (CreateUserResponse) {}
rpc getUser (GetUserRequest) returns (User) {}
rpc listUser (ListUserRequest) returns (UserPage) {}
}
message UserExistRequest {
string email = 1;
}
message UserExistResponse {
bool exist = 1;
}
message GetUserRequest {
int64 id = 1;
}
message User {
int64 id = 1;
string name = 2;
int32 sex = 3;
int32 birthday = 4;
string email = 5;
string mobile = 6;
string address = 7;
string icon = 8;
repeated int32 permissions = 9;
int32 status = 10;
int64 createTime = 11;
int64 updateTime = 12;
}
message CreateUserResponse {
bool success = 1;
}
message ListUserRequest {
int32 pageNo = 1;
}
message UserPage {
int32 pageNo = 1;
int32 total = 2;
repeated User result = 3;
}
================================================
FILE: grpc-server/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-server.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-server.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<appender-ref ref="console" />
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: hprose-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>hprose-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>hprose-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.hprose>2.0.38</version.hprose>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.hprose</groupId>
<artifactId>hprose-java</artifactId>
<version>${version.hprose}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.19</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.19</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Client</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: hprose-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.service.UserService;
import hprose.client.HproseTcpClient;
@State(Scope.Benchmark)
public class Client extends AbstractClient {
public static final int CONCURRENCY = 32;
private final HproseTcpClient client = new HproseTcpClient("tcp://benchmark-server:8080");
private final UserService userService = client.useService(UserService.class);
public Client() {
client.setFullDuplex(true);
client.setNoDelay(true);
}
@Override
protected UserService getUserService() {
return userService;
}
@TearDown
public void close() throws IOException {
client.close();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean existUser() throws Exception {
return super.existUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public boolean createUser() throws Exception {
return super.createUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public User getUser() throws Exception {
return super.getUser();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Override
public Page<User> listUser() throws Exception {
return super.listUser();
}
public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
// HproseTcpClient client = new HproseTcpClient("tcp://127.0.0.1:8080");
// UserService userService = client.useService(UserService.class);
// System.out.println(userService.existUser("1"));
}
}
================================================
FILE: hprose-client/src/main/resources/consumer.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 -->
<dubbo:application name="benchmark.rpc.dubbo-client" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="userService" check="false"
interface="benchmark.service.UserService" url="dubbo://localhost:8080" />
</beans>
================================================
FILE: hprose-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>hprose-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>hprose-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.hprose>2.0.38</version.hprose>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.hprose</groupId>
<artifactId>hprose-java</artifactId>
<version>${version.hprose}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Server</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: hprose-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import benchmark.service.UserServiceServerImpl;
import hprose.server.HproseTcpServer;
public class Server {
public static void main(String[] args) throws Exception {
HproseTcpServer server = new HproseTcpServer("benchmark-server", 8080);
server.add(new UserServiceServerImpl());
server.start();
System.out.println("START");
Thread.sleep(Long.MAX_VALUE);
}
}
================================================
FILE: hprose-server/src/main/resources/provider.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="benchmark.rpc.dubbo-server" />
<!-- 用dubbo协议在8080端口暴露服务 -->
<dubbo:protocol name="dubbo" port="8080" />
<dubbo:registry address="N/A" />
<!-- 声明需要暴露的服务接口 -->
<dubbo:service interface="benchmark.service.UserService"
ref="userService" />
<!-- 和本地bean一样实现服务 -->
<bean id="userService" class="benchmark.service.UserServiceServerImpl" />
</beans>
================================================
FILE: jupiter-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>jupiter-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>jupiter-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.jupiter>1.3.1-beta-1</version.jupiter>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.jupiter-rpc</groupId>
<artifactId>jupiter-all</artifactId>
<version>${version.jupiter}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/org.jupiter.rpc.provider.processor.ProviderExecutorFactory</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>benchmark.rpc.Client</Main-Class>
<X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: jupiter-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.jupiter.common.util.SystemPropertyUtil;
import org.jupiter.rpc.DefaultClient;
import org.jupiter.rpc.JClient;
import org.jupiter.rpc.consumer.ProxyFactory;
import org.jupiter.transport.JConfig;
import org.jupiter.transport.JConnection;
import org.jupiter.transport.JConnector;
import org.jupiter.transport.JOption;
import org.jupiter.transport.UnresolvedAddress;
import org.jupiter.transport.UnresolvedSocketAddress;
import org.jupiter.transport.netty.JNettyTcpConnector;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import benchmark.bean.Page;
import benchmark.bean.User;
import benchmark.service.JupiterUserService;
import benchmark.service.UserService;
import benchmark.service.UserServiceServerImpl;
import io.netty.util.ResourceLeakDetector;
@State(Scope.Benchmark)
public class Client {
public static final int CONCURRENCY = 32;
private final AtomicInteger counter = new AtomicInteger(0);
private final UserService _serviceUserService = new UserServiceServerImpl();
private final JupiterUserService userService;
private final JClient client;
public Client() {
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED);
SystemPropertyUtil
.setProperty("jupiter.executor.factory.consumer.factory_name", "callerRuns");
SystemPropertyUtil.setProperty("jupiter.tracing.needed", "false");
client = new DefaultClient().withConnector(new JNettyTcpConnector(true));
JConfig config = client.connector().config();
config.setOption(JOption.WRITE_BUFFER_HIGH_WATER_MARK, 2048 * 1024);
config.setOption(JOption.WRITE_BUFFER_LOW_WATER_MARK, 1024 * 1024);
config.setOption(JOption.SO_RCVBUF, 256 * 1024);
config.setOption(JOption.SO_SNDBUF, 256 * 1024);
int workers = Runtime.getRuntime().availableProcessors();
UnresolvedAddress[] addresses = new UnresolvedAddress[workers];
JConnector<JConnection> connector = client.connector();
for (int i = 0; i < addresses.length; i++) {
addresses[i] = new UnresolvedSocketAddress("benchmark-server", 18090);
JConnection connection = connector.connect(addresses[i]);
connector.connectionManager().manage(connection);
}
userService = ProxyFactory.factory(JupiterUserService.class).client(client).addProviderAddress(addresses)
.newProxyInstance();
}
@TearDown
public void close() throws IOException {
client.shutdownGracefully();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public boolean existUser() throws Exception {
String email = String.valueOf(counter.getAndIncrement());
return userService.existUser(email).join();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public boolean createUser() throws Exception {
int id = counter.getAndIncrement();
User user = _serviceUserService.getUser(id);
return userService.createUser(user).join();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public User getUser() throws Exception {
int id = counter.getAndIncrement();
return userService.getUser(id).join();
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public Page<User> listUser() throws Exception {
int pageNo = counter.getAndIncrement();
return userService.listUser(pageNo).join();
}
public static void main(String[] args) throws Exception {
Client client = new Client();
System.out.println(client.getUser());
client.close();
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
}
}
================================================
FILE: jupiter-client/src/main/java/benchmark/service/JupiterUserService.java
================================================
package benchmark.service;
import java.util.concurrent.CompletableFuture;
import org.jupiter.rpc.ServiceProvider;
import benchmark.bean.Page;
import benchmark.bean.User;
@ServiceProvider(group = "test", name = "jupiterUserService")
public interface JupiterUserService {
CompletableFuture<Boolean> existUser(String email);
CompletableFuture<Boolean> createUser(User user);
CompletableFuture<User> getUser(long id);
CompletableFuture<Page<User>> listUser(int pageNo);
}
================================================
FILE: jupiter-client/src/main/resources/META-INF/services/org.jupiter.rpc.consumer.processor.ConsumerExecutorFactory
================================================
org.jupiter.rpc.executor.CallerRunsExecutorFactory
org.jupiter.rpc.executor.DisruptorExecutorFactory
================================================
FILE: jupiter-client/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-server.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-server.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<appender-ref ref="console" />
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: jupiter-client/src/main/resources/spring-consumer.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2015 The Jupiter Project
~
~ 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.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jupiter="http://www.jupiter-rpc.org/jupiter"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.jupiter-rpc.org/jupiter
http://www.jupiter-rpc.org/jupiter/jupiter.xsd">
<jupiter:client id="jupiterClient" registryType="default">
<jupiter:property registryServerAddresses="benchmark-server:20001" />
<!-- 可选配置 -->
<!--
String registryServerAddresses // 注册中心地址 [host1:port1,host2:port2....]
String providerServerAddresses // IP直连到providers [host1:port1,host2:port2....]
-->
</jupiter:client>
<!-- consumer -->
<jupiter:consumer id="jupiterUserService" client="jupiterClient" interfaceClass="benchmark.service.JupiterUserService">
<!-- 以下都选项可不填 -->
<!-- 服务版本号, 通常在接口不兼容时版本号才需要升级 -->
<jupiter:property version="1.0.0" />
<!-- 序列化/反序列化类型: (proto_stuff, hessian, kryo, java)可选, 默认proto_stuff -->
<jupiter:property serializerType="proto_stuff" />
<!-- 软负载均衡类型[random, round_robin] -->
<jupiter:property loadBalancerType="round_robin" />
<!-- 派发方式: (round, broadcast)可选, 默认round(单播) -->
<jupiter:property dispatchType="round" />
<!-- 调用方式: (sync, async)可选, 默认sync(同步调用) -->
<jupiter:property invokeType="sync" />
<!-- 集群容错策略: (fail_fast, fail_over, fail_safe)可选, 默认fail_fast(快速失败) -->
<jupiter:property clusterStrategy="fail_fast" />
<!-- 在fail_over策略下的失败重试次数 -->
<jupiter:property failoverRetries="2" />
<!-- 超时时间设置 -->
<jupiter:property timeoutMillis="60000" />
<!-- 可选配置 -->
<!--
SerializerType serializerType // 序列化/反序列化方式
LoadBalancerType loadBalancerType // 软负载均衡类型[random, round_robin]
long waitForAvailableTimeoutMillis = -1 // 如果大于0, 表示阻塞等待直到连接可用并且该值为等待时间
InvokeType invokeType // 调用方式 [同步, 异步]
DispatchType dispatchType // 派发方式 [单播, 广播]
long timeoutMillis // 调用超时时间设置
List<MethodSpecialConfig> methodSpecialConfigs; // 指定方法的单独配置, 方法参数类型不做区别对待
ConsumerHook[] hooks // consumer hook
String providerAddresses // provider地址列表, 逗号分隔(IP直连)
ClusterInvoker.Strategy clusterStrategy; // 集群容错策略
int failoverRetries // fail_over的重试次数
-->
</jupiter:consumer>
</beans>
================================================
FILE: jupiter-server/.gitignore
================================================
/.apt_generated_tests/
================================================
FILE: jupiter-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>jupiter-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>jupiter-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.jupiter>1.3.1-beta-1</version.jupiter>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>org.jupiter-rpc</groupId>
<artifactId>jupiter-all</artifactId>
<version>${version.jupiter}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/org.jupiter.rpc.provider.processor.ProviderExecutorFactory</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>benchmark.rpc.Server</Main-Class>
<X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: jupiter-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import benchmark.service.JupiterUserServiceServerImpl;
import io.netty.util.ResourceLeakDetector;
import org.jupiter.common.util.SystemPropertyUtil;
import org.jupiter.rpc.DefaultServer;
import org.jupiter.rpc.JServer;
import org.jupiter.transport.JConfig;
import org.jupiter.transport.JOption;
import org.jupiter.transport.netty.JNettyTcpAcceptor;
public class Server {
public static void main(String[] args) throws InterruptedException {
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED);
try {
SystemPropertyUtil.setProperty("jupiter.executor.factory.provider.factory_name", "callerRuns");
SystemPropertyUtil.setProperty("jupiter.executor.factory.affinity.thread", "true");
SystemPropertyUtil.setProperty("jupiter.tracing.needed", "false");
JServer server = new DefaultServer().withAcceptor(new JNettyTcpAcceptor(18090, true));
JConfig config = server.acceptor().configGroup().child();
config.setOption(JOption.WRITE_BUFFER_HIGH_WATER_MARK, 2048 * 1024);
config.setOption(JOption.WRITE_BUFFER_LOW_WATER_MARK, 1024 * 1024);
config.setOption(JOption.SO_RCVBUF, 256 * 1024);
config.setOption(JOption.SO_SNDBUF, 256 * 1024);
server.serviceRegistry().provider(new JupiterUserServiceServerImpl()).register();
server.start(false);
System.out.println("Jupiter started");
Thread.sleep(java.lang.Integer.MAX_VALUE);
} catch (Throwable t) {
t.printStackTrace();
}
}
}
================================================
FILE: jupiter-server/src/main/java/benchmark/service/JupiterUserService.java
================================================
package benchmark.service;
import java.util.concurrent.CompletableFuture;
import org.jupiter.rpc.ServiceProvider;
import benchmark.bean.Page;
import benchmark.bean.User;
@ServiceProvider(group = "test", name = "jupiterUserService")
public interface JupiterUserService {
CompletableFuture<Boolean> existUser(String email);
CompletableFuture<Boolean> createUser(User user);
CompletableFuture<User> getUser(long id);
CompletableFuture<Page<User>> listUser(int pageNo);
}
================================================
FILE: jupiter-server/src/main/java/benchmark/service/JupiterUserServiceServerImpl.java
================================================
package benchmark.service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.jupiter.rpc.ServiceProviderImpl;
import benchmark.bean.Page;
import benchmark.bean.User;
/**
* only for server
*
* @author Hank
*
*/
@ServiceProviderImpl(version = "1.0.0")
public class JupiterUserServiceServerImpl implements JupiterUserService {
@Override
public CompletableFuture<Boolean> existUser(String email) {
if (email == null || email.isEmpty()) {
return CompletableFuture.completedFuture(Boolean.TRUE);
}
if (email.charAt(email.length() - 1) < '5') {
return CompletableFuture.completedFuture(Boolean.FALSE);
}
return CompletableFuture.completedFuture(Boolean.TRUE);
}
@Override
public CompletableFuture<User> getUser(long id) {
User user = new User();
user.setId(id);
user.setName(new String("Doug Lea"));
user.setSex(1);
user.setBirthday(LocalDate.of(1968, 12, 8));
user.setEmail(new String("dong.lea@gmail.com"));
user.setMobile(new String("18612345678"));
user.setAddress(new String("北京市 中关村 中关村大街1号 鼎好大厦 1605"));
user.setIcon(new String("https://www.baidu.com/img/bd_logo1.png"));
user.setStatus(1);
user.setCreateTime(LocalDateTime.now());
user.setUpdateTime(user.getCreateTime());
List<java.lang.Integer> permissions = new ArrayList<java.lang.Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
return CompletableFuture.completedFuture(user);
}
@Override
public CompletableFuture<Page<User>> listUser(int pageNo) {
List<User> userList = new ArrayList<>(15);
for (int i = 0; i < 15; i++) {
User user = new User();
user.setId(i);
user.setName("Doug Lea" + i);
user.setSex(1);
user.setBirthday(LocalDate.of(1968, 12, 8));
user.setEmail("dong.lea@gmail.com" + i);
user.setMobile("18612345678" + i);
user.setAddress("北京市 中关村 中关村大街1号 鼎好大厦 1605" + i);
user.setIcon("https://www.baidu.com/img/bd_logo1.png" + i);
user.setStatus(1);
user.setCreateTime(LocalDateTime.now());
user.setUpdateTime(user.getCreateTime());
List<java.lang.Integer> permissions = new ArrayList<java.lang.Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
userList.add(user);
}
Page<User> page = new Page<>();
page.setPageNo(pageNo);
page.setTotal(1000);
page.setResult(userList);
return CompletableFuture.completedFuture(page);
}
@Override
public CompletableFuture<Boolean> createUser(User user) {
if (user == null) {
return CompletableFuture.completedFuture(Boolean.FALSE);
}
return CompletableFuture.completedFuture(Boolean.TRUE);
}
}
================================================
FILE: jupiter-server/src/main/resources/META-INF/services/org.jupiter.rpc.provider.processor.ProviderExecutorFactory
================================================
org.jupiter.rpc.executor.DisruptorExecutorFactory
org.jupiter.rpc.executor.CallerRunsExecutorFactory
org.jupiter.rpc.executor.ForkJoinPoolExecutorFactory
================================================
FILE: jupiter-server/src/main/resources/logback.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="rollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/benchmark-rpc-server.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/benchmark-rpc-server.%d{yyyy-MM-dd}.log.gz
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<!-- project default level -->
<logger name="benchmark.rpc" level="INFO" />
<root level="WARN">
<appender-ref ref="console" />
<appender-ref ref="rollingFile" />
</root>
</configuration>
================================================
FILE: jupiter-server/src/main/resources/spring-provider.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright (c) 2015 The Jupiter Project ~ ~ 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. -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jupiter="http://www.jupiter-rpc.org/jupiter"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.jupiter-rpc.org/jupiter
http://www.jupiter-rpc.org/jupiter/jupiter.xsd">
<jupiter:server id="jupiterServer" registryType="default">
<jupiter:property registryServerAddresses="benchmark-server:20001" />
<!-- 可选配置 -->
<!-- String registryServerAddresses // 注册中心地址 [host1:port1,host2:port2....]
ProviderInterceptor[] providerInterceptors // 全局拦截器 FlowController<JRequest>
flowController // 全局流量控制 -->
</jupiter:server>
<!-- provider -->
<bean id="jupiterUserService" class="benchmark.service.JupiterUserServiceServerImpl" />
<jupiter:provider id="jupiterUserServiceProvider"
server="jupiterServer" providerImpl="jupiterUserService">
<jupiter:property weight="100" />
</jupiter:provider>
</beans>
================================================
FILE: motan-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>motan-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>motan-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.motan>1.1.3</version.motan>
<version.spring>5.1.4.RELEASE</version.spring>
<version.slf4j>1.7.25</version.slf4j>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-core</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-transport-netty</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-springsupport</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>serialization-extension</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${version.spring}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Client</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/com.weibo.api.motan.codec.Serialization</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: motan-client/src/main/java/benchmark/bean/MotanUser.java
================================================
package benchmark.bean;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
public class MotanUser implements Serializable {
private static final long serialVersionUID = -2058903653284131263L;
private long id;
private String name;
private int sex;
private Date birthday;
private String email;
private String mobile;
private String address;
private String icon;
private List<Integer> permissions;
private int status;
private Date createTime;
private Date updateTime;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public List<Integer> getPermissions() {
return permissions;
}
public void setPermissions(List<Integer> permissions) {
this.permissions = permissions;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "MotanUser{" +
"id=" + id +
", name='" + name + '\'' +
", sex=" + sex +
", birthday=" + birthday +
", email='" + email + '\'' +
", mobile='" + mobile + '\'' +
", address='" + address + '\'' +
", icon='" + icon + '\'' +
", permissions=" + permissions +
", status=" + status +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
================================================
FILE: motan-client/src/main/java/benchmark/rpc/Client.java
================================================
package benchmark.rpc;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.weibo.api.motan.closable.ShutDownHook;
import com.weibo.api.motan.util.StatsUtil;
import benchmark.bean.MotanUser;
import benchmark.bean.Page;
import benchmark.service.MotanUserService;
import benchmark.service.MotanUserServiceServerImpl;
@State(Scope.Benchmark)
public class Client {
public static final int CONCURRENCY = 32;
private final AtomicInteger counter = new AtomicInteger(0);
private final MotanUserService _serviceUserService = new MotanUserServiceServerImpl();
private final ClassPathXmlApplicationContext context;
private final MotanUserService userService;
public Client() {
context = new ClassPathXmlApplicationContext("motan_client.xml");
context.start();
userService = (MotanUserService) context.getBean("userService"); // 获取远程服务代理
}
@TearDown
public void close() throws IOException {
context.close();
ShutDownHook.runHook(true);
if (!StatsUtil.executorService.isShutdown()) {
StatsUtil.executorService.shutdownNow();
}
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public boolean existUser() throws Exception {
String email = String.valueOf(counter.getAndIncrement());
return userService.existUser(email);
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public boolean createUser() throws Exception {
int id = counter.getAndIncrement();
MotanUser user = _serviceUserService.getUser(id);
return userService.createUser(user);
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public MotanUser getUser() throws Exception {
int id = counter.getAndIncrement();
return userService.getUser(id);
}
@Benchmark
@BenchmarkMode({ Mode.Throughput, Mode.AverageTime, Mode.SampleTime })
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public Page<MotanUser> listUser() throws Exception {
int pageNo = counter.getAndIncrement();
return userService.listUser(pageNo);
}
public static void main(String[] args) throws Exception {
Client client = new Client();
for (int i = 0; i < 60; i++) {
try {
System.out.println(client.getUser().getAddress());
break;
} catch (Exception e) {
e.printStackTrace();
Thread.sleep(1000);
}
}
client.close();
Options opt = new OptionsBuilder()//
.include(Client.class.getSimpleName())//
.warmupIterations(3)//
.warmupTime(TimeValue.seconds(10))//
.measurementIterations(3)//
.measurementTime(TimeValue.seconds(10))//
.threads(CONCURRENCY)//
.forks(1)//
.build();
new Runner(opt).run();
System.exit(1);
// Client client = new Client();
// System.out.println(client.getUser());
}
}
================================================
FILE: motan-client/src/main/java/benchmark/service/MotanUserService.java
================================================
package benchmark.service;
import benchmark.bean.MotanUser;
import benchmark.bean.Page;
public interface MotanUserService {
public boolean existUser(String email);
public boolean createUser(MotanUser user);
public MotanUser getUser(long id);
public Page<MotanUser> listUser(int pageNo);
}
================================================
FILE: motan-client/src/main/java/benchmark/service/MotanUserServiceServerImpl.java
================================================
package benchmark.service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import benchmark.bean.MotanUser;
import benchmark.bean.Page;
/**
* only for server
*
* @author Hank
*
*/
public class MotanUserServiceServerImpl implements MotanUserService {
@Override
public boolean existUser(String email) {
if (email == null || email.isEmpty()) {
return true;
}
if (email.charAt(email.length() - 1) < '5') {
return false;
}
return true;
}
@Override
public MotanUser getUser(long id) {
MotanUser user = new MotanUser();
user.setId(id);
user.setName(new String("Doug Lea"));
user.setSex(1);
user.setBirthday(new Date());
user.setEmail(new String("dong.lea@gmail.com"));
user.setMobile(new String("18612345678"));
user.setAddress(new String("北京市 中关村 中关村大街1号 鼎好大厦 1605"));
user.setIcon(new String("https://www.baidu.com/img/bd_logo1.png"));
user.setStatus(1);
user.setCreateTime(new Date());
user.setUpdateTime(new Date());
List<java.lang.Integer> permissions = new ArrayList<java.lang.Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
return user;
}
@Override
public Page<MotanUser> listUser(int pageNo) {
List<MotanUser> userList = new ArrayList<>(15);
for (int i = 0; i < 15; i++) {
MotanUser user = new MotanUser();
user.setId(i);
user.setName("Doug Lea" + i);
user.setSex(1);
user.setBirthday(new Date());
user.setEmail("dong.lea@gmail.com" + i);
user.setMobile("18612345678" + i);
user.setAddress("北京市 中关村 中关村大街1号 鼎好大厦 1605" + i);
user.setIcon("https://www.baidu.com/img/bd_logo1.png" + i);
user.setStatus(1);
user.setCreateTime(new Date());
user.setUpdateTime(new Date());
List<java.lang.Integer> permissions = new ArrayList<java.lang.Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
userList.add(user);
}
Page<MotanUser> page = new Page<>();
page.setPageNo(pageNo);
page.setTotal(1000);
page.setResult(userList);
return page;
}
@Override
public boolean createUser(MotanUser user) {
if (user == null) {
return false;
}
return true;
}
}
================================================
FILE: motan-client/src/main/resources/motan_client.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:motan="http://api.weibo.com/schema/motan"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://api.weibo.com/schema/motan http://api.weibo.com/schema/motan.xsd">
<!-- 注册中心配置 使用不同注册中心需要依赖对应的jar包。 -->
<motan:registry regProtocol="local" name="localRegistry"
check="false" />
<!-- motan协议配置 -->
<motan:protocol default="true" name="motan" haStrategy="failfast"
loadbalance="roundrobin" maxClientConnection="10" minClientConnection="2" />
<!-- 通用referer基础配置 -->
<motan:basicReferer requestTimeout="5000" accessLog="false"
retries="1" group="motan-benchmark-rpc" module="motan-benchmark-rpc"
application="myMotanBenchmark" protocol="motan" registry="localRegistry"
id="motanClientBasicConfig" throwException="false" check="false" />
<!-- 具体referer配置。使用方通过beanid使用服务接口类 -->
<motan:referer id="userService" directUrl="benchmark-server:8080"
interface="benchmark.service.MotanUserService" connectTimeout="5000"
requestTimeout="5000" basicReferer="motanClientBasicConfig" />
</beans>
================================================
FILE: motan-server/.gitignore
================================================
/.apt_generated_tests/
================================================
FILE: motan-server/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>motan-server</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>motan-server</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<version.motan>1.1.3</version.motan>
<version.spring>5.1.4.RELEASE</version.spring>
<version.slf4j>1.7.25</version.slf4j>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-core</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-transport-netty</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-extension</artifactId>
<version>${version.motan}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-springsupport</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>serialization-extension</artifactId>
<version>${version.motan}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${version.spring}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>benchmark.rpc.Server</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/com.weibo.api.motan.codec.Serialization</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
================================================
FILE: motan-server/src/main/java/benchmark/bean/MotanUser.java
================================================
package benchmark.bean;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
public class MotanUser implements Serializable {
private static final long serialVersionUID = -2058903653284131263L;
private long id;
private String name;
private int sex;
private Date birthday;
private String email;
private String mobile;
private String address;
private String icon;
private List<Integer> permissions;
private int status;
private Date createTime;
private Date updateTime;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public List<Integer> getPermissions() {
return permissions;
}
public void setPermissions(List<Integer> permissions) {
this.permissions = permissions;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "MotanUser{" +
"id=" + id +
", name='" + name + '\'' +
", sex=" + sex +
", birthday=" + birthday +
", email='" + email + '\'' +
", mobile='" + mobile + '\'' +
", address='" + address + '\'' +
", icon='" + icon + '\'' +
", permissions=" + permissions +
", status=" + status +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
================================================
FILE: motan-server/src/main/java/benchmark/rpc/Server.java
================================================
package benchmark.rpc;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Server {
public static void main(String[] args) throws InterruptedException {
try (ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("motan_server.xml");) {
context.start();
Thread.sleep(Integer.MAX_VALUE);
}
}
}
================================================
FILE: motan-server/src/main/java/benchmark/service/MotanUserService.java
================================================
package benchmark.service;
import benchmark.bean.MotanUser;
import benchmark.bean.Page;
public interface MotanUserService {
public boolean existUser(String email);
public boolean createUser(MotanUser user);
public MotanUser getUser(long id);
public Page<MotanUser> listUser(int pageNo);
}
================================================
FILE: motan-server/src/main/java/benchmark/service/MotanUserServiceServerImpl.java
================================================
package benchmark.service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import benchmark.bean.MotanUser;
import benchmark.bean.Page;
/**
* only for server
*
* @author Hank
*
*/
public class MotanUserServiceServerImpl implements MotanUserService {
@Override
public boolean existUser(String email) {
if (email == null || email.isEmpty()) {
return true;
}
if (email.charAt(email.length() - 1) < '5') {
return false;
}
return true;
}
@Override
public MotanUser getUser(long id) {
MotanUser user = new MotanUser();
user.setId(id);
user.setName(new String("Doug Lea"));
user.setSex(1);
user.setBirthday(new Date());
user.setEmail(new String("dong.lea@gmail.com"));
user.setMobile(new String("18612345678"));
user.setAddress(new String("北京市 中关村 中关村大街1号 鼎好大厦 1605"));
user.setIcon(new String("https://www.baidu.com/img/bd_logo1.png"));
user.setStatus(1);
user.setCreateTime(new Date());
user.setUpdateTime(new Date());
List<java.lang.Integer> permissions = new ArrayList<java.lang.Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
return user;
}
@Override
public Page<MotanUser> listUser(int pageNo) {
List<MotanUser> userList = new ArrayList<>(15);
for (int i = 0; i < 15; i++) {
MotanUser user = new MotanUser();
user.setId(i);
user.setName("Doug Lea" + i);
user.setSex(1);
user.setBirthday(new Date());
user.setEmail("dong.lea@gmail.com" + i);
user.setMobile("18612345678" + i);
user.setAddress("北京市 中关村 中关村大街1号 鼎好大厦 1605" + i);
user.setIcon("https://www.baidu.com/img/bd_logo1.png" + i);
user.setStatus(1);
user.setCreateTime(new Date());
user.setUpdateTime(new Date());
List<java.lang.Integer> permissions = new ArrayList<java.lang.Integer>(
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 19, 88, 86, 89, 90, 91, 92));
user.setPermissions(permissions);
userList.add(user);
}
Page<MotanUser> page = new Page<>();
page.setPageNo(pageNo);
page.setTotal(1000);
page.setResult(userList);
return page;
}
@Override
public boolean createUser(MotanUser user) {
if (user == null) {
return false;
}
return true;
}
}
================================================
FILE: motan-server/src/main/resources/motan_server.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:motan="http://api.weibo.com/schema/motan"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://api.weibo.com/schema/motan http://api.weibo.com/schema/motan.xsd">
<!-- 业务具体实现类 -->
<bean id="userServiceImpl" class="benchmark.service.MotanUserServiceServerImpl" />
<!-- 注册中心配置 使用不同注册中心需要依赖对应的jar包。如果不使用注册中心,可以把check属性改为false,忽略注册失败。 -->
<motan:registry regProtocol="local" name="localRegistry"
check="false" />
<!-- 协议配置。为防止多个业务配置冲突,推荐使用id表示具体协议。 -->
<motan:protocol id="benchmarkMotan" default="true" name="motan"
requestTimeout="5000" maxServerConnection="100000" maxContentLength="1048576"
maxWorkerThread="800" minWorkerThread="20" />
<!-- 通用配置,多个rpc服务使用相同的基础配置. group和module定义具体的服务池。export格式为“protocol id:提供服务的端口” -->
<motan:basicService requestTimeout="5000"
host="benchmark-server" export="benchmarkMotan:8080" group="motan-benchmark-rpc"
accessLog="false" shareChannel="true" module="motan-benchmark-rpc"
application="myMotanBenchmark" registry="localRegistry" id="serviceBasicConfig" />
<!-- 具体rpc服务配置,声明实现的接口类。需要根据业务情况设置合适的超时时间 -->
<motan:service interface="benchmark.service.MotanUserService"
ref="userServiceImpl" export="benchmarkMotan:8080" basicService="serviceBasicConfig"
requestTimeout="5000">
</motan:service>
</beans>
================================================
FILE: netty-client/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>benchmark.rpc</groupId>
<artifactId>netty-client</artifactId>
<version>round-5</version>
<packaging>jar</packaging>
<name>netty-client</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.benchmark-base>round-5</version.benchmark-base>
<netty.version>4.1.33.Final</netty.version>
</properties>
<dependencies>
<dependency>
<groupId>benchmark.rpc</groupId>
<artifactId>benchmark-base</artifactId>
<version>${version.benchmark-base}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>${n
gitextract_s2n0yisx/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── armeria-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── armeria-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ ├── rpc/
│ │ └── Server.java
│ └── service/
│ └── ArmeriaUserServiceServerImpl.java
├── benchmark-base/
│ ├── .java-version
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ ├── bean/
│ │ ├── Page.java
│ │ └── User.java
│ ├── pool/
│ │ ├── ConcurrentObjectPool.java
│ │ ├── LockObjectPool.java
│ │ ├── UnsafeUtils.java
│ │ ├── ViberObjectPool.java
│ │ └── WaitStrategy.java
│ ├── rpc/
│ │ ├── AbstractClient.java
│ │ ├── protocol/
│ │ │ ├── Request.java
│ │ │ └── Response.java
│ │ ├── route/
│ │ │ └── RouteService.java
│ │ └── util/
│ │ ├── ByteBufferUtils.java
│ │ ├── HttpClientUtils.java
│ │ └── JsonUtils.java
│ └── service/
│ ├── ServiceRegister.java
│ ├── UserService.java
│ ├── UserServiceJsonHttpClientImpl.java
│ └── UserServiceServerImpl.java
├── benchmark.java
├── brpc-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ └── logback.xml
├── brpc-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ └── logback.xml
├── dubbo-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ ├── consumer.xml
│ └── logback.xml
├── dubbo-kryo-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ ├── consumer.xml
│ └── logback.xml
├── dubbo-kryo-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ ├── logback.xml
│ └── provider.xml
├── dubbo-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ ├── logback.xml
│ └── provider.xml
├── grpc-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── grpc/
│ │ ├── GrpcUserServiceClient.java
│ │ └── UserServiceGrpcClientImpl.java
│ ├── proto/
│ │ └── UserService.proto
│ └── resources/
│ └── logback.xml
├── grpc-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── grpc/
│ │ └── server/
│ │ └── UserServiceGrpcServerImpl.java
│ ├── proto/
│ │ └── UserService.proto
│ └── resources/
│ └── logback.xml
├── hprose-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ └── consumer.xml
├── hprose-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ └── provider.xml
├── jupiter-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── rpc/
│ │ │ └── Client.java
│ │ └── service/
│ │ └── JupiterUserService.java
│ └── resources/
│ ├── META-INF/
│ │ └── services/
│ │ └── org.jupiter.rpc.consumer.processor.ConsumerExecutorFactory
│ ├── logback.xml
│ └── spring-consumer.xml
├── jupiter-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── rpc/
│ │ │ └── Server.java
│ │ └── service/
│ │ ├── JupiterUserService.java
│ │ └── JupiterUserServiceServerImpl.java
│ └── resources/
│ ├── META-INF/
│ │ └── services/
│ │ └── org.jupiter.rpc.provider.processor.ProviderExecutorFactory
│ ├── logback.xml
│ └── spring-provider.xml
├── motan-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── bean/
│ │ │ └── MotanUser.java
│ │ ├── rpc/
│ │ │ └── Client.java
│ │ └── service/
│ │ ├── MotanUserService.java
│ │ └── MotanUserServiceServerImpl.java
│ └── resources/
│ └── motan_client.xml
├── motan-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── bean/
│ │ │ └── MotanUser.java
│ │ ├── rpc/
│ │ │ └── Server.java
│ │ └── service/
│ │ ├── MotanUserService.java
│ │ └── MotanUserServiceServerImpl.java
│ └── resources/
│ └── motan_server.xml
├── netty-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── netty/
│ │ ├── client/
│ │ │ ├── NettyClientConnector.java
│ │ │ ├── UserServiceNettyClientImpl.java
│ │ │ ├── codec/
│ │ │ │ ├── ProtocolDecoder.java
│ │ │ │ └── ProtocolEncoder.java
│ │ │ ├── future/
│ │ │ │ └── FutureContainer.java
│ │ │ └── handler/
│ │ │ ├── BenchmarkChannelInitializer.java
│ │ │ └── BenchmarkClientHandler.java
│ │ └── serializer/
│ │ ├── BooleanSerializer.java
│ │ ├── FastestSerializer.java
│ │ ├── IntegerSerializer.java
│ │ ├── LocalDateSerializer.java
│ │ ├── LocalDateTimeSerializer.java
│ │ ├── LocalTimeSerializer.java
│ │ ├── LongSerializer.java
│ │ ├── ObjectSerializer.java
│ │ ├── Register.java
│ │ ├── RequestSerializer.java
│ │ ├── ResponseSerializer.java
│ │ ├── Serializer.java
│ │ ├── StringSerializer.java
│ │ ├── UserPageSerializer.java
│ │ ├── UserSerializer.java
│ │ └── VoidSerializer.java
│ └── resources/
│ └── logback.xml
├── netty-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ ├── Server.java
│ └── netty/
│ ├── serializer/
│ │ ├── BooleanSerializer.java
│ │ ├── FastestSerializer.java
│ │ ├── IntegerSerializer.java
│ │ ├── LocalDateSerializer.java
│ │ ├── LocalDateTimeSerializer.java
│ │ ├── LocalTimeSerializer.java
│ │ ├── LongSerializer.java
│ │ ├── ObjectSerializer.java
│ │ ├── Register.java
│ │ ├── RequestSerializer.java
│ │ ├── ResponseSerializer.java
│ │ ├── Serializer.java
│ │ ├── StringSerializer.java
│ │ ├── UserPageSerializer.java
│ │ ├── UserSerializer.java
│ │ └── VoidSerializer.java
│ └── server/
│ ├── codec/
│ │ ├── ProtocolDecoder.java
│ │ └── ProtocolEncoder.java
│ └── handler/
│ ├── BenchmarkChannelInitializer.java
│ └── BenchmarkServerHandler.java
├── pom.xml
├── rapidoid-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── rapidoid-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ ├── Server.java
│ └── rapidoid/
│ └── server/
│ ├── CreateUserController.java
│ ├── GetUserController.java
│ ├── ListUserController.java
│ └── UserExistController.java
├── rsocket-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── rsocket/
│ │ └── UserServiceRsocketClientImpl.java
│ └── proto/
│ └── UserService.proto
├── rsocket-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── rsocket/
│ │ └── server/
│ │ └── UserServiceRsocketServerImpl.java
│ └── proto/
│ └── UserService.proto
├── servicecomb-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ ├── META-INF/
│ │ └── spring/
│ │ └── benchmark.consumer.bean.xml
│ ├── config/
│ │ └── log4j.demo.properties
│ ├── log4j.properties
│ └── microservice.yaml
├── servicecomb-server/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ ├── rpc/
│ │ │ └── Server.java
│ │ └── service/
│ │ └── ServiceCombUserServiceServerImpl.java
│ └── resources/
│ ├── META-INF/
│ │ └── spring/
│ │ └── benchmark.provider.bean.xml
│ ├── config/
│ │ └── log4j.demo.properties
│ ├── log4j.properties
│ └── microservice.yaml
├── sofa-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Client.java
│ └── resources/
│ └── logback.xml
├── sofa-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ └── Server.java
│ └── resources/
│ └── logback.xml
├── springboot-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── springboot-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── springboot/
│ │ └── server/
│ │ ├── CreateUserController.java
│ │ ├── GetUserController.java
│ │ ├── ListUserController.java
│ │ └── UserExistController.java
│ └── resources/
│ └── application.yml
├── springboot-undertow-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── springboot-undertow-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── springboot/
│ │ └── server/
│ │ ├── CreateUserController.java
│ │ ├── GetUserController.java
│ │ ├── ListUserController.java
│ │ └── UserExistController.java
│ └── resources/
│ └── application.yml
├── springwebflux-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── springwebflux-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── webflux/
│ │ └── server/
│ │ ├── CreateUserController.java
│ │ ├── GetUserController.java
│ │ ├── ListUserController.java
│ │ └── UserExistController.java
│ └── resources/
│ └── application.yml
├── thrift-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── thrift/
│ │ ├── Converter.java
│ │ ├── TServiceClientNoPrint.java
│ │ ├── ThriftUserServiceClient.java
│ │ ├── User.java
│ │ ├── UserPage.java
│ │ ├── UserService.java
│ │ └── UserServiceThriftClientImpl.java
│ ├── resources/
│ │ └── logback.xml
│ └── thrift/
│ └── UserService.thrift
├── thrift-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── thrift/
│ │ ├── Converter.java
│ │ ├── User.java
│ │ ├── UserPage.java
│ │ ├── UserService.java
│ │ └── UserServiceThriftServerImpl.java
│ └── thrift/
│ ├── UserService.thrift
│ └── gen-java/
│ └── benchmark/
│ └── rpc/
│ └── thrift/
│ ├── User.java
│ ├── UserPage.java
│ └── UserService.java
├── turbo-rest-client/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ ├── rpc/
│ │ └── Client.java
│ └── service/
│ └── TurboUserServiceJsonHttpClientImpl.java
├── turbo-rest-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── service/
│ │ ├── TurboUserService.java
│ │ └── TurboUserServiceServerImpl.java
│ └── resources/
│ └── logback.xml
├── turbo-rpc-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Client.java
│ │ └── service/
│ │ └── TurboUserService.java
│ └── resources/
│ ├── logback.xml
│ └── turbo-client.conf
├── turbo-rpc-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── benchmark/
│ │ └── rpc/
│ │ ├── Server.java
│ │ └── service/
│ │ ├── TurboUserService.java
│ │ └── TurboUserServiceServerImpl.java
│ └── resources/
│ ├── logback.xml
│ └── turbo-server.conf
├── undertow-async-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
├── undertow-async-server/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ ├── benchmark/
│ │ │ └── rpc/
│ │ │ ├── Server.java
│ │ │ └── undertow/
│ │ │ └── server/
│ │ │ ├── CreateUserHandler.java
│ │ │ ├── GetUserHandler.java
│ │ │ ├── ListUserHandler.java
│ │ │ └── UserExistHandler.java
│ │ └── io/
│ │ └── undertow/
│ │ └── async/
│ │ ├── handler/
│ │ │ └── AsyncHttpHandler.java
│ │ ├── io/
│ │ │ ├── PooledByteBufferInputStream.java
│ │ │ └── PooledByteBufferOutputStream.java
│ │ └── util/
│ │ └── UnsafeUtils.java
│ └── resources/
│ └── logback.xml
├── undertow-client/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── benchmark/
│ └── rpc/
│ └── Client.java
└── undertow-server/
├── .gitignore
├── pom.xml
└── src/
└── main/
├── java/
│ └── benchmark/
│ └── rpc/
│ ├── Server.java
│ └── undertow/
│ └── server/
│ ├── CreateUserHandler.java
│ ├── GetUserHandler.java
│ ├── ListUserHandler.java
│ └── UserExistHandler.java
└── resources/
└── logback.xml
Showing preview only (222K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2617 symbols across 169 files)
FILE: armeria-client/src/main/java/benchmark/rpc/Client.java
class Client (line 22) | @State(Scope.Benchmark)
method getUserService (line 28) | @Override
method existUser (line 33) | @Benchmark
method createUser (line 41) | @Benchmark
method getUser (line 49) | @Benchmark
method listUser (line 57) | @Benchmark
method main (line 65) | public static void main(String[] args) throws RunnerException {
FILE: armeria-server/src/main/java/benchmark/rpc/Server.java
class Server (line 9) | public class Server {
method main (line 11) | public static void main(String[] args) throws Exception {
FILE: armeria-server/src/main/java/benchmark/service/ArmeriaUserServiceServerImpl.java
class ArmeriaUserServiceServerImpl (line 26) | public class ArmeriaUserServiceServerImpl {
method existUser (line 30) | @Get("/user-exist")
method getUser (line 45) | @Get("/get-user")
method listUser (line 67) | @Get("/list-user")
method createUser (line 100) | @Post("/create-user")
FILE: benchmark-base/src/main/java/benchmark/bean/Page.java
class Page (line 6) | public class Page<T> implements Serializable {
method getPageNo (line 13) | public int getPageNo() {
method setPageNo (line 17) | public void setPageNo(int pageNo) {
method getTotal (line 21) | public int getTotal() {
method setTotal (line 25) | public void setTotal(int total) {
method getResult (line 29) | public List<T> getResult() {
method setResult (line 33) | public void setResult(List<T> result) {
method toString (line 37) | @Override
FILE: benchmark-base/src/main/java/benchmark/bean/User.java
class User (line 8) | public class User implements Serializable {
method getId (line 24) | public long getId() {
method setId (line 28) | public void setId(long id) {
method getName (line 32) | public String getName() {
method setName (line 36) | public void setName(String name) {
method getSex (line 40) | public int getSex() {
method setSex (line 44) | public void setSex(int sex) {
method getBirthday (line 48) | public LocalDate getBirthday() {
method setBirthday (line 52) | public void setBirthday(LocalDate birthday) {
method getEmail (line 56) | public String getEmail() {
method setEmail (line 60) | public void setEmail(String email) {
method getMobile (line 64) | public String getMobile() {
method setMobile (line 68) | public void setMobile(String mobile) {
method getAddress (line 72) | public String getAddress() {
method setAddress (line 76) | public void setAddress(String address) {
method getIcon (line 80) | public String getIcon() {
method setIcon (line 84) | public void setIcon(String icon) {
method getPermissions (line 88) | public List<Integer> getPermissions() {
method setPermissions (line 92) | public void setPermissions(List<Integer> permissions) {
method getStatus (line 96) | public int getStatus() {
method setStatus (line 100) | public void setStatus(int status) {
method getCreateTime (line 104) | public LocalDateTime getCreateTime() {
method setCreateTime (line 108) | public void setCreateTime(LocalDateTime createTime) {
method getUpdateTime (line 112) | public LocalDateTime getUpdateTime() {
method setUpdateTime (line 116) | public void setUpdateTime(LocalDateTime updateTime) {
method toString (line 120) | @Override
FILE: benchmark-base/src/main/java/benchmark/pool/ConcurrentObjectPool.java
class ConcurrentObjectPool (line 15) | @SuppressWarnings("unchecked")
method ConcurrentObjectPool (line 36) | public ConcurrentObjectPool(int poolSize, Supplier<T> producer) {
method borrow (line 49) | public T borrow() {
method release (line 77) | public void release(final T t) {
method exchange (line 113) | private boolean exchange(final Object value) {
method cancelExchange (line 117) | private boolean cancelExchange(final Object value) {
method checkExchange (line 121) | private boolean checkExchange(final Object value) {
method exchange (line 125) | private T exchange() {
method close (line 137) | @Override
method offset (line 152) | private static final long offset(int key) {
FILE: benchmark-base/src/main/java/benchmark/pool/LockObjectPool.java
class LockObjectPool (line 16) | @SuppressWarnings("unchecked")
class ObjectWithLock (line 19) | static class ObjectWithLock {
method ObjectWithLock (line 23) | public ObjectWithLock(Object obj) {
method LockObjectPool (line 33) | public LockObjectPool(int poolSize, Supplier<T> producer) {
method borrow (line 48) | public T borrow() {
method release (line 57) | public void release(T t) {
method close (line 65) | @Override
FILE: benchmark-base/src/main/java/benchmark/pool/UnsafeUtils.java
class UnsafeUtils (line 5) | public class UnsafeUtils {
method unsafe (line 22) | public static final Unsafe unsafe() {
FILE: benchmark-base/src/main/java/benchmark/pool/ViberObjectPool.java
class ViberObjectPool (line 13) | public class ViberObjectPool<T> implements Closeable {
method ViberObjectPool (line 17) | public ViberObjectPool(int poolSize, Supplier<T> producer) {
method borrow (line 51) | public T borrow() {
method release (line 55) | public void release(T t) {
method close (line 63) | @Override
FILE: benchmark-base/src/main/java/benchmark/pool/WaitStrategy.java
class WaitStrategy (line 5) | public final class WaitStrategy {
method idle (line 7) | public final int idle(final int idleCounter) {
FILE: benchmark-base/src/main/java/benchmark/rpc/AbstractClient.java
class AbstractClient (line 10) | public abstract class AbstractClient {
method getUserService (line 14) | protected abstract UserService getUserService();
method existUser (line 16) | public boolean existUser() throws Exception {
method createUser (line 21) | public boolean createUser() throws Exception {
method getUser (line 27) | public User getUser() throws Exception {
method listUser (line 32) | public Page<User> listUser() throws Exception {
FILE: benchmark-base/src/main/java/benchmark/rpc/protocol/Request.java
class Request (line 6) | public class Request implements Serializable {
method getRequestId (line 13) | public long getRequestId() {
method setRequestId (line 17) | public void setRequestId(long requestId) {
method getServiceId (line 21) | public int getServiceId() {
method setServiceId (line 25) | public void setServiceId(int serviceId) {
method getParams (line 29) | public Object[] getParams() {
method setParams (line 33) | public void setParams(Object[] params) {
method toString (line 37) | @Override
FILE: benchmark-base/src/main/java/benchmark/rpc/protocol/Response.java
class Response (line 5) | public class Response implements Serializable {
method getRequestId (line 12) | public long getRequestId() {
method setRequestId (line 16) | public void setRequestId(long requestId) {
method getStatusCode (line 20) | public byte getStatusCode() {
method setStatusCode (line 24) | public void setStatusCode(byte statusCode) {
method getResult (line 28) | public Object getResult() {
method setResult (line 32) | public void setResult(Object result) {
method toString (line 36) | @Override
FILE: benchmark-base/src/main/java/benchmark/rpc/route/RouteService.java
class RouteService (line 12) | public class RouteService {
method invoke (line 16) | public Object invoke(int serviceId, Object[] params) {
FILE: benchmark-base/src/main/java/benchmark/rpc/util/ByteBufferUtils.java
class ByteBufferUtils (line 7) | public class ByteBufferUtils {
method allocateDirect (line 9) | public static ByteBuffer allocateDirect(String str) {
method allocate (line 13) | public static ByteBuffer allocate(String str) {
method allocate (line 17) | public static ByteBuffer allocate(byte[] bytes) {
method _allocateByteBuffer (line 21) | private static ByteBuffer _allocateByteBuffer(byte[] bytes, boolean is...
FILE: benchmark-base/src/main/java/benchmark/rpc/util/HttpClientUtils.java
class HttpClientUtils (line 9) | public class HttpClientUtils {
method createHttpClient (line 15) | public static CloseableHttpClient createHttpClient(int concurrency) {
FILE: benchmark-base/src/main/java/benchmark/rpc/util/JsonUtils.java
class JsonUtils (line 8) | public class JsonUtils {
FILE: benchmark-base/src/main/java/benchmark/service/ServiceRegister.java
type ServiceRegister (line 3) | public interface ServiceRegister {
FILE: benchmark-base/src/main/java/benchmark/service/UserService.java
type UserService (line 6) | public interface UserService {
method existUser (line 7) | public boolean existUser(String email);
method createUser (line 9) | public boolean createUser(User user);
method getUser (line 11) | public User getUser(long id);
method listUser (line 13) | public Page<User> listUser(int pageNo);
FILE: benchmark-base/src/main/java/benchmark/service/UserServiceJsonHttpClientImpl.java
class UserServiceJsonHttpClientImpl (line 27) | public class UserServiceJsonHttpClientImpl implements UserService {
method UserServiceJsonHttpClientImpl (line 39) | public UserServiceJsonHttpClientImpl(int concurrency) {
method existUser (line 43) | @Override
method createUser (line 59) | @Override
method getUser (line 78) | @Override
method listUser (line 94) | @Override
method main (line 110) | public static void main(String[] args) throws Exception {
FILE: benchmark-base/src/main/java/benchmark/service/UserServiceServerImpl.java
class UserServiceServerImpl (line 18) | public class UserServiceServerImpl implements UserService {
method existUser (line 20) | @Override
method getUser (line 33) | @Override
method listUser (line 57) | @Override
method createUser (line 91) | @Override
FILE: benchmark.java
class benchmark (line 13) | public class benchmark {
method main (line 22) | public static void main(String[] args) throws Exception {
method installBenchmarkBase (line 38) | private static void installBenchmarkBase() throws Exception {
method getAllTasks (line 42) | private static Stream<String> getAllTasks() {
method benchmark (line 51) | private static void benchmark(String taskName) {
method packageAndGet (line 68) | private static File packageAndGet(File project) throws Exception {
method taskName (line 88) | private static String taskName(File pkg) {
method startServer (line 98) | private static void startServer(File serverPackage) throws Exception {
method stopServer (line 131) | private static void stopServer(File serverPackage) throws Exception {
method startClient (line 144) | private static void startClient(File clientPackage) throws Exception {
method exec (line 156) | private static void exec(String path, String command) throws Exception {
method exec (line 164) | private static void exec(String command) throws Exception {
method exec (line 168) | private static void exec(File file, String command, File redirect) thr...
method exec (line 197) | private static void exec(String... commands) throws Exception {
method report (line 217) | public static void report() throws Exception {
method toRecords (line 277) | private static List<Record> toRecords(List<Item> items) {
method getScore (line 298) | private static double getScore(List<Item> items, Typ typ) {
method extract (line 302) | private static Item extract(String task, String line) {
method uncheck (line 367) | private static <T> T uncheck(UncheckedSupplier<T> fun) {
method uncheck (line 375) | private static void uncheck(UncheckedFunction fun) {
type UncheckedSupplier (line 383) | @FunctionalInterface
method get (line 385) | T get() throws Exception;
type UncheckedFunction (line 388) | @FunctionalInterface
method apply (line 390) | void apply() throws Exception;
type Typ (line 396) | enum Typ {
method Typ (line 401) | private Typ(String name) {
class Item (line 407) | class Item {
method Item (line 413) | public Item(String task, Typ typ, String fun, double score) {
class Record (line 421) | class Record {
method Record (line 429) | public Record(String task, double thrpt, double avgt, double p90, doub...
FILE: brpc-client/src/main/java/benchmark/rpc/Client.java
class Client (line 19) | @State(Scope.Benchmark)
method Client (line 26) | public Client() {
method getUserService (line 43) | @Override
method close (line 48) | @TearDown
method existUser (line 53) | @Benchmark
method createUser (line 61) | @Benchmark
method getUser (line 69) | @Benchmark
method listUser (line 77) | @Benchmark
method main (line 85) | public static void main(String[] args) throws Exception {
FILE: brpc-server/src/main/java/benchmark/rpc/Server.java
class Server (line 8) | public class Server {
method main (line 10) | public static void main(String[] args) throws InterruptedException {
FILE: dubbo-client/src/main/java/benchmark/rpc/Client.java
class Client (line 23) | @State(Scope.Benchmark)
method Client (line 30) | public Client() {
method getUserService (line 36) | @Override
method close (line 41) | @TearDown
method existUser (line 46) | @Benchmark
method createUser (line 54) | @Benchmark
method getUser (line 62) | @Benchmark
method listUser (line 70) | @Benchmark
method main (line 78) | public static void main(String[] args) throws Exception {
FILE: dubbo-kryo-client/src/main/java/benchmark/rpc/Client.java
class Client (line 23) | @State(Scope.Benchmark)
method Client (line 30) | public Client() {
method getUserService (line 36) | @Override
method close (line 41) | @TearDown
method existUser (line 46) | @Benchmark
method createUser (line 54) | @Benchmark
method getUser (line 62) | @Benchmark
method listUser (line 70) | @Benchmark
method main (line 78) | public static void main(String[] args) throws Exception {
FILE: dubbo-kryo-server/src/main/java/benchmark/rpc/Server.java
class Server (line 5) | public class Server {
method main (line 7) | public static void main(String[] args) throws InterruptedException {
FILE: dubbo-server/src/main/java/benchmark/rpc/Server.java
class Server (line 5) | public class Server {
method main (line 7) | public static void main(String[] args) throws InterruptedException {
FILE: grpc-client/src/main/java/benchmark/rpc/Client.java
class Client (line 23) | @State(Scope.Benchmark)
method getUserService (line 29) | @Override
method close (line 34) | @TearDown
method existUser (line 39) | @Benchmark
method createUser (line 47) | @Benchmark
method getUser (line 55) | @Benchmark
method listUser (line 63) | @Benchmark
method main (line 71) | public static void main(String[] args) throws Exception {
FILE: grpc-client/src/main/java/benchmark/rpc/grpc/GrpcUserServiceClient.java
class GrpcUserServiceClient (line 10) | public class GrpcUserServiceClient implements Closeable {
method GrpcUserServiceClient (line 15) | public GrpcUserServiceClient(String host, int port) {
method close (line 25) | @Override
FILE: grpc-client/src/main/java/benchmark/rpc/grpc/UserServiceGrpcClientImpl.java
class UserServiceGrpcClientImpl (line 24) | public class UserServiceGrpcClientImpl implements UserService, Closeable {
method UserServiceGrpcClientImpl (line 32) | public UserServiceGrpcClientImpl() {
method close (line 38) | @Override
method existUser (line 47) | @Override
method createUser (line 55) | @Override
method getUser (line 78) | @Override
method listUser (line 100) | @Override
FILE: grpc-server/src/main/java/benchmark/rpc/Server.java
class Server (line 6) | public class Server {
method main (line 11) | public static void main(String[] args) throws Exception {
FILE: grpc-server/src/main/java/benchmark/rpc/grpc/server/UserServiceGrpcServerImpl.java
class UserServiceGrpcServerImpl (line 22) | public class UserServiceGrpcServerImpl extends UserServiceImplBase {
method userExist (line 25) | @Override
method getUser (line 36) | @Override
method createUser (line 60) | @Override
method listUser (line 85) | @Override
FILE: hprose-client/src/main/java/benchmark/rpc/Client.java
class Client (line 23) | @State(Scope.Benchmark)
method Client (line 30) | public Client() {
method getUserService (line 35) | @Override
method close (line 40) | @TearDown
method existUser (line 45) | @Benchmark
method createUser (line 53) | @Benchmark
method getUser (line 61) | @Benchmark
method listUser (line 69) | @Benchmark
method main (line 77) | public static void main(String[] args) throws Exception {
FILE: hprose-server/src/main/java/benchmark/rpc/Server.java
class Server (line 6) | public class Server {
method main (line 8) | public static void main(String[] args) throws Exception {
FILE: jupiter-client/src/main/java/benchmark/rpc/Client.java
class Client (line 37) | @State(Scope.Benchmark)
method Client (line 47) | public Client() {
method close (line 72) | @TearDown
method existUser (line 77) | @Benchmark
method createUser (line 85) | @Benchmark
method getUser (line 94) | @Benchmark
method listUser (line 102) | @Benchmark
method main (line 110) | public static void main(String[] args) throws Exception {
FILE: jupiter-client/src/main/java/benchmark/service/JupiterUserService.java
type JupiterUserService (line 10) | @ServiceProvider(group = "test", name = "jupiterUserService")
method existUser (line 12) | CompletableFuture<Boolean> existUser(String email);
method createUser (line 14) | CompletableFuture<Boolean> createUser(User user);
method getUser (line 16) | CompletableFuture<User> getUser(long id);
method listUser (line 18) | CompletableFuture<Page<User>> listUser(int pageNo);
FILE: jupiter-server/src/main/java/benchmark/rpc/Server.java
class Server (line 13) | public class Server {
method main (line 15) | public static void main(String[] args) throws InterruptedException {
FILE: jupiter-server/src/main/java/benchmark/service/JupiterUserService.java
type JupiterUserService (line 10) | @ServiceProvider(group = "test", name = "jupiterUserService")
method existUser (line 12) | CompletableFuture<Boolean> existUser(String email);
method createUser (line 14) | CompletableFuture<Boolean> createUser(User user);
method getUser (line 16) | CompletableFuture<User> getUser(long id);
method listUser (line 18) | CompletableFuture<Page<User>> listUser(int pageNo);
FILE: jupiter-server/src/main/java/benchmark/service/JupiterUserServiceServerImpl.java
class JupiterUserServiceServerImpl (line 21) | @ServiceProviderImpl(version = "1.0.0")
method existUser (line 24) | @Override
method getUser (line 37) | @Override
method listUser (line 61) | @Override
method createUser (line 95) | @Override
FILE: motan-client/src/main/java/benchmark/bean/MotanUser.java
class MotanUser (line 7) | public class MotanUser implements Serializable {
method getId (line 23) | public long getId() {
method setId (line 27) | public void setId(long id) {
method getName (line 31) | public String getName() {
method setName (line 35) | public void setName(String name) {
method getSex (line 39) | public int getSex() {
method setSex (line 43) | public void setSex(int sex) {
method getBirthday (line 47) | public Date getBirthday() {
method setBirthday (line 51) | public void setBirthday(Date birthday) {
method getEmail (line 55) | public String getEmail() {
method setEmail (line 59) | public void setEmail(String email) {
method getMobile (line 63) | public String getMobile() {
method setMobile (line 67) | public void setMobile(String mobile) {
method getAddress (line 71) | public String getAddress() {
method setAddress (line 75) | public void setAddress(String address) {
method getIcon (line 79) | public String getIcon() {
method setIcon (line 83) | public void setIcon(String icon) {
method getPermissions (line 87) | public List<Integer> getPermissions() {
method setPermissions (line 91) | public void setPermissions(List<Integer> permissions) {
method getStatus (line 95) | public int getStatus() {
method setStatus (line 99) | public void setStatus(int status) {
method getCreateTime (line 103) | public Date getCreateTime() {
method setCreateTime (line 107) | public void setCreateTime(Date createTime) {
method getUpdateTime (line 111) | public Date getUpdateTime() {
method setUpdateTime (line 115) | public void setUpdateTime(Date updateTime) {
method toString (line 119) | @Override
FILE: motan-client/src/main/java/benchmark/rpc/Client.java
class Client (line 28) | @State(Scope.Benchmark)
method Client (line 38) | public Client() {
method close (line 44) | @TearDown
method existUser (line 55) | @Benchmark
method createUser (line 63) | @Benchmark
method getUser (line 72) | @Benchmark
method listUser (line 80) | @Benchmark
method main (line 88) | public static void main(String[] args) throws Exception {
FILE: motan-client/src/main/java/benchmark/service/MotanUserService.java
type MotanUserService (line 6) | public interface MotanUserService {
method existUser (line 7) | public boolean existUser(String email);
method createUser (line 9) | public boolean createUser(MotanUser user);
method getUser (line 11) | public MotanUser getUser(long id);
method listUser (line 13) | public Page<MotanUser> listUser(int pageNo);
FILE: motan-client/src/main/java/benchmark/service/MotanUserServiceServerImpl.java
class MotanUserServiceServerImpl (line 17) | public class MotanUserServiceServerImpl implements MotanUserService {
method existUser (line 19) | @Override
method getUser (line 32) | @Override
method listUser (line 56) | @Override
method createUser (line 90) | @Override
FILE: motan-server/src/main/java/benchmark/bean/MotanUser.java
class MotanUser (line 7) | public class MotanUser implements Serializable {
method getId (line 23) | public long getId() {
method setId (line 27) | public void setId(long id) {
method getName (line 31) | public String getName() {
method setName (line 35) | public void setName(String name) {
method getSex (line 39) | public int getSex() {
method setSex (line 43) | public void setSex(int sex) {
method getBirthday (line 47) | public Date getBirthday() {
method setBirthday (line 51) | public void setBirthday(Date birthday) {
method getEmail (line 55) | public String getEmail() {
method setEmail (line 59) | public void setEmail(String email) {
method getMobile (line 63) | public String getMobile() {
method setMobile (line 67) | public void setMobile(String mobile) {
method getAddress (line 71) | public String getAddress() {
method setAddress (line 75) | public void setAddress(String address) {
method getIcon (line 79) | public String getIcon() {
method setIcon (line 83) | public void setIcon(String icon) {
method getPermissions (line 87) | public List<Integer> getPermissions() {
method setPermissions (line 91) | public void setPermissions(List<Integer> permissions) {
method getStatus (line 95) | public int getStatus() {
method setStatus (line 99) | public void setStatus(int status) {
method getCreateTime (line 103) | public Date getCreateTime() {
method setCreateTime (line 107) | public void setCreateTime(Date createTime) {
method getUpdateTime (line 111) | public Date getUpdateTime() {
method setUpdateTime (line 115) | public void setUpdateTime(Date updateTime) {
method toString (line 119) | @Override
FILE: motan-server/src/main/java/benchmark/rpc/Server.java
class Server (line 5) | public class Server {
method main (line 7) | public static void main(String[] args) throws InterruptedException {
FILE: motan-server/src/main/java/benchmark/service/MotanUserService.java
type MotanUserService (line 6) | public interface MotanUserService {
method existUser (line 7) | public boolean existUser(String email);
method createUser (line 9) | public boolean createUser(MotanUser user);
method getUser (line 11) | public MotanUser getUser(long id);
method listUser (line 13) | public Page<MotanUser> listUser(int pageNo);
FILE: motan-server/src/main/java/benchmark/service/MotanUserServiceServerImpl.java
class MotanUserServiceServerImpl (line 17) | public class MotanUserServiceServerImpl implements MotanUserService {
method existUser (line 19) | @Override
method getUser (line 32) | @Override
method listUser (line 56) | @Override
method createUser (line 90) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/Client.java
class Client (line 26) | @State(Scope.Benchmark)
method getUserService (line 36) | @Override
method close (line 41) | @TearDown
method existUser (line 46) | @Benchmark
method createUser (line 54) | @Benchmark
method getUser (line 62) | @Benchmark
method listUser (line 70) | @Benchmark
method main (line 78) | public static void main(String[] args) throws RunnerException {
FILE: netty-client/src/main/java/benchmark/rpc/netty/client/NettyClientConnector.java
class NettyClientConnector (line 34) | public class NettyClientConnector implements Closeable {
method NettyClientConnector (line 51) | public NettyClientConnector(String host, int port) {
method setDefaultTimeout (line 56) | public void setDefaultTimeout(long defaultTimeout) {
method execute (line 60) | public Response execute(Request request) throws InterruptedException, ...
method execute (line 64) | public Response execute(Request request, long timeout, TimeUnit unit)
method batchSend (line 89) | private void batchSend(Channel channel, MpscAtomicArrayQueue<Request> ...
method close (line 124) | @Override
method connect (line 136) | public void connect() throws InterruptedException {
method doConnect (line 153) | private void doConnect(EventLoopGroup loupGroup, Class<? extends Socke...
FILE: netty-client/src/main/java/benchmark/rpc/netty/client/UserServiceNettyClientImpl.java
class UserServiceNettyClientImpl (line 14) | public class UserServiceNettyClientImpl implements UserService, Closeable {
method UserServiceNettyClientImpl (line 22) | public UserServiceNettyClientImpl() {
method close (line 26) | @Override
method connect (line 31) | private void connect() {
method execute (line 39) | @SuppressWarnings("unchecked")
method existUser (line 57) | @Override
method createUser (line 62) | @Override
method getUser (line 67) | @Override
method listUser (line 72) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/client/codec/ProtocolDecoder.java
class ProtocolDecoder (line 8) | public class ProtocolDecoder extends LengthFieldBasedFrameDecoder {
method ProtocolDecoder (line 12) | public ProtocolDecoder(int maxFrameLength) {
method decode (line 16) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/client/codec/ProtocolEncoder.java
class ProtocolEncoder (line 9) | public class ProtocolEncoder extends MessageToByteEncoder<Request> {
method encode (line 11) | protected void encode(ChannelHandlerContext ctx, Request request, Byte...
FILE: netty-client/src/main/java/benchmark/rpc/netty/client/future/FutureContainer.java
class FutureContainer (line 13) | public final class FutureContainer {
method addFuture (line 16) | public void addFuture(long requestId, CompletableFuture<Response> futu...
method remove (line 20) | public void remove(long requestId) {
method notifyResponse (line 24) | public void notifyResponse(Response response) {
FILE: netty-client/src/main/java/benchmark/rpc/netty/client/handler/BenchmarkChannelInitializer.java
class BenchmarkChannelInitializer (line 9) | public class BenchmarkChannelInitializer extends ChannelInitializer<Sock...
method BenchmarkChannelInitializer (line 15) | public BenchmarkChannelInitializer(FutureContainer futureContainer) {
method initChannel (line 19) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/client/handler/BenchmarkClientHandler.java
class BenchmarkClientHandler (line 11) | public class BenchmarkClientHandler extends SimpleChannelInboundHandler<...
method BenchmarkClientHandler (line 16) | public BenchmarkClientHandler(FutureContainer futureContainer) {
method channelRead0 (line 20) | protected void channelRead0(ChannelHandlerContext ctx, Response respon...
method exceptionCaught (line 24) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/BooleanSerializer.java
class BooleanSerializer (line 5) | public class BooleanSerializer implements Serializer<Boolean> {
method write (line 7) | @Override
method read (line 12) | @Override
method typeClass (line 17) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/FastestSerializer.java
class FastestSerializer (line 9) | public class FastestSerializer {
method writeRequest (line 14) | public static void writeRequest(ByteBuf byteBuf, Request request) thro...
method readRequest (line 26) | public static Request readRequest(ByteBuf byteBuf) throws IOException {
method writeResponse (line 30) | public static void writeResponse(ByteBuf byteBuf, Response response) t...
method readResponse (line 42) | public static Response readResponse(ByteBuf byteBuf) throws IOException {
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/IntegerSerializer.java
class IntegerSerializer (line 5) | public class IntegerSerializer implements Serializer<Integer> {
method write (line 7) | @Override
method read (line 12) | @Override
method typeClass (line 17) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/LocalDateSerializer.java
class LocalDateSerializer (line 7) | public class LocalDateSerializer implements Serializer<LocalDate> {
method write (line 9) | @Override
method read (line 16) | @Override
method typeClass (line 25) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/LocalDateTimeSerializer.java
class LocalDateTimeSerializer (line 9) | public class LocalDateTimeSerializer implements Serializer<LocalDateTime> {
method write (line 14) | @Override
method read (line 20) | @Override
method typeClass (line 28) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/LocalTimeSerializer.java
class LocalTimeSerializer (line 7) | public class LocalTimeSerializer implements Serializer<LocalTime> {
method write (line 9) | @Override
method read (line 17) | @Override
method typeClass (line 27) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/LongSerializer.java
class LongSerializer (line 5) | public class LongSerializer implements Serializer<Long> {
method write (line 7) | @Override
method read (line 12) | @Override
method typeClass (line 17) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/ObjectSerializer.java
class ObjectSerializer (line 5) | @SuppressWarnings("unchecked")
method write (line 8) | @Override
method read (line 24) | @Override
method typeClass (line 31) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/Register.java
class Register (line 5) | public class Register {
method serializer (line 34) | public static Serializer<?> serializer(int id) {
method serializer (line 38) | public static Serializer<?> serializer(Class<?> clazz) {
method id (line 42) | public static int id(Class<?> clazz) {
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/RequestSerializer.java
class RequestSerializer (line 6) | public class RequestSerializer implements Serializer<Request> {
method write (line 10) | @Override
method read (line 23) | @Override
method typeClass (line 42) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/ResponseSerializer.java
class ResponseSerializer (line 6) | public class ResponseSerializer implements Serializer<Response> {
method write (line 10) | @Override
method read (line 17) | @Override
method typeClass (line 31) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/Serializer.java
type Serializer (line 5) | public interface Serializer<T> {
method write (line 7) | public void write(ByteBuf byteBuf, T object);
method read (line 9) | public T read(ByteBuf byteBuf);
method typeClass (line 11) | public Class<? super T> typeClass();
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/StringSerializer.java
class StringSerializer (line 7) | public class StringSerializer implements Serializer<String> {
method write (line 9) | @Override
method read (line 16) | @Override
method typeClass (line 25) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/UserPageSerializer.java
class UserPageSerializer (line 11) | public class UserPageSerializer implements Serializer<Page<User>> {
method write (line 15) | @Override
method read (line 34) | @Override
method typeClass (line 53) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/UserSerializer.java
class UserSerializer (line 12) | public class UserSerializer implements Serializer<User> {
method write (line 17) | @Override
method read (line 46) | @Override
method typeClass (line 84) | @Override
FILE: netty-client/src/main/java/benchmark/rpc/netty/serializer/VoidSerializer.java
class VoidSerializer (line 5) | public class VoidSerializer implements Serializer<Void> {
method write (line 7) | @Override
method read (line 11) | @Override
method typeClass (line 16) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/Server.java
class Server (line 21) | public class Server {
method main (line 30) | public static void main(String[] args) throws InterruptedException {
method doRun (line 44) | private static void doRun(EventLoopGroup loupGroup, Class<? extends Se...
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/BooleanSerializer.java
class BooleanSerializer (line 5) | public class BooleanSerializer implements Serializer<Boolean> {
method write (line 7) | @Override
method read (line 12) | @Override
method typeClass (line 17) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/FastestSerializer.java
class FastestSerializer (line 9) | public class FastestSerializer {
method writeRequest (line 14) | public static void writeRequest(ByteBuf byteBuf, Request request) thro...
method readRequest (line 26) | public static Request readRequest(ByteBuf byteBuf) throws IOException {
method writeResponse (line 30) | public static void writeResponse(ByteBuf byteBuf, Response response) t...
method readResponse (line 42) | public static Response readResponse(ByteBuf byteBuf) throws IOException {
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/IntegerSerializer.java
class IntegerSerializer (line 5) | public class IntegerSerializer implements Serializer<Integer> {
method write (line 7) | @Override
method read (line 12) | @Override
method typeClass (line 17) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/LocalDateSerializer.java
class LocalDateSerializer (line 7) | public class LocalDateSerializer implements Serializer<LocalDate> {
method write (line 9) | @Override
method read (line 16) | @Override
method typeClass (line 25) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/LocalDateTimeSerializer.java
class LocalDateTimeSerializer (line 9) | public class LocalDateTimeSerializer implements Serializer<LocalDateTime> {
method write (line 14) | @Override
method read (line 20) | @Override
method typeClass (line 28) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/LocalTimeSerializer.java
class LocalTimeSerializer (line 7) | public class LocalTimeSerializer implements Serializer<LocalTime> {
method write (line 9) | @Override
method read (line 17) | @Override
method typeClass (line 27) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/LongSerializer.java
class LongSerializer (line 5) | public class LongSerializer implements Serializer<Long> {
method write (line 7) | @Override
method read (line 12) | @Override
method typeClass (line 17) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/ObjectSerializer.java
class ObjectSerializer (line 5) | @SuppressWarnings("unchecked")
method write (line 8) | @Override
method read (line 24) | @Override
method typeClass (line 31) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/Register.java
class Register (line 5) | public class Register {
method serializer (line 34) | public static Serializer<?> serializer(int id) {
method serializer (line 38) | public static Serializer<?> serializer(Class<?> clazz) {
method id (line 42) | public static int id(Class<?> clazz) {
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/RequestSerializer.java
class RequestSerializer (line 6) | public class RequestSerializer implements Serializer<Request> {
method write (line 10) | @Override
method read (line 23) | @Override
method typeClass (line 42) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/ResponseSerializer.java
class ResponseSerializer (line 6) | public class ResponseSerializer implements Serializer<Response> {
method write (line 10) | @Override
method read (line 17) | @Override
method typeClass (line 31) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/Serializer.java
type Serializer (line 5) | public interface Serializer<T> {
method write (line 7) | public void write(ByteBuf byteBuf, T object);
method read (line 9) | public T read(ByteBuf byteBuf);
method typeClass (line 11) | public Class<? super T> typeClass();
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/StringSerializer.java
class StringSerializer (line 7) | public class StringSerializer implements Serializer<String> {
method write (line 9) | @Override
method read (line 16) | @Override
method typeClass (line 25) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/UserPageSerializer.java
class UserPageSerializer (line 11) | public class UserPageSerializer implements Serializer<Page<User>> {
method write (line 15) | @Override
method read (line 34) | @Override
method typeClass (line 53) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/UserSerializer.java
class UserSerializer (line 12) | public class UserSerializer implements Serializer<User> {
method write (line 17) | @Override
method read (line 46) | @Override
method typeClass (line 84) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/serializer/VoidSerializer.java
class VoidSerializer (line 5) | public class VoidSerializer implements Serializer<Void> {
method write (line 7) | @Override
method read (line 11) | @Override
method typeClass (line 16) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/server/codec/ProtocolDecoder.java
class ProtocolDecoder (line 8) | public class ProtocolDecoder extends LengthFieldBasedFrameDecoder {
method ProtocolDecoder (line 12) | public ProtocolDecoder(int maxFrameLength) {
method decode (line 16) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/server/codec/ProtocolEncoder.java
class ProtocolEncoder (line 9) | public class ProtocolEncoder extends MessageToByteEncoder<Response> {
method encode (line 11) | protected void encode(ChannelHandlerContext ctx, Response response, By...
FILE: netty-server/src/main/java/benchmark/rpc/netty/server/handler/BenchmarkChannelInitializer.java
class BenchmarkChannelInitializer (line 8) | public class BenchmarkChannelInitializer extends ChannelInitializer<Sock...
method initChannel (line 12) | @Override
FILE: netty-server/src/main/java/benchmark/rpc/netty/server/handler/BenchmarkServerHandler.java
class BenchmarkServerHandler (line 12) | public class BenchmarkServerHandler extends SimpleChannelInboundHandler<...
method channelRead0 (line 17) | protected void channelRead0(ChannelHandlerContext ctx, Request msg) th...
method exceptionCaught (line 35) | @Override
FILE: rapidoid-client/src/main/java/benchmark/rpc/Client.java
class Client (line 22) | @State(Scope.Benchmark)
method getUserService (line 28) | @Override
method existUser (line 33) | @Benchmark
method createUser (line 41) | @Benchmark
method getUser (line 49) | @Benchmark
method listUser (line 57) | @Benchmark
method main (line 65) | public static void main(String[] args) throws RunnerException {
FILE: rapidoid-server/src/main/java/benchmark/rpc/Server.java
class Server (line 10) | public class Server {
method main (line 15) | public static void main(String[] args) {
FILE: rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/CreateUserController.java
class CreateUserController (line 10) | @Controller
method createUser (line 14) | @GET("create-user")
FILE: rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/GetUserController.java
class GetUserController (line 10) | @Controller
method getUser (line 14) | @GET("get-user")
FILE: rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/ListUserController.java
class ListUserController (line 11) | @Controller
method getUser (line 15) | @GET("list-user")
FILE: rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/UserExistController.java
class UserExistController (line 9) | @Controller
method emailExist (line 14) | @GET("user-exist")
FILE: rsocket-client/src/main/java/benchmark/rpc/Client.java
class Client (line 16) | @State(Scope.Benchmark)
method getUserService (line 23) | @Override
method close (line 28) | @TearDown
method existUser (line 33) | @Benchmark
method createUser (line 41) | @Benchmark
method getUser (line 49) | @Benchmark
method listUser (line 57) | @Benchmark
method main (line 65) | public static void main(String[] args) throws Exception {
FILE: rsocket-client/src/main/java/benchmark/rpc/rsocket/UserServiceRsocketClientImpl.java
class UserServiceRsocketClientImpl (line 20) | public class UserServiceRsocketClientImpl implements UserService, Closea...
method UserServiceRsocketClientImpl (line 25) | public UserServiceRsocketClientImpl() {
method existUser (line 31) | @Override
method createUser (line 39) | @Override
method getUser (line 58) | @Override
method from (line 69) | private User from(UserServiceOuterClass.User response){
method listUser (line 86) | @Override
method close (line 107) | @Override
FILE: rsocket-server/src/main/java/benchmark/rpc/Server.java
class Server (line 13) | public class Server {
method main (line 15) | public static void main(String[] args){
FILE: rsocket-server/src/main/java/benchmark/rpc/rsocket/server/UserServiceRsocketServerImpl.java
class UserServiceRsocketServerImpl (line 17) | public class UserServiceRsocketServerImpl implements UserService {
method userExist (line 21) | @Override
method createUser (line 28) | @Override
method getUser (line 51) | @Override
method listUser (line 73) | @Override
FILE: servicecomb-client/src/main/java/benchmark/rpc/Client.java
class Client (line 25) | @State(Scope.Benchmark)
method getUserService (line 46) | @Override
method existUser (line 51) | @Benchmark
method createUser (line 59) | @Benchmark
method getUser (line 67) | @Benchmark
method listUser (line 75) | @Benchmark
method main (line 83) | public static void main(String[] args) throws Exception {
FILE: servicecomb-server/src/main/java/benchmark/rpc/Server.java
class Server (line 8) | public class Server {
method main (line 10) | public static void main(String[] args) throws Exception {
FILE: servicecomb-server/src/main/java/benchmark/service/ServiceCombUserServiceServerImpl.java
class ServiceCombUserServiceServerImpl (line 14) | @RpcSchema(schemaId = "benchmark")
method existUser (line 17) | @Override
method getUser (line 30) | @Override
method listUser (line 54) | @Override
method createUser (line 88) | @Override
FILE: sofa-client/src/main/java/benchmark/rpc/Client.java
class Client (line 23) | @State(Scope.Benchmark)
method Client (line 29) | public Client() {
method getUserService (line 37) | @Override
method close (line 42) | @TearDown
method existUser (line 47) | @Benchmark
method createUser (line 55) | @Benchmark
method getUser (line 63) | @Benchmark
method listUser (line 71) | @Benchmark
method main (line 79) | public static void main(String[] args) throws Exception {
FILE: sofa-server/src/main/java/benchmark/rpc/Server.java
class Server (line 8) | public class Server {
method main (line 10) | public static void main(String[] args) {
FILE: springboot-client/src/main/java/benchmark/rpc/Client.java
class Client (line 22) | @State(Scope.Benchmark)
method getUserService (line 28) | @Override
method existUser (line 33) | @Benchmark
method createUser (line 41) | @Benchmark
method getUser (line 49) | @Benchmark
method listUser (line 57) | @Benchmark
method main (line 65) | public static void main(String[] args) throws RunnerException, Interru...
FILE: springboot-server/src/main/java/benchmark/rpc/Server.java
class Server (line 6) | @SpringBootApplication(scanBasePackages = { "benchmark.rpc.springboot" })
method main (line 8) | public static void main(String[] args) {
FILE: springboot-server/src/main/java/benchmark/rpc/springboot/server/CreateUserController.java
class CreateUserController (line 10) | @RestController
method createUser (line 14) | @PostMapping("create-user")
FILE: springboot-server/src/main/java/benchmark/rpc/springboot/server/GetUserController.java
class GetUserController (line 10) | @RestController
method getUser (line 14) | @GetMapping("get-user")
FILE: springboot-server/src/main/java/benchmark/rpc/springboot/server/ListUserController.java
class ListUserController (line 11) | @RestController
method getUser (line 15) | @GetMapping("list-user")
FILE: springboot-server/src/main/java/benchmark/rpc/springboot/server/UserExistController.java
class UserExistController (line 9) | @RestController
method emailExist (line 14) | @GetMapping("user-exist")
FILE: springboot-undertow-client/src/main/java/benchmark/rpc/Client.java
class Client (line 22) | @State(Scope.Benchmark)
method getUserService (line 28) | @Override
method existUser (line 33) | @Benchmark
method createUser (line 41) | @Benchmark
method getUser (line 49) | @Benchmark
method listUser (line 57) | @Benchmark
method main (line 65) | public static void main(String[] args) throws RunnerException, Interru...
FILE: springboot-undertow-server/src/main/java/benchmark/rpc/Server.java
class Server (line 6) | @SpringBootApplication(scanBasePackages = { "benchmark.rpc.springboot" })
method main (line 8) | public static void main(String[] args) {
FILE: springboot-undertow-server/src/main/java/benchmark/rpc/springboot/server/CreateUserController.java
class CreateUserController (line 10) | @RestController
method createUser (line 14) | @PostMapping("create-user")
FILE: springboot-undertow-server/src/main/java/benchmark/rpc/springboot/server/GetUserController.java
class GetUserController (line 10) | @RestController
method getUser (line 14) | @GetMapping("get-user")
FILE: springboot-undertow-server/src/main/java/benchmark/rpc/springboot/server/ListUserController.java
class ListUserController (line 11) | @RestController
method getUser (line 15) | @GetMapping("list-user")
FILE: springboot-undertow-server/src/main/java/benchmark/rpc/springboot/server/UserExistController.java
class UserExistController (line 9) | @RestController
method emailExist (line 14) | @GetMapping("user-exist")
FILE: springwebflux-client/src/main/java/benchmark/rpc/Client.java
class Client (line 22) | @State(Scope.Benchmark)
method getUserService (line 28) | @Override
method existUser (line 33) | @Benchmark
method createUser (line 41) | @Benchmark
method getUser (line 49) | @Benchmark
method listUser (line 57) | @Benchmark
method main (line 65) | public static void main(String[] args) throws RunnerException, Interru...
FILE: springwebflux-server/src/main/java/benchmark/rpc/Server.java
class Server (line 15) | @SpringBootApplication(scanBasePackages = { "benchmark.rpc.webflux" })
method main (line 18) | public static void main(String[] args) {
method objectMapper (line 22) | @Bean
FILE: springwebflux-server/src/main/java/benchmark/rpc/webflux/server/CreateUserController.java
class CreateUserController (line 11) | @RestController
method createUser (line 15) | @PostMapping("create-user")
FILE: springwebflux-server/src/main/java/benchmark/rpc/webflux/server/GetUserController.java
class GetUserController (line 11) | @RestController
method getUser (line 15) | @GetMapping("get-user")
FILE: springwebflux-server/src/main/java/benchmark/rpc/webflux/server/ListUserController.java
class ListUserController (line 12) | @RestController
method getUser (line 16) | @GetMapping("list-user")
FILE: springwebflux-server/src/main/java/benchmark/rpc/webflux/server/UserExistController.java
class UserExistController (line 10) | @RestController
method emailExist (line 15) | @GetMapping("user-exist")
FILE: thrift-client/src/main/java/benchmark/rpc/Client.java
class Client (line 23) | @State(Scope.Benchmark)
method getUserService (line 29) | @Override
method close (line 34) | @TearDown
method existUser (line 39) | @Benchmark
method createUser (line 47) | @Benchmark
method getUser (line 55) | @Benchmark
method listUser (line 63) | @Benchmark
method main (line 71) | public static void main(String[] args) throws Exception {
FILE: thrift-client/src/main/java/benchmark/rpc/thrift/Converter.java
class Converter (line 7) | public class Converter {
method toThrift (line 9) | public static benchmark.rpc.thrift.User toThrift(benchmark.bean.User u...
method toRaw (line 28) | public static benchmark.bean.User toRaw(benchmark.rpc.thrift.User user) {
FILE: thrift-client/src/main/java/benchmark/rpc/thrift/TServiceClientNoPrint.java
class TServiceClientNoPrint (line 33) | public abstract class TServiceClientNoPrint extends org.apache.thrift.TS...
method TServiceClientNoPrint (line 35) | public TServiceClientNoPrint(TProtocol prot) {
method TServiceClientNoPrint (line 39) | public TServiceClientNoPrint(TProtocol iprot, TProtocol oprot) {
method receiveBase (line 43) | @Override
FILE: thrift-client/src/main/java/benchmark/rpc/thrift/ThriftUserServiceClient.java
class ThriftUserServiceClient (line 13) | public class ThriftUserServiceClient implements Closeable {
method ThriftUserServiceClient (line 20) | public ThriftUserServiceClient(String host, int port) {
method close (line 32) | @Override
FILE: thrift-client/src/main/java/benchmark/rpc/thrift/User.java
class User (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type _Fields (line 44) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 69) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 104) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 113) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 120) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 125) | public short getThriftFieldId() {
method getFieldName (line 129) | public java.lang.String getFieldName() {
method User (line 174) | public User() {
method User (line 177) | public User(
method User (line 215) | public User(User other) {
method deepCopy (line 244) | public User deepCopy() {
method clear (line 248) | @Override
method getId (line 270) | public long getId() {
method setId (line 274) | public User setId(long id) {
method unsetId (line 280) | public void unsetId() {
method isSetId (line 285) | public boolean isSetId() {
method setIdIsSet (line 289) | public void setIdIsSet(boolean value) {
method getName (line 293) | public java.lang.String getName() {
method setName (line 297) | public User setName(java.lang.String name) {
method unsetName (line 302) | public void unsetName() {
method isSetName (line 307) | public boolean isSetName() {
method setNameIsSet (line 311) | public void setNameIsSet(boolean value) {
method getSex (line 317) | public int getSex() {
method setSex (line 321) | public User setSex(int sex) {
method unsetSex (line 327) | public void unsetSex() {
method isSetSex (line 332) | public boolean isSetSex() {
method setSexIsSet (line 336) | public void setSexIsSet(boolean value) {
method getBirthday (line 340) | public int getBirthday() {
method setBirthday (line 344) | public User setBirthday(int birthday) {
method unsetBirthday (line 350) | public void unsetBirthday() {
method isSetBirthday (line 355) | public boolean isSetBirthday() {
method setBirthdayIsSet (line 359) | public void setBirthdayIsSet(boolean value) {
method getEmail (line 363) | public java.lang.String getEmail() {
method setEmail (line 367) | public User setEmail(java.lang.String email) {
method unsetEmail (line 372) | public void unsetEmail() {
method isSetEmail (line 377) | public boolean isSetEmail() {
method setEmailIsSet (line 381) | public void setEmailIsSet(boolean value) {
method getMobile (line 387) | public java.lang.String getMobile() {
method setMobile (line 391) | public User setMobile(java.lang.String mobile) {
method unsetMobile (line 396) | public void unsetMobile() {
method isSetMobile (line 401) | public boolean isSetMobile() {
method setMobileIsSet (line 405) | public void setMobileIsSet(boolean value) {
method getAddress (line 411) | public java.lang.String getAddress() {
method setAddress (line 415) | public User setAddress(java.lang.String address) {
method unsetAddress (line 420) | public void unsetAddress() {
method isSetAddress (line 425) | public boolean isSetAddress() {
method setAddressIsSet (line 429) | public void setAddressIsSet(boolean value) {
method getIcon (line 435) | public java.lang.String getIcon() {
method setIcon (line 439) | public User setIcon(java.lang.String icon) {
method unsetIcon (line 444) | public void unsetIcon() {
method isSetIcon (line 449) | public boolean isSetIcon() {
method setIconIsSet (line 453) | public void setIconIsSet(boolean value) {
method getPermissionsSize (line 459) | public int getPermissionsSize() {
method getPermissionsIterator (line 463) | public java.util.Iterator<java.lang.Integer> getPermissionsIterator() {
method addToPermissions (line 467) | public void addToPermissions(int elem) {
method getPermissions (line 474) | public java.util.List<java.lang.Integer> getPermissions() {
method setPermissions (line 478) | public User setPermissions(java.util.List<java.lang.Integer> permissio...
method unsetPermissions (line 483) | public void unsetPermissions() {
method isSetPermissions (line 488) | public boolean isSetPermissions() {
method setPermissionsIsSet (line 492) | public void setPermissionsIsSet(boolean value) {
method getStatus (line 498) | public int getStatus() {
method setStatus (line 502) | public User setStatus(int status) {
method unsetStatus (line 508) | public void unsetStatus() {
method isSetStatus (line 513) | public boolean isSetStatus() {
method setStatusIsSet (line 517) | public void setStatusIsSet(boolean value) {
method getCreateTime (line 521) | public long getCreateTime() {
method setCreateTime (line 525) | public User setCreateTime(long createTime) {
method unsetCreateTime (line 531) | public void unsetCreateTime() {
method isSetCreateTime (line 536) | public boolean isSetCreateTime() {
method setCreateTimeIsSet (line 540) | public void setCreateTimeIsSet(boolean value) {
method getUpdateTime (line 544) | public long getUpdateTime() {
method setUpdateTime (line 548) | public User setUpdateTime(long updateTime) {
method unsetUpdateTime (line 554) | public void unsetUpdateTime() {
method isSetUpdateTime (line 559) | public boolean isSetUpdateTime() {
method setUpdateTimeIsSet (line 563) | public void setUpdateTimeIsSet(boolean value) {
method setFieldValue (line 567) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 668) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 711) | public boolean isSet(_Fields field) {
method equals (line 745) | @Override
method equals (line 754) | public boolean equals(User that) {
method hashCode (line 871) | @Override
method compareTo (line 914) | @Override
method fieldForId (line 1045) | public _Fields fieldForId(int fieldId) {
method read (line 1049) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws or...
method write (line 1053) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws o...
method toString (line 1057) | @Override
method validate (line 1137) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1142) | private void writeObject(java.io.ObjectOutputStream out) throws java.i...
method readObject (line 1150) | private void readObject(java.io.ObjectInputStream in) throws java.io.I...
class UserStandardSchemeFactory (line 1160) | private static class UserStandardSchemeFactory implements org.apache.t...
method getScheme (line 1161) | public UserStandardScheme getScheme() {
class UserStandardScheme (line 1166) | private static class UserStandardScheme extends org.apache.thrift.sche...
method read (line 1168) | public void read(org.apache.thrift.protocol.TProtocol iprot, User st...
method write (line 1295) | public void write(org.apache.thrift.protocol.TProtocol oprot, User s...
class UserTupleSchemeFactory (line 1360) | private static class UserTupleSchemeFactory implements org.apache.thri...
method getScheme (line 1361) | public UserTupleScheme getScheme() {
class UserTupleScheme (line 1366) | private static class UserTupleScheme extends org.apache.thrift.scheme....
method write (line 1368) | @Override
method read (line 1453) | @Override
method scheme (line 1517) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme(o...
FILE: thrift-client/src/main/java/benchmark/rpc/thrift/UserPage.java
class UserPage (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type _Fields (line 26) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 42) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 59) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 68) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 75) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 80) | public short getThriftFieldId() {
method getFieldName (line 84) | public java.lang.String getFieldName() {
method UserPage (line 107) | public UserPage() {
method UserPage (line 110) | public UserPage(
method UserPage (line 126) | public UserPage(UserPage other) {
method deepCopy (line 139) | public UserPage deepCopy() {
method clear (line 143) | @Override
method getPageNo (line 152) | public int getPageNo() {
method setPageNo (line 156) | public UserPage setPageNo(int pageNo) {
method unsetPageNo (line 162) | public void unsetPageNo() {
method isSetPageNo (line 167) | public boolean isSetPageNo() {
method setPageNoIsSet (line 171) | public void setPageNoIsSet(boolean value) {
method getTotal (line 175) | public int getTotal() {
method setTotal (line 179) | public UserPage setTotal(int total) {
method unsetTotal (line 185) | public void unsetTotal() {
method isSetTotal (line 190) | public boolean isSetTotal() {
method setTotalIsSet (line 194) | public void setTotalIsSet(boolean value) {
method getResultSize (line 198) | public int getResultSize() {
method getResultIterator (line 202) | public java.util.Iterator<User> getResultIterator() {
method addToResult (line 206) | public void addToResult(User elem) {
method getResult (line 213) | public java.util.List<User> getResult() {
method setResult (line 217) | public UserPage setResult(java.util.List<User> result) {
method unsetResult (line 222) | public void unsetResult() {
method isSetResult (line 227) | public boolean isSetResult() {
method setResultIsSet (line 231) | public void setResultIsSet(boolean value) {
method setFieldValue (line 237) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 266) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 282) | public boolean isSet(_Fields field) {
method equals (line 298) | @Override
method equals (line 307) | public boolean equals(UserPage that) {
method hashCode (line 343) | @Override
method compareTo (line 358) | @Override
method fieldForId (line 399) | public _Fields fieldForId(int fieldId) {
method read (line 403) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws or...
method write (line 407) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws o...
method toString (line 411) | @Override
method validate (line 435) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 440) | private void writeObject(java.io.ObjectOutputStream out) throws java.i...
method readObject (line 448) | private void readObject(java.io.ObjectInputStream in) throws java.io.I...
class UserPageStandardSchemeFactory (line 458) | private static class UserPageStandardSchemeFactory implements org.apac...
method getScheme (line 459) | public UserPageStandardScheme getScheme() {
class UserPageStandardScheme (line 464) | private static class UserPageStandardScheme extends org.apache.thrift....
method read (line 466) | public void read(org.apache.thrift.protocol.TProtocol iprot, UserPag...
method write (line 522) | public void write(org.apache.thrift.protocol.TProtocol oprot, UserPa...
class UserPageTupleSchemeFactory (line 550) | private static class UserPageTupleSchemeFactory implements org.apache....
method getScheme (line 551) | public UserPageTupleScheme getScheme() {
class UserPageTupleScheme (line 556) | private static class UserPageTupleScheme extends org.apache.thrift.sch...
method write (line 558) | @Override
method read (line 589) | @Override
method scheme (line 618) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme(o...
FILE: thrift-client/src/main/java/benchmark/rpc/thrift/UserService.java
class UserService (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type Iface (line 13) | public interface Iface {
method userExist (line 15) | public boolean userExist(java.lang.String email) throws org.apache.t...
method createUser (line 17) | public boolean createUser(User user) throws org.apache.thrift.TExcep...
method getUser (line 19) | public User getUser(long id) throws org.apache.thrift.TException;
method listUser (line 21) | public UserPage listUser(int pageNo) throws org.apache.thrift.TExcep...
type AsyncIface (line 25) | public interface AsyncIface {
method userExist (line 27) | public void userExist(java.lang.String email, org.apache.thrift.asyn...
method createUser (line 29) | public void createUser(User user, org.apache.thrift.async.AsyncMetho...
method getUser (line 31) | public void getUser(long id, org.apache.thrift.async.AsyncMethodCall...
method listUser (line 33) | public void listUser(int pageNo, org.apache.thrift.async.AsyncMethod...
class Client (line 37) | public static class Client extends TServiceClientNoPrint implements If...
class Factory (line 38) | public static class Factory implements org.apache.thrift.TServiceCli...
method Factory (line 39) | public Factory() {}
method getClient (line 40) | public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
method getClient (line 43) | public Client getClient(org.apache.thrift.protocol.TProtocol iprot...
method Client (line 48) | public Client(org.apache.thrift.protocol.TProtocol prot)
method Client (line 53) | public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache...
method userExist (line 57) | public boolean userExist(java.lang.String email) throws org.apache.t...
method send_userExist (line 63) | public void send_userExist(java.lang.String email) throws org.apache...
method recv_userExist (line 70) | public boolean recv_userExist() throws org.apache.thrift.TException
method createUser (line 80) | public boolean createUser(User user) throws org.apache.thrift.TExcep...
method send_createUser (line 86) | public void send_createUser(User user) throws org.apache.thrift.TExc...
method recv_createUser (line 93) | public boolean recv_createUser() throws org.apache.thrift.TException
method getUser (line 103) | public User getUser(long id) throws org.apache.thrift.TException
method send_getUser (line 109) | public void send_getUser(long id) throws org.apache.thrift.TException
method recv_getUser (line 116) | public User recv_getUser() throws org.apache.thrift.TException
method listUser (line 126) | public UserPage listUser(int pageNo) throws org.apache.thrift.TExcep...
method send_listUser (line 132) | public void send_listUser(int pageNo) throws org.apache.thrift.TExce...
method recv_listUser (line 139) | public UserPage recv_listUser() throws org.apache.thrift.TException
class AsyncClient (line 150) | public static class AsyncClient extends org.apache.thrift.async.TAsync...
class Factory (line 151) | public static class Factory implements org.apache.thrift.async.TAsyn...
method Factory (line 154) | public Factory(org.apache.thrift.async.TAsyncClientManager clientM...
method getAsyncClient (line 158) | public AsyncClient getAsyncClient(org.apache.thrift.transport.TNon...
method AsyncClient (line 163) | public AsyncClient(org.apache.thrift.protocol.TProtocolFactory proto...
method userExist (line 167) | public void userExist(java.lang.String email, org.apache.thrift.asyn...
class userExist_call (line 174) | public static class userExist_call extends org.apache.thrift.async.T...
method userExist_call (line 176) | public userExist_call(java.lang.String email, org.apache.thrift.as...
method write_args (line 181) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 189) | public java.lang.Boolean getResult() throws org.apache.thrift.TExc...
method createUser (line 199) | public void createUser(User user, org.apache.thrift.async.AsyncMetho...
class createUser_call (line 206) | public static class createUser_call extends org.apache.thrift.async....
method createUser_call (line 208) | public createUser_call(User user, org.apache.thrift.async.AsyncMet...
method write_args (line 213) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 221) | public java.lang.Boolean getResult() throws org.apache.thrift.TExc...
method getUser (line 231) | public void getUser(long id, org.apache.thrift.async.AsyncMethodCall...
class getUser_call (line 238) | public static class getUser_call extends org.apache.thrift.async.TAs...
method getUser_call (line 240) | public getUser_call(long id, org.apache.thrift.async.AsyncMethodCa...
method write_args (line 245) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 253) | public User getResult() throws org.apache.thrift.TException {
method listUser (line 263) | public void listUser(int pageNo, org.apache.thrift.async.AsyncMethod...
class listUser_call (line 270) | public static class listUser_call extends org.apache.thrift.async.TA...
method listUser_call (line 272) | public listUser_call(int pageNo, org.apache.thrift.async.AsyncMeth...
method write_args (line 277) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 285) | public UserPage getResult() throws org.apache.thrift.TException {
class Processor (line 297) | public static class Processor<I extends Iface> extends org.apache.thri...
method Processor (line 299) | public Processor(I iface) {
method Processor (line 303) | protected Processor(I iface, java.util.Map<java.lang.String, org.apa...
method getProcessMap (line 307) | private static <I extends Iface> java.util.Map<java.lang.String, or...
class userExist (line 315) | public static class userExist<I extends Iface> extends org.apache.th...
method userExist (line 316) | public userExist() {
method getEmptyArgsInstance (line 320) | public userExist_args getEmptyArgsInstance() {
method isOneway (line 324) | protected boolean isOneway() {
method getResult (line 328) | public userExist_result getResult(I iface, userExist_args args) th...
class createUser (line 336) | public static class createUser<I extends Iface> extends org.apache.t...
method createUser (line 337) | public createUser() {
method getEmptyArgsInstance (line 341) | public createUser_args getEmptyArgsInstance() {
method isOneway (line 345) | protected boolean isOneway() {
method getResult (line 349) | public createUser_result getResult(I iface, createUser_args args) ...
class getUser (line 357) | public static class getUser<I extends Iface> extends org.apache.thri...
method getUser (line 358) | public getUser() {
method getEmptyArgsInstance (line 362) | public getUser_args getEmptyArgsInstance() {
method isOneway (line 366) | protected boolean isOneway() {
method getResult (line 370) | public getUser_result getResult(I iface, getUser_args args) throws...
class listUser (line 377) | public static class listUser<I extends Iface> extends org.apache.thr...
method listUser (line 378) | public listUser() {
method getEmptyArgsInstance (line 382) | public listUser_args getEmptyArgsInstance() {
method isOneway (line 386) | protected boolean isOneway() {
method getResult (line 390) | public listUser_result getResult(I iface, listUser_args args) thro...
class AsyncProcessor (line 399) | public static class AsyncProcessor<I extends AsyncIface> extends org.a...
method AsyncProcessor (line 401) | public AsyncProcessor(I iface) {
method AsyncProcessor (line 405) | protected AsyncProcessor(I iface, java.util.Map<java.lang.String, o...
method getProcessMap (line 409) | private static <I extends AsyncIface> java.util.Map<java.lang.String...
class userExist (line 417) | public static class userExist<I extends AsyncIface> extends org.apac...
method userExist (line 418) | public userExist() {
method getEmptyArgsInstance (line 422) | public userExist_args getEmptyArgsInstance() {
method getResultHandler (line 426) | public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boole...
method isOneway (line 470) | protected boolean isOneway() {
method start (line 474) | public void start(I iface, userExist_args args, org.apache.thrift....
class createUser (line 479) | public static class createUser<I extends AsyncIface> extends org.apa...
method createUser (line 480) | public createUser() {
method getEmptyArgsInstance (line 484) | public createUser_args getEmptyArgsInstance() {
method getResultHandler (line 488) | public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boole...
method isOneway (line 532) | protected boolean isOneway() {
method start (line 536) | public void start(I iface, createUser_args args, org.apache.thrift...
class getUser (line 541) | public static class getUser<I extends AsyncIface> extends org.apache...
method getUser (line 542) | public getUser() {
method getEmptyArgsInstance (line 546) | public getUser_args getEmptyArgsInstance() {
method getResultHandler (line 550) | public org.apache.thrift.async.AsyncMethodCallback<User> getResult...
method isOneway (line 593) | protected boolean isOneway() {
method start (line 597) | public void start(I iface, getUser_args args, org.apache.thrift.as...
class listUser (line 602) | public static class listUser<I extends AsyncIface> extends org.apach...
method listUser (line 603) | public listUser() {
method getEmptyArgsInstance (line 607) | public listUser_args getEmptyArgsInstance() {
method getResultHandler (line 611) | public org.apache.thrift.async.AsyncMethodCallback<UserPage> getRe...
method isOneway (line 654) | protected boolean isOneway() {
method start (line 658) | public void start(I iface, listUser_args args, org.apache.thrift.a...
class userExist_args (line 665) | public static class userExist_args implements org.apache.thrift.TBase<...
type _Fields (line 676) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 690) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 703) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 712) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 719) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 724) | public short getThriftFieldId() {
method getFieldName (line 728) | public java.lang.String getFieldName() {
method userExist_args (line 743) | public userExist_args() {
method userExist_args (line 746) | public userExist_args(
method userExist_args (line 756) | public userExist_args(userExist_args other) {
method deepCopy (line 762) | public userExist_args deepCopy() {
method clear (line 766) | @Override
method getEmail (line 771) | public java.lang.String getEmail() {
method setEmail (line 775) | public userExist_args setEmail(java.lang.String email) {
method unsetEmail (line 780) | public void unsetEmail() {
method isSetEmail (line 785) | public boolean isSetEmail() {
method setEmailIsSet (line 789) | public void setEmailIsSet(boolean value) {
method setFieldValue (line 795) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 808) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 818) | public boolean isSet(_Fields field) {
method equals (line 830) | @Override
method equals (line 839) | public boolean equals(userExist_args that) {
method hashCode (line 857) | @Override
method compareTo (line 868) | @Override
method fieldForId (line 889) | public _Fields fieldForId(int fieldId) {
method read (line 893) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 897) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 901) | @Override
method validate (line 917) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 922) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 930) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class userExist_argsStandardSchemeFactory (line 938) | private static class userExist_argsStandardSchemeFactory implements ...
method getScheme (line 939) | public userExist_argsStandardScheme getScheme() {
class userExist_argsStandardScheme (line 944) | private static class userExist_argsStandardScheme extends org.apache...
method read (line 946) | public void read(org.apache.thrift.protocol.TProtocol iprot, userE...
method write (line 975) | public void write(org.apache.thrift.protocol.TProtocol oprot, user...
class userExist_argsTupleSchemeFactory (line 990) | private static class userExist_argsTupleSchemeFactory implements org...
method getScheme (line 991) | public userExist_argsTupleScheme getScheme() {
class userExist_argsTupleScheme (line 996) | private static class userExist_argsTupleScheme extends org.apache.th...
method write (line 998) | @Override
method read (line 1011) | @Override
method scheme (line 1022) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class userExist_result (line 1027) | public static class userExist_result implements org.apache.thrift.TBas...
type _Fields (line 1038) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1052) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1065) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1074) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1081) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1086) | public short getThriftFieldId() {
method getFieldName (line 1090) | public java.lang.String getFieldName() {
method userExist_result (line 1107) | public userExist_result() {
method userExist_result (line 1110) | public userExist_result(
method userExist_result (line 1121) | public userExist_result(userExist_result other) {
method deepCopy (line 1126) | public userExist_result deepCopy() {
method clear (line 1130) | @Override
method isSuccess (line 1136) | public boolean isSuccess() {
method setSuccess (line 1140) | public userExist_result setSuccess(boolean success) {
method unsetSuccess (line 1146) | public void unsetSuccess() {
method isSetSuccess (line 1151) | public boolean isSetSuccess() {
method setSuccessIsSet (line 1155) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 1159) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1172) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1182) | public boolean isSet(_Fields field) {
method equals (line 1194) | @Override
method equals (line 1203) | public boolean equals(userExist_result that) {
method hashCode (line 1221) | @Override
method compareTo (line 1230) | @Override
method fieldForId (line 1251) | public _Fields fieldForId(int fieldId) {
method read (line 1255) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1259) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1263) | @Override
method validate (line 1275) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1280) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 1288) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class userExist_resultStandardSchemeFactory (line 1298) | private static class userExist_resultStandardSchemeFactory implement...
method getScheme (line 1299) | public userExist_resultStandardScheme getScheme() {
class userExist_resultStandardScheme (line 1304) | private static class userExist_resultStandardScheme extends org.apac...
method read (line 1306) | public void read(org.apache.thrift.protocol.TProtocol iprot, userE...
method write (line 1335) | public void write(org.apache.thrift.protocol.TProtocol oprot, user...
class userExist_resultTupleSchemeFactory (line 1350) | private static class userExist_resultTupleSchemeFactory implements o...
method getScheme (line 1351) | public userExist_resultTupleScheme getScheme() {
class userExist_resultTupleScheme (line 1356) | private static class userExist_resultTupleScheme extends org.apache....
method write (line 1358) | @Override
method read (line 1371) | @Override
method scheme (line 1382) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class createUser_args (line 1387) | public static class createUser_args implements org.apache.thrift.TBase...
type _Fields (line 1398) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1412) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1425) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1434) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1441) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1446) | public short getThriftFieldId() {
method getFieldName (line 1450) | public java.lang.String getFieldName() {
method createUser_args (line 1465) | public createUser_args() {
method createUser_args (line 1468) | public createUser_args(
method createUser_args (line 1478) | public createUser_args(createUser_args other) {
method deepCopy (line 1484) | public createUser_args deepCopy() {
method clear (line 1488) | @Override
method getUser (line 1493) | public User getUser() {
method setUser (line 1497) | public createUser_args setUser(User user) {
method unsetUser (line 1502) | public void unsetUser() {
method isSetUser (line 1507) | public boolean isSetUser() {
method setUserIsSet (line 1511) | public void setUserIsSet(boolean value) {
method setFieldValue (line 1517) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1530) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1540) | public boolean isSet(_Fields field) {
method equals (line 1552) | @Override
method equals (line 1561) | public boolean equals(createUser_args that) {
method hashCode (line 1579) | @Override
method compareTo (line 1590) | @Override
method fieldForId (line 1611) | public _Fields fieldForId(int fieldId) {
method read (line 1615) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1619) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1623) | @Override
method validate (line 1639) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1647) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 1655) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class createUser_argsStandardSchemeFactory (line 1663) | private static class createUser_argsStandardSchemeFactory implements...
method getScheme (line 1664) | public createUser_argsStandardScheme getScheme() {
class createUser_argsStandardScheme (line 1669) | private static class createUser_argsStandardScheme extends org.apach...
method read (line 1671) | public void read(org.apache.thrift.protocol.TProtocol iprot, creat...
method write (line 1701) | public void write(org.apache.thrift.protocol.TProtocol oprot, crea...
class createUser_argsTupleSchemeFactory (line 1716) | private static class createUser_argsTupleSchemeFactory implements or...
method getScheme (line 1717) | public createUser_argsTupleScheme getScheme() {
class createUser_argsTupleScheme (line 1722) | private static class createUser_argsTupleScheme extends org.apache.t...
method write (line 1724) | @Override
method read (line 1737) | @Override
method scheme (line 1749) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class createUser_result (line 1754) | public static class createUser_result implements org.apache.thrift.TBa...
type _Fields (line 1765) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1779) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1792) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1801) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1808) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1813) | public short getThriftFieldId() {
method getFieldName (line 1817) | public java.lang.String getFieldName() {
method createUser_result (line 1834) | public createUser_result() {
method createUser_result (line 1837) | public createUser_result(
method createUser_result (line 1848) | public createUser_result(createUser_result other) {
method deepCopy (line 1853) | public createUser_result deepCopy() {
method clear (line 1857) | @Override
method isSuccess (line 1863) | public boolean isSuccess() {
method setSuccess (line 1867) | public createUser_result setSuccess(boolean success) {
method unsetSuccess (line 1873) | public void unsetSuccess() {
method isSetSuccess (line 1878) | public boolean isSetSuccess() {
method setSuccessIsSet (line 1882) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 1886) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1899) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1909) | public boolean isSet(_Fields field) {
method equals (line 1921) | @Override
method equals (line 1930) | public boolean equals(createUser_result that) {
method hashCode (line 1948) | @Override
method compareTo (line 1957) | @Override
method fieldForId (line 1978) | public _Fields fieldForId(int fieldId) {
method read (line 1982) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1986) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1990) | @Override
method validate (line 2002) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2007) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2015) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class createUser_resultStandardSchemeFactory (line 2025) | private static class createUser_resultStandardSchemeFactory implemen...
method getScheme (line 2026) | public createUser_resultStandardScheme getScheme() {
class createUser_resultStandardScheme (line 2031) | private static class createUser_resultStandardScheme extends org.apa...
method read (line 2033) | public void read(org.apache.thrift.protocol.TProtocol iprot, creat...
method write (line 2062) | public void write(org.apache.thrift.protocol.TProtocol oprot, crea...
class createUser_resultTupleSchemeFactory (line 2077) | private static class createUser_resultTupleSchemeFactory implements ...
method getScheme (line 2078) | public createUser_resultTupleScheme getScheme() {
class createUser_resultTupleScheme (line 2083) | private static class createUser_resultTupleScheme extends org.apache...
method write (line 2085) | @Override
method read (line 2098) | @Override
method scheme (line 2109) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class getUser_args (line 2114) | public static class getUser_args implements org.apache.thrift.TBase<ge...
type _Fields (line 2125) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 2139) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 2152) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 2161) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 2168) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 2173) | public short getThriftFieldId() {
method getFieldName (line 2177) | public java.lang.String getFieldName() {
method getUser_args (line 2194) | public getUser_args() {
method getUser_args (line 2197) | public getUser_args(
method getUser_args (line 2208) | public getUser_args(getUser_args other) {
method deepCopy (line 2213) | public getUser_args deepCopy() {
method clear (line 2217) | @Override
method getId (line 2223) | public long getId() {
method setId (line 2227) | public getUser_args setId(long id) {
method unsetId (line 2233) | public void unsetId() {
method isSetId (line 2238) | public boolean isSetId() {
method setIdIsSet (line 2242) | public void setIdIsSet(boolean value) {
method setFieldValue (line 2246) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 2259) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 2269) | public boolean isSet(_Fields field) {
method equals (line 2281) | @Override
method equals (line 2290) | public boolean equals(getUser_args that) {
method hashCode (line 2308) | @Override
method compareTo (line 2317) | @Override
method fieldForId (line 2338) | public _Fields fieldForId(int fieldId) {
method read (line 2342) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 2346) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 2350) | @Override
method validate (line 2362) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2367) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2375) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class getUser_argsStandardSchemeFactory (line 2385) | private static class getUser_argsStandardSchemeFactory implements or...
method getScheme (line 2386) | public getUser_argsStandardScheme getScheme() {
class getUser_argsStandardScheme (line 2391) | private static class getUser_argsStandardScheme extends org.apache.t...
method read (line 2393) | public void read(org.apache.thrift.protocol.TProtocol iprot, getUs...
method write (line 2422) | public void write(org.apache.thrift.protocol.TProtocol oprot, getU...
class getUser_argsTupleSchemeFactory (line 2435) | private static class getUser_argsTupleSchemeFactory implements org.a...
method getScheme (line 2436) | public getUser_argsTupleScheme getScheme() {
class getUser_argsTupleScheme (line 2441) | private static class getUser_argsTupleScheme extends org.apache.thri...
method write (line 2443) | @Override
method read (line 2456) | @Override
method scheme (line 2467) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class getUser_result (line 2472) | public static class getUser_result implements org.apache.thrift.TBase<...
type _Fields (line 2483) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 2497) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 2510) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 2519) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 2526) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 2531) | public short getThriftFieldId() {
method getFieldName (line 2535) | public java.lang.String getFieldName() {
method getUser_result (line 2550) | public getUser_result() {
method getUser_result (line 2553) | public getUser_result(
method getUser_result (line 2563) | public getUser_result(getUser_result other) {
method deepCopy (line 2569) | public getUser_result deepCopy() {
method clear (line 2573) | @Override
method getSuccess (line 2578) | public User getSuccess() {
method setSuccess (line 2582) | public getUser_result setSuccess(User success) {
method unsetSuccess (line 2587) | public void unsetSuccess() {
method isSetSuccess (line 2592) | public boolean isSetSuccess() {
method setSuccessIsSet (line 2596) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 2602) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 2615) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 2625) | public boolean isSet(_Fields field) {
method equals (line 2637) | @Override
method equals (line 2646) | public boolean equals(getUser_result that) {
method hashCode (line 2664) | @Override
method compareTo (line 2675) | @Override
method fieldForId (line 2696) | public _Fields fieldForId(int fieldId) {
method read (line 2700) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 2704) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 2708) | @Override
method validate (line 2724) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2732) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2740) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class getUser_resultStandardSchemeFactory (line 2748) | private static class getUser_resultStandardSchemeFactory implements ...
method getScheme (line 2749) | public getUser_resultStandardScheme getScheme() {
class getUser_resultStandardScheme (line 2754) | private static class getUser_resultStandardScheme extends org.apache...
method read (line 2756) | public void read(org.apache.thrift.protocol.TProtocol iprot, getUs...
method write (line 2786) | public void write(org.apache.thrift.protocol.TProtocol oprot, getU...
class getUser_resultTupleSchemeFactory (line 2801) | private static class getUser_resultTupleSchemeFactory implements org...
method getScheme (line 2802) | public getUser_resultTupleScheme getScheme() {
class getUser_resultTupleScheme (line 2807) | private static class getUser_resultTupleScheme extends org.apache.th...
method write (line 2809) | @Override
method read (line 2822) | @Override
method scheme (line 2834) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class listUser_args (line 2839) | public static class listUser_args implements org.apache.thrift.TBase<l...
type _Fields (line 2850) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 2864) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 2877) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 2886) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 2893) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 2898) | public short getThriftFieldId() {
method getFieldName (line 2902) | public java.lang.String getFieldName() {
method listUser_args (line 2919) | public listUser_args() {
method listUser_args (line 2922) | public listUser_args(
method listUser_args (line 2933) | public listUser_args(listUser_args other) {
method deepCopy (line 2938) | public listUser_args deepCopy() {
method clear (line 2942) | @Override
method getPageNo (line 2948) | public int getPageNo() {
method setPageNo (line 2952) | public listUser_args setPageNo(int pageNo) {
method unsetPageNo (line 2958) | public void unsetPageNo() {
method isSetPageNo (line 2963) | public boolean isSetPageNo() {
method setPageNoIsSet (line 2967) | public void setPageNoIsSet(boolean value) {
method setFieldValue (line 2971) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 2984) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 2994) | public boolean isSet(_Fields field) {
method equals (line 3006) | @Override
method equals (line 3015) | public boolean equals(listUser_args that) {
method hashCode (line 3033) | @Override
method compareTo (line 3042) | @Override
method fieldForId (line 3063) | public _Fields fieldForId(int fieldId) {
method read (line 3067) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 3071) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 3075) | @Override
method validate (line 3087) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 3092) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 3100) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class listUser_argsStandardSchemeFactory (line 3110) | private static class listUser_argsStandardSchemeFactory implements o...
method getScheme (line 3111) | public listUser_argsStandardScheme getScheme() {
class listUser_argsStandardScheme (line 3116) | private static class listUser_argsStandardScheme extends org.apache....
method read (line 3118) | public void read(org.apache.thrift.protocol.TProtocol iprot, listU...
method write (line 3147) | public void write(org.apache.thrift.protocol.TProtocol oprot, list...
class listUser_argsTupleSchemeFactory (line 3160) | private static class listUser_argsTupleSchemeFactory implements org....
method getScheme (line 3161) | public listUser_argsTupleScheme getScheme() {
class listUser_argsTupleScheme (line 3166) | private static class listUser_argsTupleScheme extends org.apache.thr...
method write (line 3168) | @Override
method read (line 3181) | @Override
method scheme (line 3192) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class listUser_result (line 3197) | public static class listUser_result implements org.apache.thrift.TBase...
type _Fields (line 3208) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 3222) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 3235) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 3244) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 3251) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 3256) | public short getThriftFieldId() {
method getFieldName (line 3260) | public java.lang.String getFieldName() {
method listUser_result (line 3275) | public listUser_result() {
method listUser_result (line 3278) | public listUser_result(
method listUser_result (line 3288) | public listUser_result(listUser_result other) {
method deepCopy (line 3294) | public listUser_result deepCopy() {
method clear (line 3298) | @Override
method getSuccess (line 3303) | public UserPage getSuccess() {
method setSuccess (line 3307) | public listUser_result setSuccess(UserPage success) {
method unsetSuccess (line 3312) | public void unsetSuccess() {
method isSetSuccess (line 3317) | public boolean isSetSuccess() {
method setSuccessIsSet (line 3321) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 3327) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 3340) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 3350) | public boolean isSet(_Fields field) {
method equals (line 3362) | @Override
method equals (line 3371) | public boolean equals(listUser_result that) {
method hashCode (line 3389) | @Override
method compareTo (line 3400) | @Override
method fieldForId (line 3421) | public _Fields fieldForId(int fieldId) {
method read (line 3425) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 3429) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 3433) | @Override
method validate (line 3449) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 3457) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 3465) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class listUser_resultStandardSchemeFactory (line 3473) | private static class listUser_resultStandardSchemeFactory implements...
method getScheme (line 3474) | public listUser_resultStandardScheme getScheme() {
class listUser_resultStandardScheme (line 3479) | private static class listUser_resultStandardScheme extends org.apach...
method read (line 3481) | public void read(org.apache.thrift.protocol.TProtocol iprot, listU...
method write (line 3511) | public void write(org.apache.thrift.protocol.TProtocol oprot, list...
class listUser_resultTupleSchemeFactory (line 3526) | private static class listUser_resultTupleSchemeFactory implements or...
method getScheme (line 3527) | public listUser_resultTupleScheme getScheme() {
class listUser_resultTupleScheme (line 3532) | private static class listUser_resultTupleScheme extends org.apache.t...
method write (line 3534) | @Override
method read (line 3547) | @Override
method scheme (line 3559) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
FILE: thrift-client/src/main/java/benchmark/rpc/thrift/UserServiceThriftClientImpl.java
class UserServiceThriftClientImpl (line 13) | public class UserServiceThriftClientImpl implements benchmark.service.Us...
method close (line 21) | @Override
method existUser (line 26) | @Override
method createUser (line 38) | @Override
method getUser (line 52) | @Override
method listUser (line 69) | @Override
method main (line 100) | public static void main(String[] args) throws IOException {
FILE: thrift-server/src/main/java/benchmark/rpc/Server.java
class Server (line 16) | public class Server {
method main (line 18) | public static void main(String[] args) throws TTransportException {
FILE: thrift-server/src/main/java/benchmark/rpc/thrift/Converter.java
class Converter (line 7) | public class Converter {
method toThrift (line 9) | public static benchmark.rpc.thrift.User toThrift(benchmark.bean.User u...
method toRaw (line 28) | public static benchmark.bean.User toRaw(benchmark.rpc.thrift.User user) {
FILE: thrift-server/src/main/java/benchmark/rpc/thrift/User.java
class User (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type _Fields (line 44) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 69) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 104) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 113) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 120) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 125) | public short getThriftFieldId() {
method getFieldName (line 129) | public java.lang.String getFieldName() {
method User (line 174) | public User() {
method User (line 177) | public User(
method User (line 215) | public User(User other) {
method deepCopy (line 244) | public User deepCopy() {
method clear (line 248) | @Override
method getId (line 270) | public long getId() {
method setId (line 274) | public User setId(long id) {
method unsetId (line 280) | public void unsetId() {
method isSetId (line 285) | public boolean isSetId() {
method setIdIsSet (line 289) | public void setIdIsSet(boolean value) {
method getName (line 293) | public java.lang.String getName() {
method setName (line 297) | public User setName(java.lang.String name) {
method unsetName (line 302) | public void unsetName() {
method isSetName (line 307) | public boolean isSetName() {
method setNameIsSet (line 311) | public void setNameIsSet(boolean value) {
method getSex (line 317) | public int getSex() {
method setSex (line 321) | public User setSex(int sex) {
method unsetSex (line 327) | public void unsetSex() {
method isSetSex (line 332) | public boolean isSetSex() {
method setSexIsSet (line 336) | public void setSexIsSet(boolean value) {
method getBirthday (line 340) | public int getBirthday() {
method setBirthday (line 344) | public User setBirthday(int birthday) {
method unsetBirthday (line 350) | public void unsetBirthday() {
method isSetBirthday (line 355) | public boolean isSetBirthday() {
method setBirthdayIsSet (line 359) | public void setBirthdayIsSet(boolean value) {
method getEmail (line 363) | public java.lang.String getEmail() {
method setEmail (line 367) | public User setEmail(java.lang.String email) {
method unsetEmail (line 372) | public void unsetEmail() {
method isSetEmail (line 377) | public boolean isSetEmail() {
method setEmailIsSet (line 381) | public void setEmailIsSet(boolean value) {
method getMobile (line 387) | public java.lang.String getMobile() {
method setMobile (line 391) | public User setMobile(java.lang.String mobile) {
method unsetMobile (line 396) | public void unsetMobile() {
method isSetMobile (line 401) | public boolean isSetMobile() {
method setMobileIsSet (line 405) | public void setMobileIsSet(boolean value) {
method getAddress (line 411) | public java.lang.String getAddress() {
method setAddress (line 415) | public User setAddress(java.lang.String address) {
method unsetAddress (line 420) | public void unsetAddress() {
method isSetAddress (line 425) | public boolean isSetAddress() {
method setAddressIsSet (line 429) | public void setAddressIsSet(boolean value) {
method getIcon (line 435) | public java.lang.String getIcon() {
method setIcon (line 439) | public User setIcon(java.lang.String icon) {
method unsetIcon (line 444) | public void unsetIcon() {
method isSetIcon (line 449) | public boolean isSetIcon() {
method setIconIsSet (line 453) | public void setIconIsSet(boolean value) {
method getPermissionsSize (line 459) | public int getPermissionsSize() {
method getPermissionsIterator (line 463) | public java.util.Iterator<java.lang.Integer> getPermissionsIterator() {
method addToPermissions (line 467) | public void addToPermissions(int elem) {
method getPermissions (line 474) | public java.util.List<java.lang.Integer> getPermissions() {
method setPermissions (line 478) | public User setPermissions(java.util.List<java.lang.Integer> permissio...
method unsetPermissions (line 483) | public void unsetPermissions() {
method isSetPermissions (line 488) | public boolean isSetPermissions() {
method setPermissionsIsSet (line 492) | public void setPermissionsIsSet(boolean value) {
method getStatus (line 498) | public int getStatus() {
method setStatus (line 502) | public User setStatus(int status) {
method unsetStatus (line 508) | public void unsetStatus() {
method isSetStatus (line 513) | public boolean isSetStatus() {
method setStatusIsSet (line 517) | public void setStatusIsSet(boolean value) {
method getCreateTime (line 521) | public long getCreateTime() {
method setCreateTime (line 525) | public User setCreateTime(long createTime) {
method unsetCreateTime (line 531) | public void unsetCreateTime() {
method isSetCreateTime (line 536) | public boolean isSetCreateTime() {
method setCreateTimeIsSet (line 540) | public void setCreateTimeIsSet(boolean value) {
method getUpdateTime (line 544) | public long getUpdateTime() {
method setUpdateTime (line 548) | public User setUpdateTime(long updateTime) {
method unsetUpdateTime (line 554) | public void unsetUpdateTime() {
method isSetUpdateTime (line 559) | public boolean isSetUpdateTime() {
method setUpdateTimeIsSet (line 563) | public void setUpdateTimeIsSet(boolean value) {
method setFieldValue (line 567) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 668) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 711) | public boolean isSet(_Fields field) {
method equals (line 745) | @Override
method equals (line 754) | public boolean equals(User that) {
method hashCode (line 871) | @Override
method compareTo (line 914) | @Override
method fieldForId (line 1045) | public _Fields fieldForId(int fieldId) {
method read (line 1049) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws or...
method write (line 1053) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws o...
method toString (line 1057) | @Override
method validate (line 1137) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1142) | private void writeObject(java.io.ObjectOutputStream out) throws java.i...
method readObject (line 1150) | private void readObject(java.io.ObjectInputStream in) throws java.io.I...
class UserStandardSchemeFactory (line 1160) | private static class UserStandardSchemeFactory implements org.apache.t...
method getScheme (line 1161) | public UserStandardScheme getScheme() {
class UserStandardScheme (line 1166) | private static class UserStandardScheme extends org.apache.thrift.sche...
method read (line 1168) | public void read(org.apache.thrift.protocol.TProtocol iprot, User st...
method write (line 1295) | public void write(org.apache.thrift.protocol.TProtocol oprot, User s...
class UserTupleSchemeFactory (line 1360) | private static class UserTupleSchemeFactory implements org.apache.thri...
method getScheme (line 1361) | public UserTupleScheme getScheme() {
class UserTupleScheme (line 1366) | private static class UserTupleScheme extends org.apache.thrift.scheme....
method write (line 1368) | @Override
method read (line 1453) | @Override
method scheme (line 1517) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme(o...
FILE: thrift-server/src/main/java/benchmark/rpc/thrift/UserPage.java
class UserPage (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type _Fields (line 26) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 42) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 59) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 68) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 75) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 80) | public short getThriftFieldId() {
method getFieldName (line 84) | public java.lang.String getFieldName() {
method UserPage (line 107) | public UserPage() {
method UserPage (line 110) | public UserPage(
method UserPage (line 126) | public UserPage(UserPage other) {
method deepCopy (line 139) | public UserPage deepCopy() {
method clear (line 143) | @Override
method getPageNo (line 152) | public int getPageNo() {
method setPageNo (line 156) | public UserPage setPageNo(int pageNo) {
method unsetPageNo (line 162) | public void unsetPageNo() {
method isSetPageNo (line 167) | public boolean isSetPageNo() {
method setPageNoIsSet (line 171) | public void setPageNoIsSet(boolean value) {
method getTotal (line 175) | public int getTotal() {
method setTotal (line 179) | public UserPage setTotal(int total) {
method unsetTotal (line 185) | public void unsetTotal() {
method isSetTotal (line 190) | public boolean isSetTotal() {
method setTotalIsSet (line 194) | public void setTotalIsSet(boolean value) {
method getResultSize (line 198) | public int getResultSize() {
method getResultIterator (line 202) | public java.util.Iterator<User> getResultIterator() {
method addToResult (line 206) | public void addToResult(User elem) {
method getResult (line 213) | public java.util.List<User> getResult() {
method setResult (line 217) | public UserPage setResult(java.util.List<User> result) {
method unsetResult (line 222) | public void unsetResult() {
method isSetResult (line 227) | public boolean isSetResult() {
method setResultIsSet (line 231) | public void setResultIsSet(boolean value) {
method setFieldValue (line 237) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 266) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 282) | public boolean isSet(_Fields field) {
method equals (line 298) | @Override
method equals (line 307) | public boolean equals(UserPage that) {
method hashCode (line 343) | @Override
method compareTo (line 358) | @Override
method fieldForId (line 399) | public _Fields fieldForId(int fieldId) {
method read (line 403) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws or...
method write (line 407) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws o...
method toString (line 411) | @Override
method validate (line 435) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 440) | private void writeObject(java.io.ObjectOutputStream out) throws java.i...
method readObject (line 448) | private void readObject(java.io.ObjectInputStream in) throws java.io.I...
class UserPageStandardSchemeFactory (line 458) | private static class UserPageStandardSchemeFactory implements org.apac...
method getScheme (line 459) | public UserPageStandardScheme getScheme() {
class UserPageStandardScheme (line 464) | private static class UserPageStandardScheme extends org.apache.thrift....
method read (line 466) | public void read(org.apache.thrift.protocol.TProtocol iprot, UserPag...
method write (line 522) | public void write(org.apache.thrift.protocol.TProtocol oprot, UserPa...
class UserPageTupleSchemeFactory (line 550) | private static class UserPageTupleSchemeFactory implements org.apache....
method getScheme (line 551) | public UserPageTupleScheme getScheme() {
class UserPageTupleScheme (line 556) | private static class UserPageTupleScheme extends org.apache.thrift.sch...
method write (line 558) | @Override
method read (line 589) | @Override
method scheme (line 618) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme(o...
FILE: thrift-server/src/main/java/benchmark/rpc/thrift/UserService.java
class UserService (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type Iface (line 13) | public interface Iface {
method userExist (line 15) | public boolean userExist(java.lang.String email) throws org.apache.t...
method createUser (line 17) | public boolean createUser(User user) throws org.apache.thrift.TExcep...
method getUser (line 19) | public User getUser(long id) throws org.apache.thrift.TException;
method listUser (line 21) | public UserPage listUser(int pageNo) throws org.apache.thrift.TExcep...
type AsyncIface (line 25) | public interface AsyncIface {
method userExist (line 27) | public void userExist(java.lang.String email, org.apache.thrift.asyn...
method createUser (line 29) | public void createUser(User user, org.apache.thrift.async.AsyncMetho...
method getUser (line 31) | public void getUser(long id, org.apache.thrift.async.AsyncMethodCall...
method listUser (line 33) | public void listUser(int pageNo, org.apache.thrift.async.AsyncMethod...
class Client (line 37) | public static class Client extends org.apache.thrift.TServiceClient im...
class Factory (line 38) | public static class Factory implements org.apache.thrift.TServiceCli...
method Factory (line 39) | public Factory() {}
method getClient (line 40) | public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
method getClient (line 43) | public Client getClient(org.apache.thrift.protocol.TProtocol iprot...
method Client (line 48) | public Client(org.apache.thrift.protocol.TProtocol prot)
method Client (line 53) | public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache...
method userExist (line 57) | public boolean userExist(java.lang.String email) throws org.apache.t...
method send_userExist (line 63) | public void send_userExist(java.lang.String email) throws org.apache...
method recv_userExist (line 70) | public boolean recv_userExist() throws org.apache.thrift.TException
method createUser (line 80) | public boolean createUser(User user) throws org.apache.thrift.TExcep...
method send_createUser (line 86) | public void send_createUser(User user) throws org.apache.thrift.TExc...
method recv_createUser (line 93) | public boolean recv_createUser() throws org.apache.thrift.TException
method getUser (line 103) | public User getUser(long id) throws org.apache.thrift.TException
method send_getUser (line 109) | public void send_getUser(long id) throws org.apache.thrift.TException
method recv_getUser (line 116) | public User recv_getUser() throws org.apache.thrift.TException
method listUser (line 126) | public UserPage listUser(int pageNo) throws org.apache.thrift.TExcep...
method send_listUser (line 132) | public void send_listUser(int pageNo) throws org.apache.thrift.TExce...
method recv_listUser (line 139) | public UserPage recv_listUser() throws org.apache.thrift.TException
class AsyncClient (line 150) | public static class AsyncClient extends org.apache.thrift.async.TAsync...
class Factory (line 151) | public static class Factory implements org.apache.thrift.async.TAsyn...
method Factory (line 154) | public Factory(org.apache.thrift.async.TAsyncClientManager clientM...
method getAsyncClient (line 158) | public AsyncClient getAsyncClient(org.apache.thrift.transport.TNon...
method AsyncClient (line 163) | public AsyncClient(org.apache.thrift.protocol.TProtocolFactory proto...
method userExist (line 167) | public void userExist(java.lang.String email, org.apache.thrift.asyn...
class userExist_call (line 174) | public static class userExist_call extends org.apache.thrift.async.T...
method userExist_call (line 176) | public userExist_call(java.lang.String email, org.apache.thrift.as...
method write_args (line 181) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 189) | public java.lang.Boolean getResult() throws org.apache.thrift.TExc...
method createUser (line 199) | public void createUser(User user, org.apache.thrift.async.AsyncMetho...
class createUser_call (line 206) | public static class createUser_call extends org.apache.thrift.async....
method createUser_call (line 208) | public createUser_call(User user, org.apache.thrift.async.AsyncMet...
method write_args (line 213) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 221) | public java.lang.Boolean getResult() throws org.apache.thrift.TExc...
method getUser (line 231) | public void getUser(long id, org.apache.thrift.async.AsyncMethodCall...
class getUser_call (line 238) | public static class getUser_call extends org.apache.thrift.async.TAs...
method getUser_call (line 240) | public getUser_call(long id, org.apache.thrift.async.AsyncMethodCa...
method write_args (line 245) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 253) | public User getResult() throws org.apache.thrift.TException {
method listUser (line 263) | public void listUser(int pageNo, org.apache.thrift.async.AsyncMethod...
class listUser_call (line 270) | public static class listUser_call extends org.apache.thrift.async.TA...
method listUser_call (line 272) | public listUser_call(int pageNo, org.apache.thrift.async.AsyncMeth...
method write_args (line 277) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 285) | public UserPage getResult() throws org.apache.thrift.TException {
class Processor (line 297) | public static class Processor<I extends Iface> extends org.apache.thri...
method Processor (line 299) | public Processor(I iface) {
method Processor (line 303) | protected Processor(I iface, java.util.Map<java.lang.String, org.apa...
method getProcessMap (line 307) | private static <I extends Iface> java.util.Map<java.lang.String, or...
class userExist (line 315) | public static class userExist<I extends Iface> extends org.apache.th...
method userExist (line 316) | public userExist() {
method getEmptyArgsInstance (line 320) | public userExist_args getEmptyArgsInstance() {
method isOneway (line 324) | protected boolean isOneway() {
method getResult (line 328) | public userExist_result getResult(I iface, userExist_args args) th...
class createUser (line 336) | public static class createUser<I extends Iface> extends org.apache.t...
method createUser (line 337) | public createUser() {
method getEmptyArgsInstance (line 341) | public createUser_args getEmptyArgsInstance() {
method isOneway (line 345) | protected boolean isOneway() {
method getResult (line 349) | public createUser_result getResult(I iface, createUser_args args) ...
class getUser (line 357) | public static class getUser<I extends Iface> extends org.apache.thri...
method getUser (line 358) | public getUser() {
method getEmptyArgsInstance (line 362) | public getUser_args getEmptyArgsInstance() {
method isOneway (line 366) | protected boolean isOneway() {
method getResult (line 370) | public getUser_result getResult(I iface, getUser_args args) throws...
class listUser (line 377) | public static class listUser<I extends Iface> extends org.apache.thr...
method listUser (line 378) | public listUser() {
method getEmptyArgsInstance (line 382) | public listUser_args getEmptyArgsInstance() {
method isOneway (line 386) | protected boolean isOneway() {
method getResult (line 390) | public listUser_result getResult(I iface, listUser_args args) thro...
class AsyncProcessor (line 399) | public static class AsyncProcessor<I extends AsyncIface> extends org.a...
method AsyncProcessor (line 401) | public AsyncProcessor(I iface) {
method AsyncProcessor (line 405) | protected AsyncProcessor(I iface, java.util.Map<java.lang.String, o...
method getProcessMap (line 409) | private static <I extends AsyncIface> java.util.Map<java.lang.String...
class userExist (line 417) | public static class userExist<I extends AsyncIface> extends org.apac...
method userExist (line 418) | public userExist() {
method getEmptyArgsInstance (line 422) | public userExist_args getEmptyArgsInstance() {
method getResultHandler (line 426) | public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boole...
method isOneway (line 470) | protected boolean isOneway() {
method start (line 474) | public void start(I iface, userExist_args args, org.apache.thrift....
class createUser (line 479) | public static class createUser<I extends AsyncIface> extends org.apa...
method createUser (line 480) | public createUser() {
method getEmptyArgsInstance (line 484) | public createUser_args getEmptyArgsInstance() {
method getResultHandler (line 488) | public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boole...
method isOneway (line 532) | protected boolean isOneway() {
method start (line 536) | public void start(I iface, createUser_args args, org.apache.thrift...
class getUser (line 541) | public static class getUser<I extends AsyncIface> extends org.apache...
method getUser (line 542) | public getUser() {
method getEmptyArgsInstance (line 546) | public getUser_args getEmptyArgsInstance() {
method getResultHandler (line 550) | public org.apache.thrift.async.AsyncMethodCallback<User> getResult...
method isOneway (line 593) | protected boolean isOneway() {
method start (line 597) | public void start(I iface, getUser_args args, org.apache.thrift.as...
class listUser (line 602) | public static class listUser<I extends AsyncIface> extends org.apach...
method listUser (line 603) | public listUser() {
method getEmptyArgsInstance (line 607) | public listUser_args getEmptyArgsInstance() {
method getResultHandler (line 611) | public org.apache.thrift.async.AsyncMethodCallback<UserPage> getRe...
method isOneway (line 654) | protected boolean isOneway() {
method start (line 658) | public void start(I iface, listUser_args args, org.apache.thrift.a...
class userExist_args (line 665) | public static class userExist_args implements org.apache.thrift.TBase<...
type _Fields (line 676) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 690) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 703) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 712) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 719) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 724) | public short getThriftFieldId() {
method getFieldName (line 728) | public java.lang.String getFieldName() {
method userExist_args (line 743) | public userExist_args() {
method userExist_args (line 746) | public userExist_args(
method userExist_args (line 756) | public userExist_args(userExist_args other) {
method deepCopy (line 762) | public userExist_args deepCopy() {
method clear (line 766) | @Override
method getEmail (line 771) | public java.lang.String getEmail() {
method setEmail (line 775) | public userExist_args setEmail(java.lang.String email) {
method unsetEmail (line 780) | public void unsetEmail() {
method isSetEmail (line 785) | public boolean isSetEmail() {
method setEmailIsSet (line 789) | public void setEmailIsSet(boolean value) {
method setFieldValue (line 795) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 808) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 818) | public boolean isSet(_Fields field) {
method equals (line 830) | @Override
method equals (line 839) | public boolean equals(userExist_args that) {
method hashCode (line 857) | @Override
method compareTo (line 868) | @Override
method fieldForId (line 889) | public _Fields fieldForId(int fieldId) {
method read (line 893) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 897) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 901) | @Override
method validate (line 917) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 922) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 930) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class userExist_argsStandardSchemeFactory (line 938) | private static class userExist_argsStandardSchemeFactory implements ...
method getScheme (line 939) | public userExist_argsStandardScheme getScheme() {
class userExist_argsStandardScheme (line 944) | private static class userExist_argsStandardScheme extends org.apache...
method read (line 946) | public void read(org.apache.thrift.protocol.TProtocol iprot, userE...
method write (line 975) | public void write(org.apache.thrift.protocol.TProtocol oprot, user...
class userExist_argsTupleSchemeFactory (line 990) | private static class userExist_argsTupleSchemeFactory implements org...
method getScheme (line 991) | public userExist_argsTupleScheme getScheme() {
class userExist_argsTupleScheme (line 996) | private static class userExist_argsTupleScheme extends org.apache.th...
method write (line 998) | @Override
method read (line 1011) | @Override
method scheme (line 1022) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class userExist_result (line 1027) | public static class userExist_result implements org.apache.thrift.TBas...
type _Fields (line 1038) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1052) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1065) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1074) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1081) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1086) | public short getThriftFieldId() {
method getFieldName (line 1090) | public java.lang.String getFieldName() {
method userExist_result (line 1107) | public userExist_result() {
method userExist_result (line 1110) | public userExist_result(
method userExist_result (line 1121) | public userExist_result(userExist_result other) {
method deepCopy (line 1126) | public userExist_result deepCopy() {
method clear (line 1130) | @Override
method isSuccess (line 1136) | public boolean isSuccess() {
method setSuccess (line 1140) | public userExist_result setSuccess(boolean success) {
method unsetSuccess (line 1146) | public void unsetSuccess() {
method isSetSuccess (line 1151) | public boolean isSetSuccess() {
method setSuccessIsSet (line 1155) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 1159) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1172) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1182) | public boolean isSet(_Fields field) {
method equals (line 1194) | @Override
method equals (line 1203) | public boolean equals(userExist_result that) {
method hashCode (line 1221) | @Override
method compareTo (line 1230) | @Override
method fieldForId (line 1251) | public _Fields fieldForId(int fieldId) {
method read (line 1255) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1259) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1263) | @Override
method validate (line 1275) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1280) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 1288) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class userExist_resultStandardSchemeFactory (line 1298) | private static class userExist_resultStandardSchemeFactory implement...
method getScheme (line 1299) | public userExist_resultStandardScheme getScheme() {
class userExist_resultStandardScheme (line 1304) | private static class userExist_resultStandardScheme extends org.apac...
method read (line 1306) | public void read(org.apache.thrift.protocol.TProtocol iprot, userE...
method write (line 1335) | public void write(org.apache.thrift.protocol.TProtocol oprot, user...
class userExist_resultTupleSchemeFactory (line 1350) | private static class userExist_resultTupleSchemeFactory implements o...
method getScheme (line 1351) | public userExist_resultTupleScheme getScheme() {
class userExist_resultTupleScheme (line 1356) | private static class userExist_resultTupleScheme extends org.apache....
method write (line 1358) | @Override
method read (line 1371) | @Override
method scheme (line 1382) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class createUser_args (line 1387) | public static class createUser_args implements org.apache.thrift.TBase...
type _Fields (line 1398) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1412) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1425) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1434) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1441) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1446) | public short getThriftFieldId() {
method getFieldName (line 1450) | public java.lang.String getFieldName() {
method createUser_args (line 1465) | public createUser_args() {
method createUser_args (line 1468) | public createUser_args(
method createUser_args (line 1478) | public createUser_args(createUser_args other) {
method deepCopy (line 1484) | public createUser_args deepCopy() {
method clear (line 1488) | @Override
method getUser (line 1493) | public User getUser() {
method setUser (line 1497) | public createUser_args setUser(User user) {
method unsetUser (line 1502) | public void unsetUser() {
method isSetUser (line 1507) | public boolean isSetUser() {
method setUserIsSet (line 1511) | public void setUserIsSet(boolean value) {
method setFieldValue (line 1517) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1530) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1540) | public boolean isSet(_Fields field) {
method equals (line 1552) | @Override
method equals (line 1561) | public boolean equals(createUser_args that) {
method hashCode (line 1579) | @Override
method compareTo (line 1590) | @Override
method fieldForId (line 1611) | public _Fields fieldForId(int fieldId) {
method read (line 1615) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1619) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1623) | @Override
method validate (line 1639) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1647) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 1655) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class createUser_argsStandardSchemeFactory (line 1663) | private static class createUser_argsStandardSchemeFactory implements...
method getScheme (line 1664) | public createUser_argsStandardScheme getScheme() {
class createUser_argsStandardScheme (line 1669) | private static class createUser_argsStandardScheme extends org.apach...
method read (line 1671) | public void read(org.apache.thrift.protocol.TProtocol iprot, creat...
method write (line 1701) | public void write(org.apache.thrift.protocol.TProtocol oprot, crea...
class createUser_argsTupleSchemeFactory (line 1716) | private static class createUser_argsTupleSchemeFactory implements or...
method getScheme (line 1717) | public createUser_argsTupleScheme getScheme() {
class createUser_argsTupleScheme (line 1722) | private static class createUser_argsTupleScheme extends org.apache.t...
method write (line 1724) | @Override
method read (line 1737) | @Override
method scheme (line 1749) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class createUser_result (line 1754) | public static class createUser_result implements org.apache.thrift.TBa...
type _Fields (line 1765) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1779) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1792) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1801) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1808) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1813) | public short getThriftFieldId() {
method getFieldName (line 1817) | public java.lang.String getFieldName() {
method createUser_result (line 1834) | public createUser_result() {
method createUser_result (line 1837) | public createUser_result(
method createUser_result (line 1848) | public createUser_result(createUser_result other) {
method deepCopy (line 1853) | public createUser_result deepCopy() {
method clear (line 1857) | @Override
method isSuccess (line 1863) | public boolean isSuccess() {
method setSuccess (line 1867) | public createUser_result setSuccess(boolean success) {
method unsetSuccess (line 1873) | public void unsetSuccess() {
method isSetSuccess (line 1878) | public boolean isSetSuccess() {
method setSuccessIsSet (line 1882) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 1886) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1899) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1909) | public boolean isSet(_Fields field) {
method equals (line 1921) | @Override
method equals (line 1930) | public boolean equals(createUser_result that) {
method hashCode (line 1948) | @Override
method compareTo (line 1957) | @Override
method fieldForId (line 1978) | public _Fields fieldForId(int fieldId) {
method read (line 1982) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1986) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1990) | @Override
method validate (line 2002) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2007) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2015) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class createUser_resultStandardSchemeFactory (line 2025) | private static class createUser_resultStandardSchemeFactory implemen...
method getScheme (line 2026) | public createUser_resultStandardScheme getScheme() {
class createUser_resultStandardScheme (line 2031) | private static class createUser_resultStandardScheme extends org.apa...
method read (line 2033) | public void read(org.apache.thrift.protocol.TProtocol iprot, creat...
method write (line 2062) | public void write(org.apache.thrift.protocol.TProtocol oprot, crea...
class createUser_resultTupleSchemeFactory (line 2077) | private static class createUser_resultTupleSchemeFactory implements ...
method getScheme (line 2078) | public createUser_resultTupleScheme getScheme() {
class createUser_resultTupleScheme (line 2083) | private static class createUser_resultTupleScheme extends org.apache...
method write (line 2085) | @Override
method read (line 2098) | @Override
method scheme (line 2109) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class getUser_args (line 2114) | public static class getUser_args implements org.apache.thrift.TBase<ge...
type _Fields (line 2125) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 2139) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 2152) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 2161) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 2168) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 2173) | public short getThriftFieldId() {
method getFieldName (line 2177) | public java.lang.String getFieldName() {
method getUser_args (line 2194) | public getUser_args() {
method getUser_args (line 2197) | public getUser_args(
method getUser_args (line 2208) | public getUser_args(getUser_args other) {
method deepCopy (line 2213) | public getUser_args deepCopy() {
method clear (line 2217) | @Override
method getId (line 2223) | public long getId() {
method setId (line 2227) | public getUser_args setId(long id) {
method unsetId (line 2233) | public void unsetId() {
method isSetId (line 2238) | public boolean isSetId() {
method setIdIsSet (line 2242) | public void setIdIsSet(boolean value) {
method setFieldValue (line 2246) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 2259) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 2269) | public boolean isSet(_Fields field) {
method equals (line 2281) | @Override
method equals (line 2290) | public boolean equals(getUser_args that) {
method hashCode (line 2308) | @Override
method compareTo (line 2317) | @Override
method fieldForId (line 2338) | public _Fields fieldForId(int fieldId) {
method read (line 2342) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 2346) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 2350) | @Override
method validate (line 2362) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2367) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2375) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class getUser_argsStandardSchemeFactory (line 2385) | private static class getUser_argsStandardSchemeFactory implements or...
method getScheme (line 2386) | public getUser_argsStandardScheme getScheme() {
class getUser_argsStandardScheme (line 2391) | private static class getUser_argsStandardScheme extends org.apache.t...
method read (line 2393) | public void read(org.apache.thrift.protocol.TProtocol iprot, getUs...
method write (line 2422) | public void write(org.apache.thrift.protocol.TProtocol oprot, getU...
class getUser_argsTupleSchemeFactory (line 2435) | private static class getUser_argsTupleSchemeFactory implements org.a...
method getScheme (line 2436) | public getUser_argsTupleScheme getScheme() {
class getUser_argsTupleScheme (line 2441) | private static class getUser_argsTupleScheme extends org.apache.thri...
method write (line 2443) | @Override
method read (line 2456) | @Override
method scheme (line 2467) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class getUser_result (line 2472) | public static class getUser_result implements org.apache.thrift.TBase<...
type _Fields (line 2483) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 2497) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 2510) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 2519) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 2526) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 2531) | public short getThriftFieldId() {
method getFieldName (line 2535) | public java.lang.String getFieldName() {
method getUser_result (line 2550) | public getUser_result() {
method getUser_result (line 2553) | public getUser_result(
method getUser_result (line 2563) | public getUser_result(getUser_result other) {
method deepCopy (line 2569) | public getUser_result deepCopy() {
method clear (line 2573) | @Override
method getSuccess (line 2578) | public User getSuccess() {
method setSuccess (line 2582) | public getUser_result setSuccess(User success) {
method unsetSuccess (line 2587) | public void unsetSuccess() {
method isSetSuccess (line 2592) | public boolean isSetSuccess() {
method setSuccessIsSet (line 2596) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 2602) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 2615) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 2625) | public boolean isSet(_Fields field) {
method equals (line 2637) | @Override
method equals (line 2646) | public boolean equals(getUser_result that) {
method hashCode (line 2664) | @Override
method compareTo (line 2675) | @Override
method fieldForId (line 2696) | public _Fields fieldForId(int fieldId) {
method read (line 2700) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 2704) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 2708) | @Override
method validate (line 2724) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2732) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2740) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class getUser_resultStandardSchemeFactory (line 2748) | private static class getUser_resultStandardSchemeFactory implements ...
method getScheme (line 2749) | public getUser_resultStandardScheme getScheme() {
class getUser_resultStandardScheme (line 2754) | private static class getUser_resultStandardScheme extends org.apache...
method read (line 2756) | public void read(org.apache.thrift.protocol.TProtocol iprot, getUs...
method write (line 2786) | public void write(org.apache.thrift.protocol.TProtocol oprot, getU...
class getUser_resultTupleSchemeFactory (line 2801) | private static class getUser_resultTupleSchemeFactory implements org...
method getScheme (line 2802) | public getUser_resultTupleScheme getScheme() {
class getUser_resultTupleScheme (line 2807) | private static class getUser_resultTupleScheme extends org.apache.th...
method write (line 2809) | @Override
method read (line 2822) | @Override
method scheme (line 2834) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class listUser_args (line 2839) | public static class listUser_args implements org.apache.thrift.TBase<l...
type _Fields (line 2850) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 2864) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 2877) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 2886) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 2893) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 2898) | public short getThriftFieldId() {
method getFieldName (line 2902) | public java.lang.String getFieldName() {
method listUser_args (line 2919) | public listUser_args() {
method listUser_args (line 2922) | public listUser_args(
method listUser_args (line 2933) | public listUser_args(listUser_args other) {
method deepCopy (line 2938) | public listUser_args deepCopy() {
method clear (line 2942) | @Override
method getPageNo (line 2948) | public int getPageNo() {
method setPageNo (line 2952) | public listUser_args setPageNo(int pageNo) {
method unsetPageNo (line 2958) | public void unsetPageNo() {
method isSetPageNo (line 2963) | public boolean isSetPageNo() {
method setPageNoIsSet (line 2967) | public void setPageNoIsSet(boolean value) {
method setFieldValue (line 2971) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 2984) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 2994) | public boolean isSet(_Fields field) {
method equals (line 3006) | @Override
method equals (line 3015) | public boolean equals(listUser_args that) {
method hashCode (line 3033) | @Override
method compareTo (line 3042) | @Override
method fieldForId (line 3063) | public _Fields fieldForId(int fieldId) {
method read (line 3067) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 3071) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 3075) | @Override
method validate (line 3087) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 3092) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 3100) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class listUser_argsStandardSchemeFactory (line 3110) | private static class listUser_argsStandardSchemeFactory implements o...
method getScheme (line 3111) | public listUser_argsStandardScheme getScheme() {
class listUser_argsStandardScheme (line 3116) | private static class listUser_argsStandardScheme extends org.apache....
method read (line 3118) | public void read(org.apache.thrift.protocol.TProtocol iprot, listU...
method write (line 3147) | public void write(org.apache.thrift.protocol.TProtocol oprot, list...
class listUser_argsTupleSchemeFactory (line 3160) | private static class listUser_argsTupleSchemeFactory implements org....
method getScheme (line 3161) | public listUser_argsTupleScheme getScheme() {
class listUser_argsTupleScheme (line 3166) | private static class listUser_argsTupleScheme extends org.apache.thr...
method write (line 3168) | @Override
method read (line 3181) | @Override
method scheme (line 3192) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class listUser_result (line 3197) | public static class listUser_result implements org.apache.thrift.TBase...
type _Fields (line 3208) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 3222) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 3235) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 3244) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 3251) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 3256) | public short getThriftFieldId() {
method getFieldName (line 3260) | public java.lang.String getFieldName() {
method listUser_result (line 3275) | public listUser_result() {
method listUser_result (line 3278) | public listUser_result(
method listUser_result (line 3288) | public listUser_result(listUser_result other) {
method deepCopy (line 3294) | public listUser_result deepCopy() {
method clear (line 3298) | @Override
method getSuccess (line 3303) | public UserPage getSuccess() {
method setSuccess (line 3307) | public listUser_result setSuccess(UserPage success) {
method unsetSuccess (line 3312) | public void unsetSuccess() {
method isSetSuccess (line 3317) | public boolean isSetSuccess() {
method setSuccessIsSet (line 3321) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 3327) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 3340) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 3350) | public boolean isSet(_Fields field) {
method equals (line 3362) | @Override
method equals (line 3371) | public boolean equals(listUser_result that) {
method hashCode (line 3389) | @Override
method compareTo (line 3400) | @Override
method fieldForId (line 3421) | public _Fields fieldForId(int fieldId) {
method read (line 3425) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 3429) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 3433) | @Override
method validate (line 3449) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 3457) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 3465) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class listUser_resultStandardSchemeFactory (line 3473) | private static class listUser_resultStandardSchemeFactory implements...
method getScheme (line 3474) | public listUser_resultStandardScheme getScheme() {
class listUser_resultStandardScheme (line 3479) | private static class listUser_resultStandardScheme extends org.apach...
method read (line 3481) | public void read(org.apache.thrift.protocol.TProtocol iprot, listU...
method write (line 3511) | public void write(org.apache.thrift.protocol.TProtocol oprot, list...
class listUser_resultTupleSchemeFactory (line 3526) | private static class listUser_resultTupleSchemeFactory implements or...
method getScheme (line 3527) | public listUser_resultTupleScheme getScheme() {
class listUser_resultTupleScheme (line 3532) | private static class listUser_resultTupleScheme extends org.apache.t...
method write (line 3534) | @Override
method read (line 3547) | @Override
method scheme (line 3559) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
FILE: thrift-server/src/main/java/benchmark/rpc/thrift/UserServiceThriftServerImpl.java
class UserServiceThriftServerImpl (line 11) | public class UserServiceThriftServerImpl implements UserService.Iface {
method userExist (line 15) | @Override
method createUser (line 20) | @Override
method getUser (line 26) | @Override
method listUser (line 34) | @Override
FILE: thrift-server/src/main/thrift/gen-java/benchmark/rpc/thrift/User.java
class User (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type _Fields (line 44) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 69) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 104) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 113) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 120) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 125) | public short getThriftFieldId() {
method getFieldName (line 129) | public java.lang.String getFieldName() {
method User (line 174) | public User() {
method User (line 177) | public User(
method User (line 215) | public User(User other) {
method deepCopy (line 244) | public User deepCopy() {
method clear (line 248) | @Override
method getId (line 270) | public long getId() {
method setId (line 274) | public User setId(long id) {
method unsetId (line 280) | public void unsetId() {
method isSetId (line 285) | public boolean isSetId() {
method setIdIsSet (line 289) | public void setIdIsSet(boolean value) {
method getName (line 293) | public java.lang.String getName() {
method setName (line 297) | public User setName(java.lang.String name) {
method unsetName (line 302) | public void unsetName() {
method isSetName (line 307) | public boolean isSetName() {
method setNameIsSet (line 311) | public void setNameIsSet(boolean value) {
method getSex (line 317) | public int getSex() {
method setSex (line 321) | public User setSex(int sex) {
method unsetSex (line 327) | public void unsetSex() {
method isSetSex (line 332) | public boolean isSetSex() {
method setSexIsSet (line 336) | public void setSexIsSet(boolean value) {
method getBirthday (line 340) | public int getBirthday() {
method setBirthday (line 344) | public User setBirthday(int birthday) {
method unsetBirthday (line 350) | public void unsetBirthday() {
method isSetBirthday (line 355) | public boolean isSetBirthday() {
method setBirthdayIsSet (line 359) | public void setBirthdayIsSet(boolean value) {
method getEmail (line 363) | public java.lang.String getEmail() {
method setEmail (line 367) | public User setEmail(java.lang.String email) {
method unsetEmail (line 372) | public void unsetEmail() {
method isSetEmail (line 377) | public boolean isSetEmail() {
method setEmailIsSet (line 381) | public void setEmailIsSet(boolean value) {
method getMobile (line 387) | public java.lang.String getMobile() {
method setMobile (line 391) | public User setMobile(java.lang.String mobile) {
method unsetMobile (line 396) | public void unsetMobile() {
method isSetMobile (line 401) | public boolean isSetMobile() {
method setMobileIsSet (line 405) | public void setMobileIsSet(boolean value) {
method getAddress (line 411) | public java.lang.String getAddress() {
method setAddress (line 415) | public User setAddress(java.lang.String address) {
method unsetAddress (line 420) | public void unsetAddress() {
method isSetAddress (line 425) | public boolean isSetAddress() {
method setAddressIsSet (line 429) | public void setAddressIsSet(boolean value) {
method getIcon (line 435) | public java.lang.String getIcon() {
method setIcon (line 439) | public User setIcon(java.lang.String icon) {
method unsetIcon (line 444) | public void unsetIcon() {
method isSetIcon (line 449) | public boolean isSetIcon() {
method setIconIsSet (line 453) | public void setIconIsSet(boolean value) {
method getPermissionsSize (line 459) | public int getPermissionsSize() {
method getPermissionsIterator (line 463) | public java.util.Iterator<java.lang.Integer> getPermissionsIterator() {
method addToPermissions (line 467) | public void addToPermissions(int elem) {
method getPermissions (line 474) | public java.util.List<java.lang.Integer> getPermissions() {
method setPermissions (line 478) | public User setPermissions(java.util.List<java.lang.Integer> permissio...
method unsetPermissions (line 483) | public void unsetPermissions() {
method isSetPermissions (line 488) | public boolean isSetPermissions() {
method setPermissionsIsSet (line 492) | public void setPermissionsIsSet(boolean value) {
method getStatus (line 498) | public int getStatus() {
method setStatus (line 502) | public User setStatus(int status) {
method unsetStatus (line 508) | public void unsetStatus() {
method isSetStatus (line 513) | public boolean isSetStatus() {
method setStatusIsSet (line 517) | public void setStatusIsSet(boolean value) {
method getCreateTime (line 521) | public long getCreateTime() {
method setCreateTime (line 525) | public User setCreateTime(long createTime) {
method unsetCreateTime (line 531) | public void unsetCreateTime() {
method isSetCreateTime (line 536) | public boolean isSetCreateTime() {
method setCreateTimeIsSet (line 540) | public void setCreateTimeIsSet(boolean value) {
method getUpdateTime (line 544) | public long getUpdateTime() {
method setUpdateTime (line 548) | public User setUpdateTime(long updateTime) {
method unsetUpdateTime (line 554) | public void unsetUpdateTime() {
method isSetUpdateTime (line 559) | public boolean isSetUpdateTime() {
method setUpdateTimeIsSet (line 563) | public void setUpdateTimeIsSet(boolean value) {
method setFieldValue (line 567) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 668) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 711) | public boolean isSet(_Fields field) {
method equals (line 745) | @Override
method equals (line 754) | public boolean equals(User that) {
method hashCode (line 871) | @Override
method compareTo (line 914) | @Override
method fieldForId (line 1045) | public _Fields fieldForId(int fieldId) {
method read (line 1049) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws or...
method write (line 1053) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws o...
method toString (line 1057) | @Override
method validate (line 1137) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1142) | private void writeObject(java.io.ObjectOutputStream out) throws java.i...
method readObject (line 1150) | private void readObject(java.io.ObjectInputStream in) throws java.io.I...
class UserStandardSchemeFactory (line 1160) | private static class UserStandardSchemeFactory implements org.apache.t...
method getScheme (line 1161) | public UserStandardScheme getScheme() {
class UserStandardScheme (line 1166) | private static class UserStandardScheme extends org.apache.thrift.sche...
method read (line 1168) | public void read(org.apache.thrift.protocol.TProtocol iprot, User st...
method write (line 1295) | public void write(org.apache.thrift.protocol.TProtocol oprot, User s...
class UserTupleSchemeFactory (line 1360) | private static class UserTupleSchemeFactory implements org.apache.thri...
method getScheme (line 1361) | public UserTupleScheme getScheme() {
class UserTupleScheme (line 1366) | private static class UserTupleScheme extends org.apache.thrift.scheme....
method write (line 1368) | @Override
method read (line 1453) | @Override
method scheme (line 1517) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme(o...
FILE: thrift-server/src/main/thrift/gen-java/benchmark/rpc/thrift/UserPage.java
class UserPage (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type _Fields (line 26) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 42) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 59) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 68) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 75) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 80) | public short getThriftFieldId() {
method getFieldName (line 84) | public java.lang.String getFieldName() {
method UserPage (line 107) | public UserPage() {
method UserPage (line 110) | public UserPage(
method UserPage (line 126) | public UserPage(UserPage other) {
method deepCopy (line 139) | public UserPage deepCopy() {
method clear (line 143) | @Override
method getPageNo (line 152) | public int getPageNo() {
method setPageNo (line 156) | public UserPage setPageNo(int pageNo) {
method unsetPageNo (line 162) | public void unsetPageNo() {
method isSetPageNo (line 167) | public boolean isSetPageNo() {
method setPageNoIsSet (line 171) | public void setPageNoIsSet(boolean value) {
method getTotal (line 175) | public int getTotal() {
method setTotal (line 179) | public UserPage setTotal(int total) {
method unsetTotal (line 185) | public void unsetTotal() {
method isSetTotal (line 190) | public boolean isSetTotal() {
method setTotalIsSet (line 194) | public void setTotalIsSet(boolean value) {
method getResultSize (line 198) | public int getResultSize() {
method getResultIterator (line 202) | public java.util.Iterator<User> getResultIterator() {
method addToResult (line 206) | public void addToResult(User elem) {
method getResult (line 213) | public java.util.List<User> getResult() {
method setResult (line 217) | public UserPage setResult(java.util.List<User> result) {
method unsetResult (line 222) | public void unsetResult() {
method isSetResult (line 227) | public boolean isSetResult() {
method setResultIsSet (line 231) | public void setResultIsSet(boolean value) {
method setFieldValue (line 237) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 266) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 282) | public boolean isSet(_Fields field) {
method equals (line 298) | @Override
method equals (line 307) | public boolean equals(UserPage that) {
method hashCode (line 343) | @Override
method compareTo (line 358) | @Override
method fieldForId (line 399) | public _Fields fieldForId(int fieldId) {
method read (line 403) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws or...
method write (line 407) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws o...
method toString (line 411) | @Override
method validate (line 435) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 440) | private void writeObject(java.io.ObjectOutputStream out) throws java.i...
method readObject (line 448) | private void readObject(java.io.ObjectInputStream in) throws java.io.I...
class UserPageStandardSchemeFactory (line 458) | private static class UserPageStandardSchemeFactory implements org.apac...
method getScheme (line 459) | public UserPageStandardScheme getScheme() {
class UserPageStandardScheme (line 464) | private static class UserPageStandardScheme extends org.apache.thrift....
method read (line 466) | public void read(org.apache.thrift.protocol.TProtocol iprot, UserPag...
method write (line 522) | public void write(org.apache.thrift.protocol.TProtocol oprot, UserPa...
class UserPageTupleSchemeFactory (line 550) | private static class UserPageTupleSchemeFactory implements org.apache....
method getScheme (line 551) | public UserPageTupleScheme getScheme() {
class UserPageTupleScheme (line 556) | private static class UserPageTupleScheme extends org.apache.thrift.sch...
method write (line 558) | @Override
method read (line 589) | @Override
method scheme (line 618) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme(o...
FILE: thrift-server/src/main/thrift/gen-java/benchmark/rpc/thrift/UserService.java
class UserService (line 9) | @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
type Iface (line 13) | public interface Iface {
method userExist (line 15) | public boolean userExist(java.lang.String email) throws org.apache.t...
method createUser (line 17) | public boolean createUser(User user) throws org.apache.thrift.TExcep...
method getUser (line 19) | public User getUser(long id) throws org.apache.thrift.TException;
method listUser (line 21) | public UserPage listUser(int pageNo) throws org.apache.thrift.TExcep...
type AsyncIface (line 25) | public interface AsyncIface {
method userExist (line 27) | public void userExist(java.lang.String email, org.apache.thrift.asyn...
method createUser (line 29) | public void createUser(User user, org.apache.thrift.async.AsyncMetho...
method getUser (line 31) | public void getUser(long id, org.apache.thrift.async.AsyncMethodCall...
method listUser (line 33) | public void listUser(int pageNo, org.apache.thrift.async.AsyncMethod...
class Client (line 37) | public static class Client extends org.apache.thrift.TServiceClient im...
class Factory (line 38) | public static class Factory implements org.apache.thrift.TServiceCli...
method Factory (line 39) | public Factory() {}
method getClient (line 40) | public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
method getClient (line 43) | public Client getClient(org.apache.thrift.protocol.TProtocol iprot...
method Client (line 48) | public Client(org.apache.thrift.protocol.TProtocol prot)
method Client (line 53) | public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache...
method userExist (line 57) | public boolean userExist(java.lang.String email) throws org.apache.t...
method send_userExist (line 63) | public void send_userExist(java.lang.String email) throws org.apache...
method recv_userExist (line 70) | public boolean recv_userExist() throws org.apache.thrift.TException
method createUser (line 80) | public boolean createUser(User user) throws org.apache.thrift.TExcep...
method send_createUser (line 86) | public void send_createUser(User user) throws org.apache.thrift.TExc...
method recv_createUser (line 93) | public boolean recv_createUser() throws org.apache.thrift.TException
method getUser (line 103) | public User getUser(long id) throws org.apache.thrift.TException
method send_getUser (line 109) | public void send_getUser(long id) throws org.apache.thrift.TException
method recv_getUser (line 116) | public User recv_getUser() throws org.apache.thrift.TException
method listUser (line 126) | public UserPage listUser(int pageNo) throws org.apache.thrift.TExcep...
method send_listUser (line 132) | public void send_listUser(int pageNo) throws org.apache.thrift.TExce...
method recv_listUser (line 139) | public UserPage recv_listUser() throws org.apache.thrift.TException
class AsyncClient (line 150) | public static class AsyncClient extends org.apache.thrift.async.TAsync...
class Factory (line 151) | public static class Factory implements org.apache.thrift.async.TAsyn...
method Factory (line 154) | public Factory(org.apache.thrift.async.TAsyncClientManager clientM...
method getAsyncClient (line 158) | public AsyncClient getAsyncClient(org.apache.thrift.transport.TNon...
method AsyncClient (line 163) | public AsyncClient(org.apache.thrift.protocol.TProtocolFactory proto...
method userExist (line 167) | public void userExist(java.lang.String email, org.apache.thrift.asyn...
class userExist_call (line 174) | public static class userExist_call extends org.apache.thrift.async.T...
method userExist_call (line 176) | public userExist_call(java.lang.String email, org.apache.thrift.as...
method write_args (line 181) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 189) | public java.lang.Boolean getResult() throws org.apache.thrift.TExc...
method createUser (line 199) | public void createUser(User user, org.apache.thrift.async.AsyncMetho...
class createUser_call (line 206) | public static class createUser_call extends org.apache.thrift.async....
method createUser_call (line 208) | public createUser_call(User user, org.apache.thrift.async.AsyncMet...
method write_args (line 213) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 221) | public java.lang.Boolean getResult() throws org.apache.thrift.TExc...
method getUser (line 231) | public void getUser(long id, org.apache.thrift.async.AsyncMethodCall...
class getUser_call (line 238) | public static class getUser_call extends org.apache.thrift.async.TAs...
method getUser_call (line 240) | public getUser_call(long id, org.apache.thrift.async.AsyncMethodCa...
method write_args (line 245) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 253) | public User getResult() throws org.apache.thrift.TException {
method listUser (line 263) | public void listUser(int pageNo, org.apache.thrift.async.AsyncMethod...
class listUser_call (line 270) | public static class listUser_call extends org.apache.thrift.async.TA...
method listUser_call (line 272) | public listUser_call(int pageNo, org.apache.thrift.async.AsyncMeth...
method write_args (line 277) | public void write_args(org.apache.thrift.protocol.TProtocol prot) ...
method getResult (line 285) | public UserPage getResult() throws org.apache.thrift.TException {
class Processor (line 297) | public static class Processor<I extends Iface> extends org.apache.thri...
method Processor (line 299) | public Processor(I iface) {
method Processor (line 303) | protected Processor(I iface, java.util.Map<java.lang.String, org.apa...
method getProcessMap (line 307) | private static <I extends Iface> java.util.Map<java.lang.String, or...
class userExist (line 315) | public static class userExist<I extends Iface> extends org.apache.th...
method userExist (line 316) | public userExist() {
method getEmptyArgsInstance (line 320) | public userExist_args getEmptyArgsInstance() {
method isOneway (line 324) | protected boolean isOneway() {
method getResult (line 328) | public userExist_result getResult(I iface, userExist_args args) th...
class createUser (line 336) | public static class createUser<I extends Iface> extends org.apache.t...
method createUser (line 337) | public createUser() {
method getEmptyArgsInstance (line 341) | public createUser_args getEmptyArgsInstance() {
method isOneway (line 345) | protected boolean isOneway() {
method getResult (line 349) | public createUser_result getResult(I iface, createUser_args args) ...
class getUser (line 357) | public static class getUser<I extends Iface> extends org.apache.thri...
method getUser (line 358) | public getUser() {
method getEmptyArgsInstance (line 362) | public getUser_args getEmptyArgsInstance() {
method isOneway (line 366) | protected boolean isOneway() {
method getResult (line 370) | public getUser_result getResult(I iface, getUser_args args) throws...
class listUser (line 377) | public static class listUser<I extends Iface> extends org.apache.thr...
method listUser (line 378) | public listUser() {
method getEmptyArgsInstance (line 382) | public listUser_args getEmptyArgsInstance() {
method isOneway (line 386) | protected boolean isOneway() {
method getResult (line 390) | public listUser_result getResult(I iface, listUser_args args) thro...
class AsyncProcessor (line 399) | public static class AsyncProcessor<I extends AsyncIface> extends org.a...
method AsyncProcessor (line 401) | public AsyncProcessor(I iface) {
method AsyncProcessor (line 405) | protected AsyncProcessor(I iface, java.util.Map<java.lang.String, o...
method getProcessMap (line 409) | private static <I extends AsyncIface> java.util.Map<java.lang.String...
class userExist (line 417) | public static class userExist<I extends AsyncIface> extends org.apac...
method userExist (line 418) | public userExist() {
method getEmptyArgsInstance (line 422) | public userExist_args getEmptyArgsInstance() {
method getResultHandler (line 426) | public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boole...
method isOneway (line 470) | protected boolean isOneway() {
method start (line 474) | public void start(I iface, userExist_args args, org.apache.thrift....
class createUser (line 479) | public static class createUser<I extends AsyncIface> extends org.apa...
method createUser (line 480) | public createUser() {
method getEmptyArgsInstance (line 484) | public createUser_args getEmptyArgsInstance() {
method getResultHandler (line 488) | public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boole...
method isOneway (line 532) | protected boolean isOneway() {
method start (line 536) | public void start(I iface, createUser_args args, org.apache.thrift...
class getUser (line 541) | public static class getUser<I extends AsyncIface> extends org.apache...
method getUser (line 542) | public getUser() {
method getEmptyArgsInstance (line 546) | public getUser_args getEmptyArgsInstance() {
method getResultHandler (line 550) | public org.apache.thrift.async.AsyncMethodCallback<User> getResult...
method isOneway (line 593) | protected boolean isOneway() {
method start (line 597) | public void start(I iface, getUser_args args, org.apache.thrift.as...
class listUser (line 602) | public static class listUser<I extends AsyncIface> extends org.apach...
method listUser (line 603) | public listUser() {
method getEmptyArgsInstance (line 607) | public listUser_args getEmptyArgsInstance() {
method getResultHandler (line 611) | public org.apache.thrift.async.AsyncMethodCallback<UserPage> getRe...
method isOneway (line 654) | protected boolean isOneway() {
method start (line 658) | public void start(I iface, listUser_args args, org.apache.thrift.a...
class userExist_args (line 665) | public static class userExist_args implements org.apache.thrift.TBase<...
type _Fields (line 676) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 690) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 703) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 712) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 719) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 724) | public short getThriftFieldId() {
method getFieldName (line 728) | public java.lang.String getFieldName() {
method userExist_args (line 743) | public userExist_args() {
method userExist_args (line 746) | public userExist_args(
method userExist_args (line 756) | public userExist_args(userExist_args other) {
method deepCopy (line 762) | public userExist_args deepCopy() {
method clear (line 766) | @Override
method getEmail (line 771) | public java.lang.String getEmail() {
method setEmail (line 775) | public userExist_args setEmail(java.lang.String email) {
method unsetEmail (line 780) | public void unsetEmail() {
method isSetEmail (line 785) | public boolean isSetEmail() {
method setEmailIsSet (line 789) | public void setEmailIsSet(boolean value) {
method setFieldValue (line 795) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 808) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 818) | public boolean isSet(_Fields field) {
method equals (line 830) | @Override
method equals (line 839) | public boolean equals(userExist_args that) {
method hashCode (line 857) | @Override
method compareTo (line 868) | @Override
method fieldForId (line 889) | public _Fields fieldForId(int fieldId) {
method read (line 893) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 897) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 901) | @Override
method validate (line 917) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 922) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 930) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class userExist_argsStandardSchemeFactory (line 938) | private static class userExist_argsStandardSchemeFactory implements ...
method getScheme (line 939) | public userExist_argsStandardScheme getScheme() {
class userExist_argsStandardScheme (line 944) | private static class userExist_argsStandardScheme extends org.apache...
method read (line 946) | public void read(org.apache.thrift.protocol.TProtocol iprot, userE...
method write (line 975) | public void write(org.apache.thrift.protocol.TProtocol oprot, user...
class userExist_argsTupleSchemeFactory (line 990) | private static class userExist_argsTupleSchemeFactory implements org...
method getScheme (line 991) | public userExist_argsTupleScheme getScheme() {
class userExist_argsTupleScheme (line 996) | private static class userExist_argsTupleScheme extends org.apache.th...
method write (line 998) | @Override
method read (line 1011) | @Override
method scheme (line 1022) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class userExist_result (line 1027) | public static class userExist_result implements org.apache.thrift.TBas...
type _Fields (line 1038) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1052) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1065) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1074) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1081) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1086) | public short getThriftFieldId() {
method getFieldName (line 1090) | public java.lang.String getFieldName() {
method userExist_result (line 1107) | public userExist_result() {
method userExist_result (line 1110) | public userExist_result(
method userExist_result (line 1121) | public userExist_result(userExist_result other) {
method deepCopy (line 1126) | public userExist_result deepCopy() {
method clear (line 1130) | @Override
method isSuccess (line 1136) | public boolean isSuccess() {
method setSuccess (line 1140) | public userExist_result setSuccess(boolean success) {
method unsetSuccess (line 1146) | public void unsetSuccess() {
method isSetSuccess (line 1151) | public boolean isSetSuccess() {
method setSuccessIsSet (line 1155) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 1159) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1172) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1182) | public boolean isSet(_Fields field) {
method equals (line 1194) | @Override
method equals (line 1203) | public boolean equals(userExist_result that) {
method hashCode (line 1221) | @Override
method compareTo (line 1230) | @Override
method fieldForId (line 1251) | public _Fields fieldForId(int fieldId) {
method read (line 1255) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1259) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1263) | @Override
method validate (line 1275) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1280) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 1288) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class userExist_resultStandardSchemeFactory (line 1298) | private static class userExist_resultStandardSchemeFactory implement...
method getScheme (line 1299) | public userExist_resultStandardScheme getScheme() {
class userExist_resultStandardScheme (line 1304) | private static class userExist_resultStandardScheme extends org.apac...
method read (line 1306) | public void read(org.apache.thrift.protocol.TProtocol iprot, userE...
method write (line 1335) | public void write(org.apache.thrift.protocol.TProtocol oprot, user...
class userExist_resultTupleSchemeFactory (line 1350) | private static class userExist_resultTupleSchemeFactory implements o...
method getScheme (line 1351) | public userExist_resultTupleScheme getScheme() {
class userExist_resultTupleScheme (line 1356) | private static class userExist_resultTupleScheme extends org.apache....
method write (line 1358) | @Override
method read (line 1371) | @Override
method scheme (line 1382) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class createUser_args (line 1387) | public static class createUser_args implements org.apache.thrift.TBase...
type _Fields (line 1398) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1412) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1425) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1434) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1441) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1446) | public short getThriftFieldId() {
method getFieldName (line 1450) | public java.lang.String getFieldName() {
method createUser_args (line 1465) | public createUser_args() {
method createUser_args (line 1468) | public createUser_args(
method createUser_args (line 1478) | public createUser_args(createUser_args other) {
method deepCopy (line 1484) | public createUser_args deepCopy() {
method clear (line 1488) | @Override
method getUser (line 1493) | public User getUser() {
method setUser (line 1497) | public createUser_args setUser(User user) {
method unsetUser (line 1502) | public void unsetUser() {
method isSetUser (line 1507) | public boolean isSetUser() {
method setUserIsSet (line 1511) | public void setUserIsSet(boolean value) {
method setFieldValue (line 1517) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1530) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1540) | public boolean isSet(_Fields field) {
method equals (line 1552) | @Override
method equals (line 1561) | public boolean equals(createUser_args that) {
method hashCode (line 1579) | @Override
method compareTo (line 1590) | @Override
method fieldForId (line 1611) | public _Fields fieldForId(int fieldId) {
method read (line 1615) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1619) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1623) | @Override
method validate (line 1639) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 1647) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 1655) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class createUser_argsStandardSchemeFactory (line 1663) | private static class createUser_argsStandardSchemeFactory implements...
method getScheme (line 1664) | public createUser_argsStandardScheme getScheme() {
class createUser_argsStandardScheme (line 1669) | private static class createUser_argsStandardScheme extends org.apach...
method read (line 1671) | public void read(org.apache.thrift.protocol.TProtocol iprot, creat...
method write (line 1701) | public void write(org.apache.thrift.protocol.TProtocol oprot, crea...
class createUser_argsTupleSchemeFactory (line 1716) | private static class createUser_argsTupleSchemeFactory implements or...
method getScheme (line 1717) | public createUser_argsTupleScheme getScheme() {
class createUser_argsTupleScheme (line 1722) | private static class createUser_argsTupleScheme extends org.apache.t...
method write (line 1724) | @Override
method read (line 1737) | @Override
method scheme (line 1749) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class createUser_result (line 1754) | public static class createUser_result implements org.apache.thrift.TBa...
type _Fields (line 1765) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 1779) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 1792) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 1801) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 1808) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 1813) | public short getThriftFieldId() {
method getFieldName (line 1817) | public java.lang.String getFieldName() {
method createUser_result (line 1834) | public createUser_result() {
method createUser_result (line 1837) | public createUser_result(
method createUser_result (line 1848) | public createUser_result(createUser_result other) {
method deepCopy (line 1853) | public createUser_result deepCopy() {
method clear (line 1857) | @Override
method isSuccess (line 1863) | public boolean isSuccess() {
method setSuccess (line 1867) | public createUser_result setSuccess(boolean success) {
method unsetSuccess (line 1873) | public void unsetSuccess() {
method isSetSuccess (line 1878) | public boolean isSetSuccess() {
method setSuccessIsSet (line 1882) | public void setSuccessIsSet(boolean value) {
method setFieldValue (line 1886) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 1899) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 1909) | public boolean isSet(_Fields field) {
method equals (line 1921) | @Override
method equals (line 1930) | public boolean equals(createUser_result that) {
method hashCode (line 1948) | @Override
method compareTo (line 1957) | @Override
method fieldForId (line 1978) | public _Fields fieldForId(int fieldId) {
method read (line 1982) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 1986) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 1990) | @Override
method validate (line 2002) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2007) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2015) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class createUser_resultStandardSchemeFactory (line 2025) | private static class createUser_resultStandardSchemeFactory implemen...
method getScheme (line 2026) | public createUser_resultStandardScheme getScheme() {
class createUser_resultStandardScheme (line 2031) | private static class createUser_resultStandardScheme extends org.apa...
method read (line 2033) | public void read(org.apache.thrift.protocol.TProtocol iprot, creat...
method write (line 2062) | public void write(org.apache.thrift.protocol.TProtocol oprot, crea...
class createUser_resultTupleSchemeFactory (line 2077) | private static class createUser_resultTupleSchemeFactory implements ...
method getScheme (line 2078) | public createUser_resultTupleScheme getScheme() {
class createUser_resultTupleScheme (line 2083) | private static class createUser_resultTupleScheme extends org.apache...
method write (line 2085) | @Override
method read (line 2098) | @Override
method scheme (line 2109) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
class getUser_args (line 2114) | public static class getUser_args implements org.apache.thrift.TBase<ge...
type _Fields (line 2125) | public enum _Fields implements org.apache.thrift.TFieldIdEnum {
method findByThriftId (line 2139) | public static _Fields findByThriftId(int fieldId) {
method findByThriftIdOrThrow (line 2152) | public static _Fields findByThriftIdOrThrow(int fieldId) {
method findByName (line 2161) | public static _Fields findByName(java.lang.String name) {
method _Fields (line 2168) | _Fields(short thriftId, java.lang.String fieldName) {
method getThriftFieldId (line 2173) | public short getThriftFieldId() {
method getFieldName (line 2177) | public java.lang.String getFieldName() {
method getUser_args (line 2194) | public getUser_args() {
method getUser_args (line 2197) | public getUser_args(
method getUser_args (line 2208) | public getUser_args(getUser_args other) {
method deepCopy (line 2213) | public getUser_args deepCopy() {
method clear (line 2217) | @Override
method getId (line 2223) | public long getId() {
method setId (line 2227) | public getUser_args setId(long id) {
method unsetId (line 2233) | public void unsetId() {
method isSetId (line 2238) | public boolean isSetId() {
method setIdIsSet (line 2242) | public void setIdIsSet(boolean value) {
method setFieldValue (line 2246) | public void setFieldValue(_Fields field, java.lang.Object value) {
method getFieldValue (line 2259) | public java.lang.Object getFieldValue(_Fields field) {
method isSet (line 2269) | public boolean isSet(_Fields field) {
method equals (line 2281) | @Override
method equals (line 2290) | public boolean equals(getUser_args that) {
method hashCode (line 2308) | @Override
method compareTo (line 2317) | @Override
method fieldForId (line 2338) | public _Fields fieldForId(int fieldId) {
method read (line 2342) | public void read(org.apache.thrift.protocol.TProtocol iprot) throws ...
method write (line 2346) | public void write(org.apache.thrift.protocol.TProtocol oprot) throws...
method toString (line 2350) | @Override
method validate (line 2362) | public void validate() throws org.apache.thrift.TException {
method writeObject (line 2367) | private void writeObject(java.io.ObjectOutputStream out) throws java...
method readObject (line 2375) | private void readObject(java.io.ObjectInputStream in) throws java.io...
class getUser_argsStandardSchemeFactory (line 2385) | private static class getUser_argsStandardSchemeFactory implements or...
method getScheme (line 2386) | public getUser_argsStandardScheme getScheme() {
class getUser_argsStandardScheme (line 2391) | private static class getUser_argsStandardScheme extends org.apache.t...
method read (line 2393) | public void read(org.apache.thrift.protocol.TProtocol iprot, getUs...
method write (line 2422) | public void write(org.apache.thrift.protocol.TProtocol oprot, getU...
class getUser_argsTupleSchemeFactory (line 2435) | private static class getUser_argsTupleSchemeFactory implements org.a...
method getScheme (line 2436) | public getUser_argsTupleScheme getScheme() {
class getUser_argsTupleScheme (line 2441) | private static class getUser_argsTupleScheme extends org.apache.thri...
method write (line 2443) | @Override
method read (line 2456) | @Override
method scheme (line 2467) | private static <S extends org.apache.thrift.scheme.IScheme> S scheme...
cl
Condensed preview — 288 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,119K chars).
[
{
"path": ".gitattributes",
"chars": 66,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n"
},
{
"path": ".gitignore",
"chars": 392,
"preview": "# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# BlueJ files\n*.ctxt\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Packa"
},
{
"path": "LICENSE",
"chars": 11323,
"preview": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"
},
{
"path": "README.md",
"chars": 1800,
"preview": "# RPC Benchmark\n几乎所有的 RPC 框架都宣称自己是“高性能”的, 那么实际结果到底如何呢, 让我们来做一个性能测试吧.\n\n## 测试结果\n- Round-5 2019-02-11 https://www.jianshu.c"
},
{
"path": "armeria-client/pom.xml",
"chars": 2384,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "armeria-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2241,
"preview": "package benchmark.rpc;\n\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annotations.Benchmark;\nimport org."
},
{
"path": "armeria-server/pom.xml",
"chars": 2581,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "armeria-server/src/main/java/benchmark/rpc/Server.java",
"chars": 518,
"preview": "package benchmark.rpc;\n\nimport java.net.InetSocketAddress;\n\nimport com.linecorp.armeria.server.ServerBuilder;\n\nimport be"
},
{
"path": "armeria-server/src/main/java/benchmark/service/ArmeriaUserServiceServerImpl.java",
"chars": 3111,
"preview": "package benchmark.service;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.util.ArrayList;\nimpo"
},
{
"path": "benchmark-base/.java-version",
"chars": 3,
"preview": "11\n"
},
{
"path": "benchmark-base/pom.xml",
"chars": 4035,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "benchmark-base/src/main/java/benchmark/bean/Page.java",
"chars": 729,
"preview": "package benchmark.bean;\n\nimport java.io.Serializable;\nimport java.util.List;\n\npublic class Page<T> implements Serializab"
},
{
"path": "benchmark-base/src/main/java/benchmark/bean/User.java",
"chars": 2387,
"preview": "package benchmark.bean;\n\nimport java.io.Serializable;\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport"
},
{
"path": "benchmark-base/src/main/java/benchmark/pool/ConcurrentObjectPool.java",
"chars": 3876,
"preview": "package benchmark.pool;\n\nimport static benchmark.pool.UnsafeUtils.unsafe;\n\nimport java.io.Closeable;\nimport java.io.IOEx"
},
{
"path": "benchmark-base/src/main/java/benchmark/pool/LockObjectPool.java",
"chars": 1693,
"preview": "package benchmark.pool;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.util.IdentityHashMap;\nimport "
},
{
"path": "benchmark-base/src/main/java/benchmark/pool/UnsafeUtils.java",
"chars": 483,
"preview": "package benchmark.pool;\n\nimport sun.misc.Unsafe;\n\npublic class UnsafeUtils {\n\tfinal static private Unsafe _unsafe;\n\n\tsta"
},
{
"path": "benchmark-base/src/main/java/benchmark/pool/ViberObjectPool.java",
"chars": 1452,
"preview": "package benchmark.pool;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.util.function.Supplier;\n\nimpo"
},
{
"path": "benchmark-base/src/main/java/benchmark/pool/WaitStrategy.java",
"chars": 391,
"preview": "package benchmark.pool;\n\nimport java.util.concurrent.locks.LockSupport;\n\npublic final class WaitStrategy {\n\n\tpublic fina"
},
{
"path": "benchmark-base/src/main/java/benchmark/rpc/AbstractClient.java",
"chars": 1048,
"preview": "package benchmark.rpc;\n\nimport java.util.concurrent.atomic.AtomicInteger;\n\nimport benchmark.bean.Page;\nimport benchmark."
},
{
"path": "benchmark-base/src/main/java/benchmark/rpc/protocol/Request.java",
"chars": 832,
"preview": "package benchmark.rpc.protocol;\n\nimport java.io.Serializable;\nimport java.util.Arrays;\n\npublic class Request implements "
},
{
"path": "benchmark-base/src/main/java/benchmark/rpc/protocol/Response.java",
"chars": 795,
"preview": "package benchmark.rpc.protocol;\n\nimport java.io.Serializable;\n\npublic class Response implements Serializable {\n\tprivate "
},
{
"path": "benchmark-base/src/main/java/benchmark/rpc/route/RouteService.java",
"chars": 895,
"preview": "package benchmark.rpc.route;\n\nimport static benchmark.service.ServiceRegister.CREATE_USER;\nimport static benchmark.servi"
},
{
"path": "benchmark-base/src/main/java/benchmark/rpc/util/ByteBufferUtils.java",
"chars": 745,
"preview": "package benchmark.rpc.util;\n\nimport static java.nio.charset.StandardCharsets.UTF_8;\n\nimport java.nio.ByteBuffer;\n\npublic"
},
{
"path": "benchmark-base/src/main/java/benchmark/rpc/util/HttpClientUtils.java",
"chars": 1471,
"preview": "package benchmark.rpc.util;\n\nimport org.apache.http.client.config.RequestConfig;\nimport org.apache.http.config.SocketCon"
},
{
"path": "benchmark-base/src/main/java/benchmark/rpc/util/JsonUtils.java",
"chars": 534,
"preview": "package benchmark.rpc.util;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.datatype.j"
},
{
"path": "benchmark-base/src/main/java/benchmark/service/ServiceRegister.java",
"chars": 227,
"preview": "package benchmark.service;\n\npublic interface ServiceRegister {\n\tpublic static final int EXIST_USER = 0;\n\tpublic static f"
},
{
"path": "benchmark-base/src/main/java/benchmark/service/UserService.java",
"chars": 274,
"preview": "package benchmark.service;\n\nimport benchmark.bean.Page;\nimport benchmark.bean.User;\n\npublic interface UserService {\n\tpub"
},
{
"path": "benchmark-base/src/main/java/benchmark/service/UserServiceJsonHttpClientImpl.java",
"chars": 3461,
"preview": "package benchmark.service;\n\nimport java.nio.charset.StandardCharsets;\n\nimport org.apache.http.HttpEntity;\nimport org.apa"
},
{
"path": "benchmark-base/src/main/java/benchmark/service/UserServiceServerImpl.java",
"chars": 2278,
"preview": "package benchmark.service;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.util.ArrayList;\nimpo"
},
{
"path": "benchmark.java",
"chars": 14786,
"preview": "import java.io.*;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.time.LocalDateTime;\n"
},
{
"path": "brpc-client/pom.xml",
"chars": 2555,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "brpc-client/src/main/java/benchmark/rpc/Client.java",
"chars": 3215,
"preview": "package benchmark.rpc;\n\nimport benchmark.bean.Page;\nimport benchmark.bean.User;\nimport benchmark.service.UserService;\nim"
},
{
"path": "brpc-client/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "brpc-server/pom.xml",
"chars": 2552,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "brpc-server/src/main/java/benchmark/rpc/Server.java",
"chars": 851,
"preview": "package benchmark.rpc;\n\nimport benchmark.service.UserServiceServerImpl;\nimport com.baidu.brpc.protocol.Options;\nimport c"
},
{
"path": "brpc-server/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "dubbo-client/pom.xml",
"chars": 2563,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "dubbo-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2542,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annota"
},
{
"path": "dubbo-client/src/main/resources/consumer.xml",
"chars": 771,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "dubbo-client/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "dubbo-kryo-client/.gitignore",
"chars": 23,
"preview": "/.apt_generated_tests/\n"
},
{
"path": "dubbo-kryo-client/pom.xml",
"chars": 2735,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "dubbo-kryo-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2542,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annota"
},
{
"path": "dubbo-kryo-client/src/main/resources/consumer.xml",
"chars": 771,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "dubbo-kryo-client/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "dubbo-kryo-server/pom.xml",
"chars": 2735,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "dubbo-kryo-server/src/main/java/benchmark/rpc/Server.java",
"chars": 362,
"preview": "package benchmark.rpc;\n\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\n\npublic class Server "
},
{
"path": "dubbo-kryo-server/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "dubbo-kryo-server/src/main/resources/provider.xml",
"chars": 959,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "dubbo-server/pom.xml",
"chars": 2561,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "dubbo-server/src/main/java/benchmark/rpc/Server.java",
"chars": 362,
"preview": "package benchmark.rpc;\n\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\n\npublic class Server "
},
{
"path": "dubbo-server/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "dubbo-server/src/main/resources/provider.xml",
"chars": 938,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "grpc-client/.gitignore",
"chars": 6,
"preview": "/bin/\n"
},
{
"path": "grpc-client/pom.xml",
"chars": 3682,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "grpc-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2545,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annota"
},
{
"path": "grpc-client/src/main/java/benchmark/rpc/grpc/GrpcUserServiceClient.java",
"chars": 896,
"preview": "package benchmark.rpc.grpc;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;"
},
{
"path": "grpc-client/src/main/java/benchmark/rpc/grpc/UserServiceGrpcClientImpl.java",
"chars": 4593,
"preview": "package benchmark.rpc.grpc;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.time.LocalDate;\nimport ja"
},
{
"path": "grpc-client/src/main/proto/UserService.proto",
"chars": 987,
"preview": "syntax = \"proto3\";\npackage grpc;\n\nimport public \"google/protobuf/timestamp.proto\"; \n\noption java_package = \"benchmark.rp"
},
{
"path": "grpc-client/src/main/resources/logback.xml",
"chars": 908,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "grpc-server/pom.xml",
"chars": 3682,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "grpc-server/src/main/java/benchmark/rpc/Server.java",
"chars": 442,
"preview": "package benchmark.rpc;\n\nimport benchmark.rpc.grpc.server.UserServiceGrpcServerImpl;\nimport io.grpc.ServerBuilder;\n\npubli"
},
{
"path": "grpc-server/src/main/java/benchmark/rpc/grpc/server/UserServiceGrpcServerImpl.java",
"chars": 4277,
"preview": "package benchmark.rpc.grpc.server;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.time.ZoneOff"
},
{
"path": "grpc-server/src/main/proto/UserService.proto",
"chars": 987,
"preview": "syntax = \"proto3\";\npackage grpc;\n\nimport public \"google/protobuf/timestamp.proto\"; \n\noption java_package = \"benchmark.rp"
},
{
"path": "grpc-server/src/main/resources/logback.xml",
"chars": 908,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "hprose-client/pom.xml",
"chars": 2852,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "hprose-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2675,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annota"
},
{
"path": "hprose-client/src/main/resources/consumer.xml",
"chars": 707,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "hprose-server/pom.xml",
"chars": 2569,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "hprose-server/src/main/java/benchmark/rpc/Server.java",
"chars": 397,
"preview": "package benchmark.rpc;\n\nimport benchmark.service.UserServiceServerImpl;\nimport hprose.server.HproseTcpServer;\n\npublic cl"
},
{
"path": "hprose-server/src/main/resources/provider.xml",
"chars": 838,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "jupiter-client/pom.xml",
"chars": 3069,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "jupiter-client/src/main/java/benchmark/rpc/Client.java",
"chars": 4520,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\nimport java.util.concurrent.at"
},
{
"path": "jupiter-client/src/main/java/benchmark/service/JupiterUserService.java",
"chars": 480,
"preview": "package benchmark.service;\n\nimport java.util.concurrent.CompletableFuture;\n\nimport org.jupiter.rpc.ServiceProvider;\n\nimp"
},
{
"path": "jupiter-client/src/main/resources/META-INF/services/org.jupiter.rpc.consumer.processor.ConsumerExecutorFactory",
"chars": 100,
"preview": "org.jupiter.rpc.executor.CallerRunsExecutorFactory\norg.jupiter.rpc.executor.DisruptorExecutorFactory"
},
{
"path": "jupiter-client/src/main/resources/logback.xml",
"chars": 908,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "jupiter-client/src/main/resources/spring-consumer.xml",
"chars": 3471,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n ~ Copyright (c) 2015 The Jupiter Project\n ~\n ~ Licensed under the Apache"
},
{
"path": "jupiter-server/.gitignore",
"chars": 23,
"preview": "/.apt_generated_tests/\n"
},
{
"path": "jupiter-server/pom.xml",
"chars": 3070,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "jupiter-server/src/main/java/benchmark/rpc/Server.java",
"chars": 1459,
"preview": "package benchmark.rpc;\n\nimport benchmark.service.JupiterUserServiceServerImpl;\nimport io.netty.util.ResourceLeakDetector"
},
{
"path": "jupiter-server/src/main/java/benchmark/service/JupiterUserService.java",
"chars": 480,
"preview": "package benchmark.service;\n\nimport java.util.concurrent.CompletableFuture;\n\nimport org.jupiter.rpc.ServiceProvider;\n\nimp"
},
{
"path": "jupiter-server/src/main/java/benchmark/service/JupiterUserServiceServerImpl.java",
"chars": 2825,
"preview": "package benchmark.service;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.util.ArrayList;\nimpo"
},
{
"path": "jupiter-server/src/main/resources/META-INF/services/org.jupiter.rpc.provider.processor.ProviderExecutorFactory",
"chars": 153,
"preview": "org.jupiter.rpc.executor.DisruptorExecutorFactory\norg.jupiter.rpc.executor.CallerRunsExecutorFactory\norg.jupiter.rpc.exe"
},
{
"path": "jupiter-server/src/main/resources/logback.xml",
"chars": 908,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "jupiter-server/src/main/resources/spring-provider.xml",
"chars": 1689,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- ~ Copyright (c) 2015 The Jupiter Project ~ ~ Licensed under the Apache \n\tLic"
},
{
"path": "motan-client/pom.xml",
"chars": 4240,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "motan-client/src/main/java/benchmark/bean/MotanUser.java",
"chars": 2378,
"preview": "package benchmark.bean;\n\nimport java.io.Serializable;\nimport java.util.Date;\nimport java.util.List;\n\npublic class MotanU"
},
{
"path": "motan-client/src/main/java/benchmark/rpc/Client.java",
"chars": 3521,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\nimport java.util.concurrent.at"
},
{
"path": "motan-client/src/main/java/benchmark/service/MotanUserService.java",
"chars": 299,
"preview": "package benchmark.service;\n\nimport benchmark.bean.MotanUser;\nimport benchmark.bean.Page;\n\npublic interface MotanUserServ"
},
{
"path": "motan-client/src/main/java/benchmark/service/MotanUserServiceServerImpl.java",
"chars": 2273,
"preview": "package benchmark.service;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Date;\nimport java.util"
},
{
"path": "motan-client/src/main/resources/motan_client.xml",
"chars": 1247,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "motan-server/.gitignore",
"chars": 23,
"preview": "/.apt_generated_tests/\n"
},
{
"path": "motan-server/pom.xml",
"chars": 4405,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "motan-server/src/main/java/benchmark/bean/MotanUser.java",
"chars": 2378,
"preview": "package benchmark.bean;\n\nimport java.io.Serializable;\nimport java.util.Date;\nimport java.util.List;\n\npublic class MotanU"
},
{
"path": "motan-server/src/main/java/benchmark/rpc/Server.java",
"chars": 366,
"preview": "package benchmark.rpc;\n\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\n\npublic class Server "
},
{
"path": "motan-server/src/main/java/benchmark/service/MotanUserService.java",
"chars": 299,
"preview": "package benchmark.service;\n\nimport benchmark.bean.MotanUser;\nimport benchmark.bean.Page;\n\npublic interface MotanUserServ"
},
{
"path": "motan-server/src/main/java/benchmark/service/MotanUserServiceServerImpl.java",
"chars": 2273,
"preview": "package benchmark.service;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Date;\nimport java.util"
},
{
"path": "motan-server/src/main/resources/motan_server.xml",
"chars": 1513,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "netty-client/pom.xml",
"chars": 2436,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2557,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annota"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/client/NettyClientConnector.java",
"chars": 5254,
"preview": "package benchmark.rpc.netty.client;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.util.concurrent.C"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/client/UserServiceNettyClientImpl.java",
"chars": 1817,
"preview": "package benchmark.rpc.netty.client;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.util.concurrent.a"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/client/codec/ProtocolDecoder.java",
"chars": 784,
"preview": "package benchmark.rpc.netty.client.codec;\n\nimport benchmark.rpc.netty.serializer.FastestSerializer;\nimport io.netty.buff"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/client/codec/ProtocolEncoder.java",
"chars": 499,
"preview": "package benchmark.rpc.netty.client.codec;\n\nimport benchmark.rpc.netty.serializer.FastestSerializer;\nimport benchmark.rpc"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/client/future/FutureContainer.java",
"chars": 753,
"preview": "package benchmark.rpc.netty.client.future;\n\nimport java.util.concurrent.CompletableFuture;\nimport java.util.concurrent.C"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/client/handler/BenchmarkChannelInitializer.java",
"chars": 902,
"preview": "package benchmark.rpc.netty.client.handler;\n\nimport benchmark.rpc.netty.client.codec.ProtocolDecoder;\nimport benchmark.r"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/client/handler/BenchmarkClientHandler.java",
"chars": 983,
"preview": "package benchmark.rpc.netty.client.handler;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport benchmark."
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/BooleanSerializer.java",
"chars": 403,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class BooleanSerializer implements Seri"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/FastestSerializer.java",
"chars": 1360,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.io.IOException;\n\nimport benchmark.rpc.protocol.Request;\nimport benc"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/IntegerSerializer.java",
"chars": 395,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class IntegerSerializer implements Seri"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/LocalDateSerializer.java",
"chars": 680,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalDate;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class Loca"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/LocalDateTimeSerializer.java",
"chars": 944,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.time.Lo"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/LocalTimeSerializer.java",
"chars": 759,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalTime;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class Loca"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/LongSerializer.java",
"chars": 379,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class LongSerializer implements Seriali"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/ObjectSerializer.java",
"chars": 787,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\n@SuppressWarnings(\"unchecked\")\npublic class Ob"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/Register.java",
"chars": 1462,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.util.IdentityHashMap;\n\npublic class Register {\n\tprivate final stati"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/RequestSerializer.java",
"chars": 1106,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport benchmark.rpc.protocol.Request;\nimport io.netty.buffer.ByteBuf;\n\npublic "
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/ResponseSerializer.java",
"chars": 907,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport benchmark.rpc.protocol.Response;\nimport io.netty.buffer.ByteBuf;\n\npublic"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/Serializer.java",
"chars": 230,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic interface Serializer<T> {\n\n\tpublic void"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/StringSerializer.java",
"chars": 643,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.nio.charset.StandardCharsets;\n\nimport io.netty.buffer.ByteBuf;\n\npub"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/UserPageSerializer.java",
"chars": 1376,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.RandomAcces"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/UserSerializer.java",
"chars": 2709,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.util.Ar"
},
{
"path": "netty-client/src/main/java/benchmark/rpc/netty/serializer/VoidSerializer.java",
"chars": 337,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class VoidSerializer implements Seriali"
},
{
"path": "netty-client/src/main/resources/logback.xml",
"chars": 915,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\"\n\t\tclass=\"ch.qos.l"
},
{
"path": "netty-server/pom.xml",
"chars": 2436,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/Server.java",
"chars": 2398,
"preview": "package benchmark.rpc;\n\nimport java.net.InetSocketAddress;\n\nimport benchmark.rpc.netty.server.handler.BenchmarkChannelIn"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/BooleanSerializer.java",
"chars": 403,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class BooleanSerializer implements Seri"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/FastestSerializer.java",
"chars": 1360,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.io.IOException;\n\nimport benchmark.rpc.protocol.Request;\nimport benc"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/IntegerSerializer.java",
"chars": 395,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class IntegerSerializer implements Seri"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/LocalDateSerializer.java",
"chars": 680,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalDate;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class Loca"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/LocalDateTimeSerializer.java",
"chars": 944,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.time.Lo"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/LocalTimeSerializer.java",
"chars": 759,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalTime;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class Loca"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/LongSerializer.java",
"chars": 379,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class LongSerializer implements Seriali"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/ObjectSerializer.java",
"chars": 787,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\n@SuppressWarnings(\"unchecked\")\npublic class Ob"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/Register.java",
"chars": 1462,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.util.IdentityHashMap;\n\npublic class Register {\n\tprivate final stati"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/RequestSerializer.java",
"chars": 1106,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport benchmark.rpc.protocol.Request;\nimport io.netty.buffer.ByteBuf;\n\npublic "
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/ResponseSerializer.java",
"chars": 907,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport benchmark.rpc.protocol.Response;\nimport io.netty.buffer.ByteBuf;\n\npublic"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/Serializer.java",
"chars": 230,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic interface Serializer<T> {\n\n\tpublic void"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/StringSerializer.java",
"chars": 643,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.nio.charset.StandardCharsets;\n\nimport io.netty.buffer.ByteBuf;\n\npub"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/UserPageSerializer.java",
"chars": 1376,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.RandomAcces"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/UserSerializer.java",
"chars": 2709,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.util.Ar"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/serializer/VoidSerializer.java",
"chars": 337,
"preview": "package benchmark.rpc.netty.serializer;\n\nimport io.netty.buffer.ByteBuf;\n\npublic class VoidSerializer implements Seriali"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/server/codec/ProtocolDecoder.java",
"chars": 782,
"preview": "package benchmark.rpc.netty.server.codec;\n\nimport benchmark.rpc.netty.serializer.FastestSerializer;\nimport io.netty.buff"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/server/codec/ProtocolEncoder.java",
"chars": 506,
"preview": "package benchmark.rpc.netty.server.codec;\n\nimport benchmark.rpc.netty.serializer.FastestSerializer;\nimport benchmark.rpc"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/server/handler/BenchmarkChannelInitializer.java",
"chars": 663,
"preview": "package benchmark.rpc.netty.server.handler;\n\nimport benchmark.rpc.netty.server.codec.ProtocolDecoder;\nimport benchmark.r"
},
{
"path": "netty-server/src/main/java/benchmark/rpc/netty/server/handler/BenchmarkServerHandler.java",
"chars": 1244,
"preview": "package benchmark.rpc.netty.server.handler;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport benchmark."
},
{
"path": "pom.xml",
"chars": 2710,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n "
},
{
"path": "rapidoid-client/pom.xml",
"chars": 2387,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "rapidoid-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2241,
"preview": "package benchmark.rpc;\n\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annotations.Benchmark;\nimport org."
},
{
"path": "rapidoid-server/.gitignore",
"chars": 23,
"preview": "/.apt_generated_tests/\n"
},
{
"path": "rapidoid-server/pom.xml",
"chars": 2581,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "rapidoid-server/src/main/java/benchmark/rpc/Server.java",
"chars": 578,
"preview": "package benchmark.rpc;\n\nimport org.rapidoid.config.Conf;\nimport org.rapidoid.setup.App;\nimport org.rapidoid.setup.My;\nim"
},
{
"path": "rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/CreateUserController.java",
"chars": 459,
"preview": "package benchmark.rpc.rapidoid.server;\n\nimport org.rapidoid.annotation.Controller;\nimport org.rapidoid.annotation.GET;\n\n"
},
{
"path": "rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/GetUserController.java",
"chars": 459,
"preview": "package benchmark.rpc.rapidoid.server;\n\nimport org.rapidoid.annotation.Controller;\nimport org.rapidoid.annotation.GET;\n\n"
},
{
"path": "rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/ListUserController.java",
"chars": 518,
"preview": "package benchmark.rpc.rapidoid.server;\n\nimport org.rapidoid.annotation.Controller;\nimport org.rapidoid.annotation.GET;\n\n"
},
{
"path": "rapidoid-server/src/main/java/benchmark/rpc/rapidoid/server/UserExistController.java",
"chars": 433,
"preview": "package benchmark.rpc.rapidoid.server;\n\nimport org.rapidoid.annotation.Controller;\nimport org.rapidoid.annotation.GET;\n\n"
},
{
"path": "rsocket-client/pom.xml",
"chars": 6445,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/"
},
{
"path": "rsocket-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2595,
"preview": "package benchmark.rpc;\n\nimport benchmark.bean.Page;\nimport benchmark.bean.User;\nimport benchmark.rpc.rsocket.UserService"
},
{
"path": "rsocket-client/src/main/java/benchmark/rpc/rsocket/UserServiceRsocketClientImpl.java",
"chars": 4039,
"preview": "package benchmark.rpc.rsocket;\n\nimport benchmark.bean.Page;\nimport benchmark.bean.User;\nimport benchmark.rpc.grpc.UserSe"
},
{
"path": "rsocket-client/src/main/proto/UserService.proto",
"chars": 987,
"preview": "syntax = \"proto3\";\npackage grpc;\n\nimport public \"google/protobuf/timestamp.proto\"; \n\noption java_package = \"benchmark.rp"
},
{
"path": "rsocket-server/pom.xml",
"chars": 7149,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/"
},
{
"path": "rsocket-server/src/main/java/benchmark/rpc/Server.java",
"chars": 1074,
"preview": "package benchmark.rpc;\n\nimport benchmark.rpc.grpc.UserServiceServer;\nimport benchmark.rpc.rsocket.server.UserServiceRsoc"
},
{
"path": "rsocket-server/src/main/java/benchmark/rpc/rsocket/server/UserServiceRsocketServerImpl.java",
"chars": 4654,
"preview": "package benchmark.rpc.rsocket.server;\n\nimport benchmark.bean.Page;\nimport benchmark.bean.User;\nimport benchmark.rpc.grpc"
},
{
"path": "rsocket-server/src/main/proto/UserService.proto",
"chars": 987,
"preview": "syntax = \"proto3\";\npackage grpc;\n\nimport public \"google/protobuf/timestamp.proto\"; \n\noption java_package = \"benchmark.rp"
},
{
"path": "servicecomb-client/pom.xml",
"chars": 3324,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoc"
},
{
"path": "servicecomb-client/src/main/java/benchmark/rpc/Client.java",
"chars": 3016,
"preview": "package benchmark.rpc;\n\nimport java.util.concurrent.TimeUnit;\n\nimport org.apache.servicecomb.foundation.common.utils.Bea"
},
{
"path": "servicecomb-client/src/main/resources/META-INF/spring/benchmark.consumer.bean.xml",
"chars": 1359,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n ~ Licensed to the Apache Software Foundation (ASF) under one or more\n ~ c"
},
{
"path": "servicecomb-client/src/main/resources/config/log4j.demo.properties",
"chars": 877,
"preview": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE"
},
{
"path": "servicecomb-client/src/main/resources/log4j.properties",
"chars": 877,
"preview": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE"
},
{
"path": "servicecomb-client/src/main/resources/microservice.yaml",
"chars": 1279,
"preview": "## ---------------------------------------------------------------------------\n## Licensed to the Apache Software Found"
},
{
"path": "servicecomb-server/pom.xml",
"chars": 3326,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoc"
},
{
"path": "servicecomb-server/src/main/java/benchmark/rpc/Server.java",
"chars": 414,
"preview": "package benchmark.rpc;\n\nimport org.apache.servicecomb.foundation.common.utils.BeanUtils;\nimport org.apache.servicecomb.f"
},
{
"path": "servicecomb-server/src/main/java/benchmark/service/ServiceCombUserServiceServerImpl.java",
"chars": 2330,
"preview": "package benchmark.service;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.util.ArrayList;\nimpo"
},
{
"path": "servicecomb-server/src/main/resources/META-INF/spring/benchmark.provider.bean.xml",
"chars": 1359,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n ~ Licensed to the Apache Software Foundation (ASF) under one or more\n ~ c"
},
{
"path": "servicecomb-server/src/main/resources/config/log4j.demo.properties",
"chars": 877,
"preview": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE"
},
{
"path": "servicecomb-server/src/main/resources/log4j.properties",
"chars": 877,
"preview": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE"
},
{
"path": "servicecomb-server/src/main/resources/microservice.yaml",
"chars": 1204,
"preview": "## ---------------------------------------------------------------------------\n## Licensed to the Apache Software Founda"
},
{
"path": "sofa-client/pom.xml",
"chars": 3449,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "sofa-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2828,
"preview": "package benchmark.rpc;\n\nimport java.io.IOException;\nimport java.util.concurrent.TimeUnit;\n\nimport com.alipay.sofa.rpc.co"
},
{
"path": "sofa-client/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "sofa-server/.gitignore",
"chars": 6,
"preview": "/bin/\n"
},
{
"path": "sofa-server/pom.xml",
"chars": 2563,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "sofa-server/src/main/java/benchmark/rpc/Server.java",
"chars": 723,
"preview": "package benchmark.rpc;\n\nimport benchmark.service.UserService;\nimport benchmark.service.UserServiceServerImpl;\nimport com"
},
{
"path": "sofa-server/src/main/resources/logback.xml",
"chars": 917,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\t<jmxConfigurator />\n\n\t<appender name=\"console\" class=\"ch.qos.log"
},
{
"path": "springboot-client/pom.xml",
"chars": 2391,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "springboot-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2452,
"preview": "package benchmark.rpc;\n\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annotations.Benchmark;\nimport org."
},
{
"path": "springboot-server/.gitignore",
"chars": 23,
"preview": "/.apt_generated_tests/\n"
},
{
"path": "springboot-server/pom.xml",
"chars": 2254,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "springboot-server/src/main/java/benchmark/rpc/Server.java",
"chars": 333,
"preview": "package benchmark.rpc;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure"
},
{
"path": "springboot-server/src/main/java/benchmark/rpc/springboot/server/CreateUserController.java",
"chars": 517,
"preview": "package benchmark.rpc.springboot.server;\n\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springf"
},
{
"path": "springboot-server/src/main/java/benchmark/rpc/springboot/server/GetUserController.java",
"chars": 515,
"preview": "package benchmark.rpc.springboot.server;\n\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springfr"
},
{
"path": "springboot-server/src/main/java/benchmark/rpc/springboot/server/ListUserController.java",
"chars": 574,
"preview": "package benchmark.rpc.springboot.server;\n\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springfr"
},
{
"path": "springboot-server/src/main/java/benchmark/rpc/springboot/server/UserExistController.java",
"chars": 489,
"preview": "package benchmark.rpc.springboot.server;\n\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springfr"
},
{
"path": "springboot-server/src/main/resources/application.yml",
"chars": 52,
"preview": "server:\n address: benchmark-server\n port: 8080"
},
{
"path": "springboot-undertow-client/.gitignore",
"chars": 23,
"preview": "/.apt_generated_tests/\n"
},
{
"path": "springboot-undertow-client/pom.xml",
"chars": 2409,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "springboot-undertow-client/src/main/java/benchmark/rpc/Client.java",
"chars": 2452,
"preview": "package benchmark.rpc;\n\nimport java.util.concurrent.TimeUnit;\n\nimport org.openjdk.jmh.annotations.Benchmark;\nimport org."
},
{
"path": "springboot-undertow-server/.gitignore",
"chars": 23,
"preview": "/.apt_generated_tests/\n"
},
{
"path": "springboot-undertow-server/pom.xml",
"chars": 2624,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "springboot-undertow-server/src/main/java/benchmark/rpc/Server.java",
"chars": 333,
"preview": "package benchmark.rpc;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure"
}
]
// ... and 88 more files (download for full content)
About this extraction
This page contains the full source code of the hank-whu/rpc-benchmark GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 288 files (1008.5 KB), approximately 255.3k tokens, and a symbol index with 2617 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.