mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-13 10:16:07 +00:00
Merge pull request #47 from Yuao-github/main
fix[protocol] modify a detail of "SpeedTest"
This commit is contained in:
1 file changed
+2
-2
@@ -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