-
Notifications
You must be signed in to change notification settings - Fork 796
test: add benchmark #2173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add benchmark #2173
Conversation
Codecov ReportBase: 60.34% // Head: 60.31% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2173 +/- ##
==========================================
- Coverage 60.34% 60.31% -0.03%
==========================================
Files 417 420 +3
Lines 36585 36926 +341
==========================================
+ Hits 22078 22273 +195
- Misses 12324 12443 +119
- Partials 2183 2210 +27
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
运行过程和结果贴出来 |
antJack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issues associated with this PR
Your PR should present related issues you want to solve.
Solutions
You should show your solutions about the issues in your PR, including the overall solutions, details and the changes. At this time, Chinese is allowed to describe these.
UT result
Unit Test is needed if the code is changed, your unit test should cover boundary cases, corner cases, and some exceptional cases. And you need to show the UT result.
Benchmark
docker run --rm -v /Users/likun/mosn:/go/src/mosn.io/mosn -w /go/src/mosn.io/mosn mosnio/performance:v1 bash test/benchmark/benchmark-shell.sh build/bundles/v1.2.0/binary/mosn
Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: CMSFullGCsBeforeCompaction is deprecated and will likely be removed in a future release.
2022-11-10 06:40:23,78 [INFO] register a new handler maker, name is default, is default: true
2022-11-10 06:40:23,137 [INFO] [admin server] [register api] register a new api /server_info
2022-11-10 06:40:23,137 [INFO] [admin server] [register api] register a new api /config_dump
2022-11-10 06:40:23,139 [INFO] [config] processor added to configParsedCBMaps
2022-11-10 06:40:23,160 [INFO] [network] [ register pool factory] register protocol: Http1 factory
2022-11-10 06:40:23,160 [INFO] [network] [ register pool factory] register protocol: Http2 factory
2022-11-10 06:40:23,212 [INFO] [mosn start] create an empty mosn structure
2022-11-10 06:40:23,212 [INFO] [stagemanager] state changed to 1
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: bolt factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: boltv2 factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: dubbo factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: dubbo-thrift factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: tars factory
2022-11-10 06:40:23,212 [INFO] load config from : test/benchmark/mosn_benchmark.json
2022-11-10 06:40:23,216 [INFO] parameters parsed stage cost: 4.065493ms
2022-11-10 06:40:23,217 [INFO] [stagemanager] state changed to 2
2022-11-10 06:40:23,217 [INFO] [mosn] [start] xds service type is not router/sidecar, use config only
2022-11-10 06:40:23,219 [INFO] [admin store] [add service] add server pprof
2022-11-10 06:40:23,225 [INFO] [mosn] [init tracing] disable tracing
2022-11-10 06:40:23,228 [INFO] [server] [reconfigure] not reconfigure: dial unix /go/src/mosn.io/mosn/test/benchmark/reconfig.sock: connect: connection refused
2022-11-10 06:40:23,228 [INFO] [mosn] [NewMosn] new mosn created
2022-11-10 06:40:23,229 [INFO] [mosn start] init the members of the mosn
2022-11-10 06:40:23,229 [INFO] [mosn start] mosn init cluster structures
2022-11-10 06:40:23,229 [INFO] [config] [parse cluster] max_request_per_conn is not specified, use default value 1024
2022-11-10 06:40:23,229 [INFO] [config] [parse cluster] conn_buffer_limit_bytes is not specified, use default value 16384
2022-11-10 06:40:23,230 [INFO] [cluster] [primaryCluster] [UpdateHosts] cluster test_cpp update hosts: 0
2022-11-10 06:40:23,230 [INFO] [cluster] [cluster manager] [AddOrUpdatePrimaryCluster] cluster test_cpp updated
2022-11-10 06:40:23,231 [INFO] [upstream] [host set] update host, final host total: 5
2022-11-10 06:40:23,231 [INFO] [cluster] [primaryCluster] [UpdateHosts] cluster test_cpp update hosts: 5
2022-11-10 06:40:23,231 [INFO] [mosn start] mosn init server structures
2022-11-10 06:40:23,229 [INFO] [admin store] [start service] start service pprof on [::]:34902
2022-11-10 06:40:23,238 [INFO] init stage cost: 21.215233ms
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn start xds client
2022-11-10 06:40:23,238 [ERROR] start xds failed: null point exception
2022-11-10 06:40:23,238 [WARN] [feature gate] feature MultiTenantMode is not enabled
2022-11-10 06:40:23,238 [WARN] [feature gate] feature auto_config is not enabled
2022-11-10 06:40:23,238 [WARN] [feature gate] feature XdsMtlsEnable is not enabled
2022-11-10 06:40:23,238 [WARN] [feature gate] feature PayLoadLimitEnable is not enabled
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn parse extend config
2022-11-10 06:40:23,238 [INFO] prepare start stage cost: 48.863µs
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn start server
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn transfer connections
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn clean upgrade datas
2022-11-10 06:40:23,238 [INFO] start stage cost: 8.715µs
2022-11-10 06:40:23,238 [INFO] after start stage cost: 305ns
-t: warning: the number of threads is greater than hardware cores.
starting benchmark...
Application protocol: sofarpc
finished in 10.00s, 1997.50 req/s, 2.41MB/s
requests: 20000 total, 19980 started, 19975 done, 19975 succeeded, 0 failed, 0 errored, 0 timeout
sofaRPC status codes:
19975 success, 0 error, 0 server exception, 0 unknown
0 server threadpool busy, 0 error comm, 0 no processor, 0 timeout
0 client send error, 0 codec exception, 0 connection closed, 0 server serial exception
0 server deserial exception
traffic: 24.08MB (25248400) total, 390.14KB (399500) headers (space savings 0.00%), 23.70MB (24848900) data
min max mean sd +/- sd
time for request: 222us 350.19ms 6.63ms 28.43ms 95.26%
time for connect: 3us 92us 18us 13us 91.50%
req/s : 9.40 10.70 9.99 0.42 68.50%
Latency Distribution
50% 1.01ms
75% 1.50ms
90% 2.31ms
95% 30.63ms
99% 177.20ms
Code Style
Goimportshas runGolintresult