Skip to content

Commit

Permalink
Merge branch 'master' into istio-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-sheng committed Nov 20, 2019
2 parents 2b5f1c6 + aa4ecb4 commit 5b849d2
Show file tree
Hide file tree
Showing 347 changed files with 8,505 additions and 608 deletions.
28 changes: 28 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

#
# 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.
#

github:
description: APM, Application Performance Monitoring System
homepage: https://skywalking.apache.org/
labels:
- skywalking
- observability
- apm
- distributed-tracing
- service-mesh
- dapper
14 changes: 13 additions & 1 deletion Jenkinsfile-Agent-Test
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (136)') {
stage('Test Cases Report (156)') {
steps {
echo "Test Cases Report"
}
Expand Down Expand Up @@ -99,11 +99,23 @@ pipeline {
sh 'bash test/plugin/run.sh netty-socketio-scenario'
}
}

stage('rabbitmq-scenario (12)') {
steps {
sh 'bash test/plugin/run.sh rabbitmq-scenario'
}
}
}
}

stage('Group2') {
stages {
stage('feign 9.0.0-9.5.1 (8)') {
steps {
sh 'bash test/plugin/run.sh feign-scenario'
}
}

stage('customize (1)') {
steps {
sh 'bash test/plugin/run.sh customize-scenario'
Expand Down
8 changes: 7 additions & 1 deletion Jenkinsfile-Agent-Test-2
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (136)') {
stage('Test Cases Report (146)') {
steps {
echo "Test Cases Report"
}
Expand All @@ -82,6 +82,12 @@ pipeline {
parallel {
stage('Group1') {
stages {
stage('spring-tx 4.x+ (10)') {
steps {
sh 'bash test/plugin/run.sh spring-tx-scenario'
}
}

stage('spring 4.3.x-5.2.x (54)') {
steps {
sh 'bash test/plugin/run.sh spring-4.3.x-scenario'
Expand Down
14 changes: 13 additions & 1 deletion Jenkinsfile-Agent-Test-3
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (119)') {
stage('Test Cases Report (160)') {
steps {
echo "Test Cases Report"
}
Expand All @@ -82,6 +82,12 @@ pipeline {
parallel {
stage('Group1') {
stages {
stage('hystrix 1.4.20-1.5.12 (20)') {
steps {
sh 'bash test/plugin/run.sh hystrix-scenario'
}
}

stage('postgresql 9.2.x-9.4.x (36)') {
steps {
sh 'bash test/plugin/run.sh postgresql-scenario'
Expand Down Expand Up @@ -115,6 +121,12 @@ pipeline {
sh 'bash test/plugin/run.sh mongodb-3.x-scenario'
}
}

stage('grpc 1.0.0-1.9.0 (21)') {
steps {
sh 'bash test/plugin/run.sh grpc-scenario'
}
}
}
}
}
Expand Down
18 changes: 15 additions & 3 deletions Jenkinsfile-Agent-Test-4
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pipeline {
}
}

stage('Test Cases Report (153)') {
stage('Test Cases Report (165)') {
steps {
echo "Test Cases Report"
}
Expand All @@ -84,6 +84,12 @@ pipeline {
parallel {
stage('Group1') {
stages {
stage('elasticsearch-6.x-scenario 6.7.1-6.8.4 (7)') {
steps {
sh 'bash test/plugin/run.sh elasticsearch-6.x-scenario'
}
}

stage('kafka 0.11.0.0-2.3.0 (16)') {
steps {
sh 'bash test/plugin/run.sh kafka-scenario'
Expand All @@ -109,9 +115,15 @@ pipeline {
}
}
}

stage('Group2') {
stages {
stage('elasticsearch-7.x-scenario 7.0.0-7.4.2 (11)') {
steps {
sh 'bash test/plugin/run.sh elasticsearch-7.x-scenario'
}
}

stage('spring-webflux 2.x (18)') {
steps {
sh 'bash test/plugin/run.sh webflux-scenario'
Expand Down Expand Up @@ -153,4 +165,4 @@ pipeline {
deleteDir()
}
}
}
}
2 changes: 1 addition & 1 deletion apm-application-toolkit/apm-toolkit-log4j-1.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>apm-application-toolkit</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.5.0-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion apm-application-toolkit/apm-toolkit-log4j-2.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>apm-application-toolkit</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.5.0-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion apm-application-toolkit/apm-toolkit-logback-1.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>apm-application-toolkit</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.5.0-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion apm-application-toolkit/apm-toolkit-opentracing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>apm-application-toolkit</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.5.0-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion apm-application-toolkit/apm-toolkit-trace/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>apm-application-toolkit</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.5.0-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion apm-application-toolkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>apm</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.5.0-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-application-toolkit</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apm-commons/apm-datacarrier/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>apm-commons</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.5.0-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ public DataCarrier setBufferStrategy(BufferStrategy strategy) {
return this;
}

public BlockingDataCarrier<T> toBlockingDataCarrier() {
this.channels.setStrategy(BufferStrategy.BLOCKING);
return new BlockingDataCarrier<T>(this.channels);
}

/**
* produce data to buffer, using the givven {@link BufferStrategy}.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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.commons.datacarrier.buffer;

import java.util.List;
import java.util.concurrent.ArrayBlockingQueue;

/**
* The buffer implementation based on JDK ArrayBlockingQueue.
*
* This implementation has better performance in server side. We are still trying to research whether this is suitable
* for agent side, which is more sensitive about blocks.
*
* @author wusheng
*/
public class ArrayBlockingQueueBuffer<T> implements QueueBuffer<T> {
private BufferStrategy strategy;
private ArrayBlockingQueue<T> queue;
private int bufferSize;

ArrayBlockingQueueBuffer(int bufferSize, BufferStrategy strategy) {
this.strategy = strategy;
this.queue = new ArrayBlockingQueue<T>(bufferSize);
this.bufferSize = bufferSize;
}

@Override public boolean save(T data) {
switch (strategy) {
case IF_POSSIBLE:
return queue.offer(data);
default:
try {
queue.put(data);
} catch (InterruptedException e) {
// Ignore the error
return false;
}
}
return true;
}

@Override public void setStrategy(BufferStrategy strategy) {
this.strategy = strategy;
}

@Override public void obtain(List<T> consumeList) {
queue.drainTo(consumeList);
}

@Override public int getBufferSize() {
return bufferSize;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,49 +18,36 @@

package org.apache.skywalking.apm.commons.datacarrier.buffer;

import org.apache.skywalking.apm.commons.datacarrier.callback.QueueBlockingCallback;
import org.apache.skywalking.apm.commons.datacarrier.common.AtomicRangeInteger;

import java.util.LinkedList;
import java.util.List;
import org.apache.skywalking.apm.commons.datacarrier.common.AtomicRangeInteger;

/**
* Created by wusheng on 2016/10/25.
* Self implementation ring queue.
*
* @author wusheng
*/
public class Buffer<T> {
public class Buffer<T> implements QueueBuffer<T> {
private final Object[] buffer;
private BufferStrategy strategy;
private AtomicRangeInteger index;
private List<QueueBlockingCallback<T>> callbacks;

Buffer(int bufferSize, BufferStrategy strategy) {
buffer = new Object[bufferSize];
this.strategy = strategy;
index = new AtomicRangeInteger(0, bufferSize);
callbacks = new LinkedList<QueueBlockingCallback<T>>();
}

void setStrategy(BufferStrategy strategy) {
public void setStrategy(BufferStrategy strategy) {
this.strategy = strategy;
}

void addCallback(QueueBlockingCallback<T> callback) {
callbacks.add(callback);
}

boolean save(T data) {
public boolean save(T data) {
int i = index.getAndIncrement();
if (buffer[i] != null) {
switch (strategy) {
case BLOCKING:
boolean isFirstTimeBlocking = true;
while (buffer[i] != null) {
if (isFirstTimeBlocking) {
isFirstTimeBlocking = false;
for (QueueBlockingCallback<T> callback : callbacks) {
callback.notify(data);
}
}
try {
Thread.sleep(1L);
} catch (InterruptedException e) {
Expand All @@ -69,7 +56,6 @@ boolean save(T data) {
break;
case IF_POSSIBLE:
return false;
case OVERRIDE:
default:
}
}
Expand All @@ -85,7 +71,7 @@ public void obtain(List<T> consumeList) {
this.obtain(consumeList, 0, buffer.length);
}

public void obtain(List<T> consumeList, int start, int end) {
void obtain(List<T> consumeList, int start, int end) {
for (int i = start; i < end; i++) {
if (buffer[i] != null) {
consumeList.add((T)buffer[i]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@
*/
public enum BufferStrategy {
BLOCKING,
OVERRIDE,
IF_POSSIBLE
}
Loading

0 comments on commit 5b849d2

Please sign in to comment.