mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-06-02 00:15:43 +00:00
fix[protocol] modify a detail of "SpeedTest"
This commit is contained in:
@@ -206,7 +206,7 @@ public class SpeedTest {
|
||||
protobufNormalObject.writeTo(codedOutputStream);
|
||||
length = codedOutputStream.getTotalBytesWritten();
|
||||
var codeInput = CodedInputStream.newInstance(buffer, 0, length);
|
||||
var mess = ProtobufObject.ProtobufSimpleObject.parseFrom(codeInput);
|
||||
var mess = ProtobufObject.ProtobufNormalObject.parseFrom(codeInput);
|
||||
}
|
||||
System.out.println(StringUtils.format("[protobuf] [常规对象] [thread:{}] [size:{}] [time:{}]", Thread.currentThread().getName(), length, System.currentTimeMillis() - startTime));
|
||||
|
||||
@@ -217,7 +217,7 @@ public class SpeedTest {
|
||||
protobufComplexObject.writeTo(codedOutputStream);
|
||||
length = codedOutputStream.getTotalBytesWritten();
|
||||
var codeInput = CodedInputStream.newInstance(buffer, 0, length);
|
||||
var mess = ProtobufObject.ProtobufSimpleObject.parseFrom(codeInput);
|
||||
var mess = ProtobufObject.ProtobufComplexObject.parseFrom(codeInput);
|
||||
}
|
||||
System.out.println(StringUtils.format("[protobuf] [复杂对象] [thread:{}] [size:{}] [time:{}]", Thread.currentThread().getName(), length, System.currentTimeMillis() - startTime));
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user