mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-15 22:15:20 +00:00
del[protocol]: remove fury test, record not support
This commit is contained in:
1 parent
8803839cbf
commit
280c4d634c
2 files changed
-77
No files matched your search
@@ -128,19 +128,6 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.furyio</groupId>-->
|
|
||||||
<!-- <artifactId>fury-core</artifactId>-->
|
|
||||||
<!-- <version>0.1.0</version>-->
|
|
||||||
<!-- <scope>test</scope>-->
|
|
||||||
<!-- <exclusions>-->
|
|
||||||
<!-- <exclusion>-->
|
|
||||||
<!-- <artifactId>slf4j-api</artifactId>-->
|
|
||||||
<!-- <groupId>org.slf4j</groupId>-->
|
|
||||||
<!-- </exclusion>-->
|
|
||||||
<!-- </exclusions>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ public class BenchmarkTesting {
|
|||||||
System.out.println(StringUtils.format("[单线程性能测试-->[benchmark:{}]]", benchmark));
|
System.out.println(StringUtils.format("[单线程性能测试-->[benchmark:{}]]", benchmark));
|
||||||
|
|
||||||
zfooTest();
|
zfooTest();
|
||||||
// furyTest();
|
|
||||||
protobufTest();
|
protobufTest();
|
||||||
kryoTest();
|
kryoTest();
|
||||||
|
|
||||||
@@ -85,7 +84,6 @@ public class BenchmarkTesting {
|
|||||||
System.out.println(StringUtils.format("[多线程性能测试-->[benchmark:{}]]", benchmark));
|
System.out.println(StringUtils.format("[多线程性能测试-->[benchmark:{}]]", benchmark));
|
||||||
|
|
||||||
zfooMultipleThreadTest();
|
zfooMultipleThreadTest();
|
||||||
// furyMultipleThreadTest();
|
|
||||||
protobufMultipleThreadTest();
|
protobufMultipleThreadTest();
|
||||||
kryoMultipleThreadTest();
|
kryoMultipleThreadTest();
|
||||||
|
|
||||||
@@ -137,42 +135,6 @@ public class BenchmarkTesting {
|
|||||||
System.out.println(StringUtils.format("[zfoo] [复杂对象] [thread:{}] [size:{}] [time:{}]", Thread.currentThread().getName(), buffer.writerIndex(), System.currentTimeMillis() - startTime));
|
System.out.println(StringUtils.format("[zfoo] [复杂对象] [thread:{}] [size:{}] [time:{}]", Thread.currentThread().getName(), buffer.writerIndex(), System.currentTimeMillis() - startTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Test
|
|
||||||
// public void furyTest() {
|
|
||||||
// var buffer = MemoryBuffer.newHeapBuffer(1_0000);
|
|
||||||
// // 序列化和反序列化简单对象
|
|
||||||
// long startTime = System.currentTimeMillis();
|
|
||||||
// for (int i = 0; i < benchmark; i++) {
|
|
||||||
// buffer.writerIndex(0);
|
|
||||||
// buffer.readerIndex(0);
|
|
||||||
// fury.serialize(buffer, simpleObject);
|
|
||||||
// var obj = fury.deserialize(buffer);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// System.out.println(StringUtils.format("[fury] [简单对象] [thread:{}] [size:{}] [time:{}]", Thread.currentThread().getName(), buffer.writerIndex(), System.currentTimeMillis() - startTime));
|
|
||||||
//
|
|
||||||
// // 序列化和反序列化常规对象
|
|
||||||
// startTime = System.currentTimeMillis();
|
|
||||||
// for (int i = 0; i < benchmark; i++) {
|
|
||||||
// buffer.writerIndex(0);
|
|
||||||
// buffer.readerIndex(0);
|
|
||||||
// fury.serialize(buffer, normalObject);
|
|
||||||
// var obj = fury.deserialize(buffer);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// System.out.println(StringUtils.format("[fury] [常规对象] [thread:{}] [size:{}] [time:{}]", Thread.currentThread().getName(), buffer.writerIndex(), System.currentTimeMillis() - startTime));
|
|
||||||
//
|
|
||||||
// // 序列化和反序列化复杂对象
|
|
||||||
// startTime = System.currentTimeMillis();
|
|
||||||
// for (int i = 0; i < benchmark; i++) {
|
|
||||||
// buffer.writerIndex(0);
|
|
||||||
// buffer.readerIndex(0);
|
|
||||||
// fury.serialize(buffer, complexObject);
|
|
||||||
// var obj = fury.deserialize(buffer);
|
|
||||||
// }
|
|
||||||
// System.out.println(StringUtils.format("[fury] [复杂对象] [thread:{}] [size:{}] [time:{}]", Thread.currentThread().getName(), buffer.writerIndex(), System.currentTimeMillis() - startTime));
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void kryoTest() {
|
public void kryoTest() {
|
||||||
try {
|
try {
|
||||||
@@ -273,17 +235,6 @@ public class BenchmarkTesting {
|
|||||||
countdown.await();
|
countdown.await();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Test
|
|
||||||
// public void furyMultipleThreadTest() throws InterruptedException {
|
|
||||||
// var countdown = new CountDownLatch(threadNum);
|
|
||||||
// for (var i = 0; i < threadNum; i++) {
|
|
||||||
// executors[i].execute(() -> {
|
|
||||||
// furyTest();
|
|
||||||
// countdown.countDown();
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// countdown.await();
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void kryoMultipleThreadTest() throws InterruptedException {
|
public void kryoMultipleThreadTest() throws InterruptedException {
|
||||||
@@ -359,21 +310,6 @@ public class BenchmarkTesting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private static ThreadSafeFury fury;
|
|
||||||
//
|
|
||||||
// static {
|
|
||||||
// fury = new ThreadLocalFury(classLoader -> {
|
|
||||||
// Fury f = Fury.builder().withLanguage(Language.JAVA)
|
|
||||||
// .build();
|
|
||||||
// f.register(ComplexObject.class);
|
|
||||||
// f.register(NormalObject.class);
|
|
||||||
// f.register(SimpleObject.class);
|
|
||||||
// f.register(VeryBigObject.class);
|
|
||||||
// f.register(ObjectA.class);
|
|
||||||
// f.register(ObjectB.class);
|
|
||||||
// return f;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// -------------------------------------------以下为测试用例---------------------------------------------------------------
|
// -------------------------------------------以下为测试用例---------------------------------------------------------------
|
||||||
// 简单类型
|
// 简单类型
|
||||||
|
|||||||
Reference in new issue
Block a user