This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-1091 in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git
commit a69a9855c63df3b23d55a11b6d66008b73b29cc3 Author: Willem Jiang <[email protected]> AuthorDate: Tue Dec 25 15:35:58 2018 +0800 SCB-976 Removed saga-performance module --- saga-performance/README.md | 47 ------ saga-performance/images/grafana.png | Bin 15508 -> 0 bytes saga-performance/scripts/saga.jmx | 289 ------------------------------------ 3 files changed, 336 deletions(-) diff --git a/saga-performance/README.md b/saga-performance/README.md deleted file mode 100644 index 7e4e55e..0000000 --- a/saga-performance/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Saga Performance Test - -Performance test is automated with [JMeter](http://jmeter.apache.org/download_jmeter.cgi). A great tutorial can be found -at [Guru99](https://www.guru99.com/jmeter-performance-testing.html) if you are not familiar with JMeter. - -## How to Run Performance Test -To run performance test, execute the following JMeter command -``` -jmeter -n -t saga.jmx -l log.jtl -``` - -To generate test report from JMeter test log, run the following JMeter command -``` -jmeter -g log.jtl -o <report folder> -``` - -## How to Enable Kamon Metrics -[Kamon](http://kamon.io/documentation/get-started/) is used to track saga performance and reports trace data to both log -and [StatsD](https://github.com/etsy/statsd/). The easiest way to visualize tracing reports is to use a [docker image](http://kamon.io/documentation/kamon-statsd/0.6.6/overview/) -composed with StatsD, [Graphite](http://graphite.wikidot.com/), and [Grafana](http://grafana.org/) - -1. Build saga with profile `perf`. -``` -mvn package -Pperf -``` - -2. Run saga with aspectj and Kamon enabled. -By default, tracing data will be reported to StatsD running on `localhost` and port `8125`. To change the default StatsD -host configuration, pass `-Dkamon.statsd.hostname=<hostname>` and `-Dkamon.statsd.port=<port>` as vm options when running -saga. -``` -java -javaagent:/path/to/aspectj-weaver.jar -Dkamon.modules.kamon-annotation.auto-start=yes -Dkamon.modules.kamon-log-reporter.auto-start=yes -Dkamon.modules.kamon-statsd.auto-start=yes -jar saga.jar -``` - -3. Add a new row with the following query in Grafana to display the segments of trace data. Please refer to [Grafana Tutorial](http://docs.grafana.org/guides/getting_started/) -if you need some help - - - -## Recommended Test Setup -Three test machines to run the following services on each: -* saga -* car service in saga-demo -* MySQL - -The car service and saga can share the same machine, since car service consumes very little CPU and memory, and has no disk -access. diff --git a/saga-performance/images/grafana.png b/saga-performance/images/grafana.png deleted file mode 100644 index 837b777..0000000 Binary files a/saga-performance/images/grafana.png and /dev/null differ diff --git a/saga-performance/scripts/saga.jmx b/saga-performance/scripts/saga.jmx deleted file mode 100644 index 03f5cdc..0000000 --- a/saga-performance/scripts/saga.jmx +++ /dev/null @@ -1,289 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one or more - ~ contributor license agreements. See the NOTICE file distributed with - ~ this work for additional information regarding copyright ownership. - ~ The ASF licenses this file to You 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. - --> -<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2 r1790748"> - <hashTree> - <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> - <stringProp name="TestPlan.comments"></stringProp> - <boolProp name="TestPlan.functional_mode">false</boolProp> - <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> - <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="TestPlan.user_define_classpath"></stringProp> - </TestPlan> - <hashTree> - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true"> - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> - <boolProp name="LoopController.continue_forever">false</boolProp> - <intProp name="LoopController.loops">-1</intProp> - </elementProp> - <stringProp name="ThreadGroup.num_threads">200</stringProp> - <stringProp name="ThreadGroup.ramp_time">100</stringProp> - <longProp name="ThreadGroup.start_time">1503917597000</longProp> - <longProp name="ThreadGroup.end_time">1503917597000</longProp> - <boolProp name="ThreadGroup.scheduler">true</boolProp> - <stringProp name="ThreadGroup.duration">700</stringProp> - <stringProp name="ThreadGroup.delay"></stringProp> - </ThreadGroup> - <hashTree> - <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value"></stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">localhost</stringProp> - <stringProp name="HTTPSampler.port">8080</stringProp> - <stringProp name="HTTPSampler.protocol"></stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path"></stringProp> - <stringProp name="HTTPSampler.concurrentPool">6</stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </ConfigTestElement> - <hashTree/> - <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> - <collectionProp name="HeaderManager.headers"> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Content-Type</stringProp> - <stringProp name="Header.value">application/json</stringProp> - </elementProp> - </collectionProp> - </HeaderManager> - <hashTree/> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">[
 - {
 - "id": "request-car",
 - "type": "rest",
 - "serviceName": "localhost:9090",
 - "transaction": {
 - "method": "post",
 - "path": "/rentals",
 - "params": {
 - "json": {
 - "body": "{ \"customerId\": \"mike\" }"
 - }
 - }
 - },
 - "compensation": {
 - "method": "put",
 - "path": "/rentals",
 - "params": {
 - "json": {
 - "body": "{ \"customerId\": \"mike\" }"
 - }
 - }
 - }
 - }
 -]</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain"></stringProp> - <stringProp name="HTTPSampler.port"></stringProp> - <stringProp name="HTTPSampler.protocol"></stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">requests</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree/> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">100</stringProp> - </ConstantTimer> - <hashTree/> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">2</intProp> - </ResponseAssertion> - <hashTree/> - </hashTree> - <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Results" enabled="true"> - <boolProp name="ResultCollector.error_logging">false</boolProp> - <objProp> - <name>saveConfig</name> - <value class="SampleSaveConfiguration"> - <time>true</time> - <latency>true</latency> - <timestamp>true</timestamp> - <success>true</success> - <label>true</label> - <code>true</code> - <message>true</message> - <threadName>true</threadName> - <dataType>true</dataType> - <encoding>false</encoding> - <assertions>true</assertions> - <subresults>true</subresults> - <responseData>false</responseData> - <samplerData>false</samplerData> - <xml>false</xml> - <fieldNames>true</fieldNames> - <responseHeaders>false</responseHeaders> - <requestHeaders>false</requestHeaders> - <responseDataOnError>false</responseDataOnError> - <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> - <assertionsResultsToSave>0</assertionsResultsToSave> - <bytes>true</bytes> - <sentBytes>true</sentBytes> - <threadCounts>true</threadCounts> - <idleTime>true</idleTime> - <connectTime>true</connectTime> - </value> - </objProp> - <stringProp name="filename"></stringProp> - </ResultCollector> - <hashTree/> - <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true"> - <boolProp name="ResultCollector.error_logging">false</boolProp> - <objProp> - <name>saveConfig</name> - <value class="SampleSaveConfiguration"> - <time>true</time> - <latency>true</latency> - <timestamp>true</timestamp> - <success>true</success> - <label>true</label> - <code>true</code> - <message>true</message> - <threadName>true</threadName> - <dataType>true</dataType> - <encoding>false</encoding> - <assertions>true</assertions> - <subresults>true</subresults> - <responseData>false</responseData> - <samplerData>false</samplerData> - <xml>false</xml> - <fieldNames>true</fieldNames> - <responseHeaders>false</responseHeaders> - <requestHeaders>false</requestHeaders> - <responseDataOnError>false</responseDataOnError> - <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> - <assertionsResultsToSave>0</assertionsResultsToSave> - <bytes>true</bytes> - <sentBytes>true</sentBytes> - <threadCounts>true</threadCounts> - <idleTime>true</idleTime> - <connectTime>true</connectTime> - </value> - </objProp> - <stringProp name="filename"></stringProp> - </ResultCollector> - <hashTree/> - <ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Results" enabled="true"> - <boolProp name="ResultCollector.error_logging">false</boolProp> - <objProp> - <name>saveConfig</name> - <value class="SampleSaveConfiguration"> - <time>true</time> - <latency>true</latency> - <timestamp>true</timestamp> - <success>true</success> - <label>true</label> - <code>true</code> - <message>true</message> - <threadName>true</threadName> - <dataType>true</dataType> - <encoding>false</encoding> - <assertions>true</assertions> - <subresults>true</subresults> - <responseData>false</responseData> - <samplerData>false</samplerData> - <xml>false</xml> - <fieldNames>true</fieldNames> - <responseHeaders>false</responseHeaders> - <requestHeaders>false</requestHeaders> - <responseDataOnError>false</responseDataOnError> - <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> - <assertionsResultsToSave>0</assertionsResultsToSave> - <bytes>true</bytes> - <sentBytes>true</sentBytes> - <threadCounts>true</threadCounts> - <idleTime>true</idleTime> - <connectTime>true</connectTime> - </value> - </objProp> - <stringProp name="filename"></stringProp> - </ResultCollector> - <hashTree/> - <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true"> - <boolProp name="ResultCollector.error_logging">false</boolProp> - <objProp> - <name>saveConfig</name> - <value class="SampleSaveConfiguration"> - <time>true</time> - <latency>true</latency> - <timestamp>true</timestamp> - <success>true</success> - <label>true</label> - <code>true</code> - <message>true</message> - <threadName>true</threadName> - <dataType>true</dataType> - <encoding>false</encoding> - <assertions>true</assertions> - <subresults>true</subresults> - <responseData>false</responseData> - <samplerData>false</samplerData> - <xml>false</xml> - <fieldNames>true</fieldNames> - <responseHeaders>false</responseHeaders> - <requestHeaders>false</requestHeaders> - <responseDataOnError>false</responseDataOnError> - <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> - <assertionsResultsToSave>0</assertionsResultsToSave> - <bytes>true</bytes> - <sentBytes>true</sentBytes> - <threadCounts>true</threadCounts> - <idleTime>true</idleTime> - <connectTime>true</connectTime> - </value> - </objProp> - <stringProp name="filename"></stringProp> - </ResultCollector> - <hashTree/> - </hashTree> - <WorkBench guiclass="WorkBenchGui" testclass="WorkBench" testname="WorkBench" enabled="true"> - <boolProp name="WorkBench.save">true</boolProp> - </WorkBench> - <hashTree/> - </hashTree> -</jmeterTestPlan>
