移除无用测试类
This commit is contained in:
parent
6c4213a970
commit
ce81b2ee8b
|
|
@ -1,32 +0,0 @@
|
|||
package com.a.eye.skywalking.storage;
|
||||
|
||||
import com.a.eye.skywalking.storage.data.file.DataFileNameDesc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/11/30.
|
||||
*/
|
||||
public class TestFile {
|
||||
public static void main(String[] args) throws IOException {
|
||||
// File file = new File("/Users/xin/workbench/data/file", "2016_11_29_23_02_55_517_1000");
|
||||
// System.out.println(file.length());
|
||||
//
|
||||
// FileInputStream byteInputStream = new FileInputStream(file);
|
||||
// byte[] bytes = new byte[1024];
|
||||
// int count = 0;
|
||||
// int length = 0;
|
||||
// while ((count = byteInputStream.read(bytes)) != -1) {
|
||||
// length += count;
|
||||
// }
|
||||
//
|
||||
// System.out.println(length);
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
System.out.println(startTime);
|
||||
System.out.println(new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss_SSS").format(startTime));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
package com.a.eye.skywalking.storage;
|
||||
|
||||
import com.a.eye.skywalking.health.report.HealthCollector;
|
||||
import com.a.eye.skywalking.health.report.HeathReading;
|
||||
import com.a.eye.skywalking.storage.config.Config;
|
||||
import com.a.eye.skywalking.storage.data.spandata.RequestSpanData;
|
||||
import com.lmax.disruptor.EventHandler;
|
||||
import com.lmax.disruptor.RingBuffer;
|
||||
import com.lmax.disruptor.dsl.Disruptor;
|
||||
import com.lmax.disruptor.util.DaemonThreadFactory;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/12/7.
|
||||
*/
|
||||
public class TestMain {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
Disruptor<StringBuilder> requestSpanDataDisruptor = null;
|
||||
requestSpanDataDisruptor = new Disruptor<StringBuilder>(new StringBuilderFactory(), Config.Disruptor.BUFFER_SIZE, DaemonThreadFactory.INSTANCE);
|
||||
requestSpanDataDisruptor.handleEventsWith(new EventHandler<StringBuilder>() {
|
||||
@Override
|
||||
public void onEvent(StringBuilder event, long sequence, boolean endOfBatch) throws Exception {
|
||||
System.out.println("AA: " + event);
|
||||
}
|
||||
}, new EventHandler<StringBuilder>() {
|
||||
@Override
|
||||
public void onEvent(StringBuilder event, long sequence, boolean endOfBatch) throws Exception {
|
||||
System.out.println("BB: " + event);
|
||||
}
|
||||
});
|
||||
requestSpanDataDisruptor.start();
|
||||
RingBuffer<StringBuilder> stringBuilderRingBuffer = requestSpanDataDisruptor.getRingBuffer();
|
||||
|
||||
long sequence = stringBuilderRingBuffer.next(); // Grab the next sequence
|
||||
try {
|
||||
StringBuilder data = stringBuilderRingBuffer.get(sequence);
|
||||
data.append("A");
|
||||
} catch (Exception e) {
|
||||
} finally {
|
||||
stringBuilderRingBuffer.publish(sequence);
|
||||
}
|
||||
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue