Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
48bcac23
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 大约 1 年
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
48bcac23
编写于
11月 09, 2019
作者:
Z
zhang-wei
提交者:
wu-sheng
11月 09, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[test/plugin] immigrate jedis scenario (#3811)
* jedis scenario * update doc
上级
cbe03da0
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
513 addition
and
2 deletion
+513
-2
Jenkinsfile-Agent-Test-4
Jenkinsfile-Agent-Test-4
+7
-1
docs/en/guides/Plugin-test.md
docs/en/guides/Plugin-test.md
+2
-1
test/plugin/scenarios/jedis-scenario/bin/startup.sh
test/plugin/scenarios/jedis-scenario/bin/startup.sh
+22
-0
test/plugin/scenarios/jedis-scenario/config/expectedData.yaml
.../plugin/scenarios/jedis-scenario/config/expectedData.yaml
+111
-0
test/plugin/scenarios/jedis-scenario/configuration.yml
test/plugin/scenarios/jedis-scenario/configuration.yml
+29
-0
test/plugin/scenarios/jedis-scenario/pom.xml
test/plugin/scenarios/jedis-scenario/pom.xml
+108
-0
test/plugin/scenarios/jedis-scenario/src/main/assembly/assembly.xml
...n/scenarios/jedis-scenario/src/main/assembly/assembly.xml
+41
-0
test/plugin/scenarios/jedis-scenario/src/main/java/org/apache/skywalking/apm/testcase/jedis/Application.java
...org/apache/skywalking/apm/testcase/jedis/Application.java
+35
-0
test/plugin/scenarios/jedis-scenario/src/main/java/org/apache/skywalking/apm/testcase/jedis/controller/CaseController.java
...walking/apm/testcase/jedis/controller/CaseController.java
+57
-0
test/plugin/scenarios/jedis-scenario/src/main/java/org/apache/skywalking/apm/testcase/jedis/controller/RedisCommandExecutor.java
...g/apm/testcase/jedis/controller/RedisCommandExecutor.java
+46
-0
test/plugin/scenarios/jedis-scenario/src/main/resources/application.yaml
...narios/jedis-scenario/src/main/resources/application.yaml
+21
-0
test/plugin/scenarios/jedis-scenario/support-version.list
test/plugin/scenarios/jedis-scenario/support-version.list
+34
-0
未找到文件。
Jenkinsfile-Agent-Test-4
浏览文件 @
48bcac23
...
...
@@ -68,7 +68,7 @@ pipeline {
}
}
stage('Test Cases Report (1
35
)') {
stage('Test Cases Report (1
53
)') {
steps {
echo "Test Cases Report"
}
...
...
@@ -101,6 +101,12 @@ pipeline {
sh 'bash test/plugin/run.sh undertow-scenario'
}
}
stage('jedis 2.4.0-2.9.0 (18)') {
steps {
sh 'bash test/plugin/run.sh jedis-scenario'
}
}
}
}
...
...
docs/en/guides/Plugin-test.md
浏览文件 @
48bcac23
...
...
@@ -659,12 +659,13 @@ spring async 4.3.x-5.1.x | 35 | 967.70
mongodb 3.4.0-3.11.1 | 17 | 1465.63
### Workload 4
#### Group 1 (
1778
.45s)
#### Group 1 (
2397
.45s)
scenario name | versions | elapsed time (sec)
---|---|---
kafka 0.11.0.0-2.3.0 | 16 | 704.75
ehcache 2.8.x-2.10.x | 19 | 440.71
undertow 1.3.0-2.0.27 | 23 | 633.00
jedis 2.4.0-2.9.0 | 18 | 619
#### Group 2 (2148.155s)
scenario name | versions | elapsed time (sec)
...
...
test/plugin/scenarios/jedis-scenario/bin/startup.sh
0 → 100644
浏览文件 @
48bcac23
#!/bin/bash
#
# 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.
home
=
"
$(
cd
"
$(
dirname
$0
)
"
;
pwd
)
"
java
-jar
${
agent_opts
}
-Dredis
.host
=
${
REDIS_HOST
}
-Dredis
.port
=
${
REDIS_PORT
}
\
${
home
}
/../libs/jedis-scenario.jar &
\ No newline at end of file
test/plugin/scenarios/jedis-scenario/config/expectedData.yaml
0 → 100644
浏览文件 @
48bcac23
# 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.
registryItems
:
applications
:
-
{
jedis-scenario
:
2
}
instances
:
-
{
jedis-scenario
:
1
}
operationNames
:
-
jedis-scenario
:
[
Jedis/set
,
Jedis/echo
,
Jedis/del
,
Jedis/get
,
/jedis-scenario/case/jedis-scenario
]
heartbeat
:
[]
segmentItems
:
-
applicationCode
:
jedis-scenario
segmentSize
:
gt
1
segments
:
-
segmentId
:
not
null
spans
:
-
operationName
:
Jedis/echo
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Cache
startTime
:
nq
0
endTime
:
nq
0
componentId
:
30
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
redis-server:6379
peerId
:
0
tags
:
-
{
key
:
db.type
,
value
:
Redis
}
-
{
key
:
db.statement
,
value
:
echo Test
}
-
operationName
:
Jedis/set
operationId
:
0
parentSpanId
:
0
spanId
:
2
spanLayer
:
Cache
startTime
:
nq
0
endTime
:
nq
0
componentId
:
30
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
redis-server:6379
peerId
:
0
tags
:
-
{
key
:
db.type
,
value
:
Redis
}
-
{
key
:
db.statement
,
value
:
set a
}
-
operationName
:
Jedis/get
operationId
:
0
parentSpanId
:
0
spanId
:
3
spanLayer
:
Cache
startTime
:
nq
0
endTime
:
nq
0
componentId
:
30
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
redis-server:6379
peerId
:
0
tags
:
-
{
key
:
db.type
,
value
:
Redis
}
-
{
key
:
db.statement
,
value
:
get a
}
-
operationName
:
Jedis/del
operationId
:
0
parentSpanId
:
0
spanId
:
4
spanLayer
:
Cache
startTime
:
nq
0
endTime
:
nq
0
componentId
:
30
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
redis-server:6379
peerId
:
0
tags
:
-
{
key
:
db.type
,
value
:
Redis
}
-
{
key
:
db.statement
,
value
:
del a
}
-
operationName
:
/jedis-scenario/case/jedis-scenario
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
1
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/jedis-scenario/case/jedis-scenario'
}
-
{
key
:
http.method
,
value
:
GET
}
\ No newline at end of file
test/plugin/scenarios/jedis-scenario/configuration.yml
0 → 100644
浏览文件 @
48bcac23
# 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.
type
:
jvm
entryService
:
http://localhost:8080/jedis-scenario/case/jedis-scenario
healthCheck
:
http://localhost:8080/jedis-scenario/case/healthCheck
startScript
:
./bin/startup.sh
framework
:
jedis-scenario
environment
:
-
REDIS_HOST=redis-server
-
REDIS_PORT=6379
dependencies
:
redis-server
:
image
:
redis:3.2.9-alpine
hostname
:
redis-server
test/plugin/scenarios/jedis-scenario/pom.xml
0 → 100644
浏览文件 @
48bcac23
<?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.
~
-->
<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"
>
<groupId>
org.apache.skywalking.apm.testcase
</groupId>
<artifactId>
jedis-scenario
</artifactId>
<version>
1.0.0
</version>
<packaging>
jar
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<compiler.version>
1.8
</compiler.version>
<test.framework.version>
2.9.0
</test.framework.version>
<spring-boot-version>
2.1.6.RELEASE
</spring-boot-version>
</properties>
<name>
skywalking-jedis-scenario
</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${spring-boot-version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
<version>
${test.framework.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependencies>
<build>
<finalName>
jedis-scenario
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
1.5.9.RELEASE
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
${compiler.version}
</source>
<target>
${compiler.version}
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
assemble
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
<outputDirectory>
./target/
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
test/plugin/scenarios/jedis-scenario/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
48bcac23
<?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.
~
-->
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<formats>
<format>
zip
</format>
</formats>
<fileSets>
<fileSet>
<directory>
./bin
</directory>
<fileMode>
0775
</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>
${project.build.directory}/jedis-scenario.jar
</source>
<outputDirectory>
./libs
</outputDirectory>
<fileMode>
0775
</fileMode>
</file>
</files>
</assembly>
test/plugin/scenarios/jedis-scenario/src/main/java/org/apache/skywalking/apm/testcase/jedis/Application.java
0 → 100644
浏览文件 @
48bcac23
/*
* 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.
*
*/
package
org.apache.skywalking.apm.testcase.jedis
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
try
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
catch
(
Exception
e
)
{
// Never do this
}
}
}
test/plugin/scenarios/jedis-scenario/src/main/java/org/apache/skywalking/apm/testcase/jedis/controller/CaseController.java
0 → 100644
浏览文件 @
48bcac23
/*
* 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.
*
*/
package
org.apache.skywalking.apm.testcase.jedis.controller
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/case"
)
public
class
CaseController
{
private
static
final
String
SUCCESS
=
"Success"
;
@Value
(
"${redis.host:127.0.0.1}"
)
private
String
redisHost
;
@Value
(
"${redis.port:6379}"
)
private
Integer
redisPort
;
@RequestMapping
(
"/jedis-scenario"
)
@ResponseBody
public
String
testcase
()
throws
Exception
{
try
(
RedisCommandExecutor
command
=
new
RedisCommandExecutor
(
redisHost
,
redisPort
))
{
command
.
set
(
"a"
,
"a"
);
command
.
get
(
"a"
);
command
.
del
(
"a"
);
}
return
SUCCESS
;
}
@RequestMapping
(
"/healthCheck"
)
@ResponseBody
public
String
healthCheck
()
throws
Exception
{
try
(
RedisCommandExecutor
command
=
new
RedisCommandExecutor
(
redisHost
,
redisPort
))
{
}
return
SUCCESS
;
}
}
test/plugin/scenarios/jedis-scenario/src/main/java/org/apache/skywalking/apm/testcase/jedis/controller/RedisCommandExecutor.java
0 → 100644
浏览文件 @
48bcac23
/*
* 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.
*
*/
package
org.apache.skywalking.apm.testcase.jedis.controller
;
import
redis.clients.jedis.Jedis
;
public
class
RedisCommandExecutor
implements
AutoCloseable
{
private
Jedis
jedis
;
public
RedisCommandExecutor
(
String
host
,
Integer
port
)
{
jedis
=
new
Jedis
(
host
,
port
);
jedis
.
echo
(
"Test"
);
}
public
void
set
(
String
key
,
String
value
)
{
jedis
.
set
(
key
,
value
);
}
public
void
get
(
String
key
)
{
jedis
.
get
(
key
);
}
public
void
del
(
String
key
)
{
jedis
.
del
(
key
);
}
public
void
close
()
throws
Exception
{
jedis
.
close
();
}
}
test/plugin/scenarios/jedis-scenario/src/main/resources/application.yaml
0 → 100644
浏览文件 @
48bcac23
#
# 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.
#
#
server
:
port
:
8080
servlet
:
context-path
:
/jedis-scenario
\ No newline at end of file
test/plugin/scenarios/jedis-scenario/support-version.list
0 → 100644
浏览文件 @
48bcac23
# 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
# "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.
2.9.0
2.8.2
2.8.1
2.8.0
2.7.3
2.7.2
2.7.1
2.7.0
2.6.3
2.6.2
2.6.1
2.6.0
2.5.0
2.5.1
2.5.2
2.4.2
2.4.1
2.4.0
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录