Skip to content

Commit

Permalink
performance logs configuration (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
liubao68 authored Nov 23, 2023
1 parent 906cfdf commit fe64185
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,18 @@ servicecomb:
address: http://localhost:30100

accesslog:
enabled: false
enabled: true
metrics:
window_time: 60000
invocation:
latencyDistribution: 0,10,50,100,1000
Consumer.invocation.slow:
enabled: true
msTime: 300
Provider.invocation.slow:
enabled: true
msTime: 300
publisher.defaultLog:
enabled: true
endpoints.client.detail.enabled: true

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,20 @@ servicecomb:
address: http://localhost:30100

accesslog:
enabled: false
enabled: true
metrics:
window_time: 60000
invocation:
latencyDistribution: 0,10,50,100,1000
Consumer.invocation.slow:
enabled: true
msTime: 300
Provider.invocation.slow:
enabled: true
msTime: 300
publisher.defaultLog:
enabled: true
endpoints.client.detail.enabled: true

http:
dispatcher:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,19 @@ servicecomb:
address: 0.0.0.0:9093
registry:
address: http://localhost:30100

accesslog:
enabled: false
enabled: true
metrics:
window_time: 60000
invocation:
latencyDistribution: 0,10,50,100,1000
Consumer.invocation.slow:
enabled: true
msTime: 300
Provider.invocation.slow:
enabled: true
msTime: 300
publisher.defaultLog:
enabled: true
endpoints.client.detail.enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,20 @@ servicecomb:
address: 0.0.0.0:9092

accesslog:
enabled: false
enabled: true
metrics:
window_time: 60000
invocation:
latencyDistribution: 0,10,50,100,1000
Consumer.invocation.slow:
enabled: true
msTime: 50
Provider.invocation.slow:
enabled: true
msTime: 50
publisher.defaultLog:
enabled: true
endpoints.client.detail.enabled: true

spring:
profiles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
</Appenders>

<Loggers>
<Logger name="scb-access" level="INFO" additivity="false">
<AsyncLogger name="scb-access" level="INFO" additivity="false">
<AppenderRef ref="AccessLog"/>
</Logger>
<Logger name="scb-metrics" level="INFO" additivity="false">
</AsyncLogger>
<AsyncLogger name="scb-metrics" level="INFO" additivity="false">
<AppenderRef ref="MetricsLog"/>
</Logger>
<Logger name="scb-slow" level="INFO" additivity="false">
</AsyncLogger>
<AsyncLogger name="scb-slow" level="INFO" additivity="false">
<AppenderRef ref="SlowLog"/>
</Logger>
</AsyncLogger>

<Root level="INFO">
<AppenderRef ref="Console"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,20 @@ servicecomb:
address: 0.0.0.0:9090?sslEnabled=false

accesslog:
enabled: false
enabled: true
metrics:
window_time: 60000
invocation:
latencyDistribution: 0,10,50,100,1000
Consumer.invocation.slow:
enabled: true
msTime: 50
Provider.invocation.slow:
enabled: true
msTime: 50
publisher.defaultLog:
enabled: true
endpoints.client.detail.enabled: true

http:
dispatcher:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
</Appenders>

<Loggers>
<Logger name="scb-access" level="INFO" additivity="false">
<AsyncLogger name="scb-access" level="INFO" additivity="false">
<AppenderRef ref="AccessLog"/>
</Logger>
<Logger name="scb-metrics" level="INFO" additivity="false">
</AsyncLogger>
<AsyncLogger name="scb-metrics" level="INFO" additivity="false">
<AppenderRef ref="MetricsLog"/>
</Logger>
<Logger name="scb-slow" level="INFO" additivity="false">
</AsyncLogger>
<AsyncLogger name="scb-slow" level="INFO" additivity="false">
<AppenderRef ref="SlowLog"/>
</Logger>
</AsyncLogger>

<Root level="INFO">
<AppenderRef ref="Console"/>
Expand Down
5 changes: 5 additions & 0 deletions java-chassis-benchmark/basic-3.0.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.4.4</version>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,20 @@ servicecomb:
address: 0.0.0.0:9093

accesslog:
enabled: false
enabled: true
metrics:
window_time: 60000
invocation:
latencyDistribution: 0,10,50,100,1000
Consumer.invocation.slow:
enabled: true
msTime: 50
Provider.invocation.slow:
enabled: true
msTime: 50
publisher.defaultLog:
enabled: true
endpoints.client.detail.enabled: true

spring:
profiles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
</Appenders>

<Loggers>
<Logger name="scb-access" level="INFO" additivity="false">
<AsyncLogger name="scb-access" level="INFO" additivity="false">
<AppenderRef ref="AccessLog"/>
</Logger>
<Logger name="scb-metrics" level="INFO" additivity="false">
</AsyncLogger>
<AsyncLogger name="scb-metrics" level="INFO" additivity="false">
<AppenderRef ref="MetricsLog"/>
</Logger>
<Logger name="scb-slow" level="INFO" additivity="false">
</AsyncLogger>
<AsyncLogger name="scb-slow" level="INFO" additivity="false">
<AppenderRef ref="SlowLog"/>
</Logger>
</AsyncLogger>

<Root level="INFO">
<AppenderRef ref="Console"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public Thread newThread(Runnable r) {
CountDownLatch initLatch = new CountDownLatch(threadCount);
for (int i = 0; i < threadCount; i++) {
executor.submit(() -> {
providerService.sayHello(wait, dataModel);
initLatch.countDown();
});
}
Expand Down

0 comments on commit fe64185

Please sign in to comment.