You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/04/03 16:12:54 UTC
svn commit: r761687 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.cpp
Author: tabish
Date: Fri Apr 3 14:12:54 2009
New Revision: 761687
URL: http://svn.apache.org/viewvc?rev=761687&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-232
new patch for UTF-8 reader/writer code in openwire wireformat.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.cpp?rev=761687&r1=761686&r2=761687&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.cpp Fri Apr 3 14:12:54 2009
@@ -49,7 +49,7 @@
this->dataOut = new DataOutputStream( &bytesOut );
Random randGen;
- const int bufferSize = 32876;
+ const int bufferSize = 35686;
for( int i = 0; i < bufferSize; ++i ) {
this->buffer.push_back( (char)( randGen.nextInt( 254 ) + 1 ) );
@@ -66,20 +66,7 @@
////////////////////////////////////////////////////////////////////////////////
void OpenWireStringSupportBenchmark::run() {
- string testStr = "This is a test string for Openwire";
-
-// OpenwireStringSupport::writeString( *dataOut, &testStr );
-//
-// // Move the output back to the input.
-// bytesIn.setByteArray( bytesOut.toByteArray(), bytesOut.size() );
-//
-// string resultStr = OpenwireStringSupport::readString( *dataIn );
-//
-// CPPUNIT_ASSERT( testStr == resultStr );
-
-// this->bytesOut.reset();
OpenwireStringSupport::writeString( *dataOut, &buffer );
bytesIn.setByteArray( bytesOut.toByteArray(), bytesOut.size() );
string resultStr = OpenwireStringSupport::readString( *dataIn );
-
}