git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@760910 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2009-04-01 15:07:16 +00:00
parent eab5a3a2e2
commit cd174e7829
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.apache.activemq</groupId> <groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId> <artifactId>activemq-parent</artifactId>
<version>5.2-SNAPSHOT</version> <version>5.3-SNAPSHOT</version>
</parent> </parent>
<artifactId>activemq-protocol-buffer</artifactId> <artifactId>activemq-protocol-buffer</artifactId>
@ -48,7 +48,7 @@
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.0.1</version>
</dependency> </dependency>

View File

@ -67,15 +67,15 @@ public class PerformanceTest extends TestSupport {
StopWatch watch2 = createStopWatch("reader"); StopWatch watch2 = createStopWatch("reader");
InputStream in = new BufferedInputStream(new FileInputStream(fileName)); InputStream in = new BufferedInputStream(new FileInputStream(fileName));
CodedInputStream cin = CodedInputStream.newInstance(in); CodedInputStream cin = CodedInputStream.newInstance(in);
cin.setSizeLimit(0x7FFFFFFF);
for (long i = 0; i < messageCount; i++) { for (long i = 0; i < messageCount; i++) {
watch2.start(); watch2.start();
int size = cin.readRawVarint32(); int size = cin.readRawVarint32();
int previous = cin.pushLimit(size); int previous = cin.pushLimit(size);
//cin.setSizeLimit(size + 4);
OpenWire.Message message = OpenWire.Message.parseFrom(cin); OpenWire.Message message = OpenWire.Message.parseFrom(cin);
cin.resetBytesReadCounter();
cin.popLimit(previous); cin.popLimit(previous);
if (verbose) { if (verbose) {