peng-yongsheng commented on a change in pull request #3021: Using ArryList
instead of LinkedList
URL: https://github.com/apache/skywalking/pull/3021#discussion_r301612073
##########
File path:
apm-commons/apm-datacarrier/src/main/java/org/apache/skywalking/apm/commons/datacarrier/consumer/ConsumerThread.java
##########
@@ -36,7 +37,7 @@
super(threadName);
this.consumer = consumer;
running = false;
- dataSources = new LinkedList<DataSource>();
+ dataSources = new ArrayList<DataSource>(1);
Review comment:
I had tested the performance of the ArrayList and LinkedList. But the report
was lost. I just remember that LinkedList is faster than ArrayList if the size
is below 5w.
A very important thing you must know is Datacarrier sends it's data to the
consumer every 20ms. So, if the queue size more than 5w, that means the TPS is
5w * (1000ms / 20ms) = 250w. This is a not reachable TPS.
@dmsolr
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services