mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-20 18:25:55 +10:00
[강운덕] [LUCYSUS-1744] udpdata sender 최적화
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1463 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -31,7 +31,7 @@ public class UdpDataSender implements DataSender, Runnable {
|
||||
|
||||
private final LinkedBlockingQueue<Object> queue = new LinkedBlockingQueue<Object>(1024);
|
||||
|
||||
private int maxDrainSize = 10;
|
||||
private final int maxDrainSize = 10;
|
||||
// 주의 single thread용임. ArrayList보다 더 단순한 오퍼레이션을 수행하는 Collection.
|
||||
private Collection<Object> drain = new UnsafeArrayCollection<Object>(maxDrainSize);
|
||||
// 주의 single thread용임
|
||||
@@ -236,7 +236,7 @@ public class UdpDataSender implements DataSender, Runnable {
|
||||
|
||||
private Collection<Object> takeN() {
|
||||
drain.clear();
|
||||
int size = queue.drainTo(drain, 10);
|
||||
int size = queue.drainTo(drain, maxDrainSize);
|
||||
if (size <= 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user