Strange results when I test ICE

in Bug Reports
ICE VERSION: ICE-2.0.0
PLATEFORM: WINDOWS XP SP2
VC VERSION: VC 7.0
The slice defination:
The Server for SendTest just do nothing(use slice2cpp --impl and compile it),and the Client code like this:module Performance
{
interface SendTest
{
//simple types send test
void sendInt(int value);
};
};
//The stats callback class
int inbytes = 0;
int outbytes = 0;
class MyStats : public virtual Ice::Stats {
public:
virtual void bytesSent(const string &prot, Ice::Int num)
{
inbytes += num;
}
virtual void bytesReceived(const string &prot, Ice::Int num)
{
outbytes += num;
}
};
Codes in main(...) function://codes in run(...) function....
Ice::ObjectPrx base = communicator->stringToProxy(proxy);
SendTestPrx twoway = SendTestPrx::checkedCast(base->ice_twoway());
if(!twoway)
{
cerr << argv[0] << ": invalid proxy" << endl;
return EXIT_FAILURE;
}
SendTestPrx oneway = SendTestPrx::uncheckedCast(twoway->ice_oneway());
SendTestPrx batchOneway = SendTestPrx::uncheckedCast(twoway->ice_batchOneway());
SendTestPrx datagram = SendTestPrx::uncheckedCast(twoway->ice_datagram());
SendTestPrx batchDatagram = SendTestPrx::uncheckedCast(twoway->ice_batchDatagram());
IceUtil::Time t = IceUtil::Time::now();
try
{
for(int i = 1;i < 100000;i++)
{
oneway->sendInt(i);
//batchOneway->sendInt(i);
//datagram->sendInt(i);
//batchDatagram->sendInt(i);
}
//communicator->flushBatchRequests(); called in batch mode
}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
}
cout << "Total time elapse: " << (IceUtil::Time::now() - t).toMilliSeconds() << " milli seconds" << endl;
cout << "Total send : " << inbytes << " Bytes" << endl;
cout << "Total receive: " << outbytes << " Bytes" << endl;
int
main(int argc, char* argv[])
{
int status;
Ice::CommunicatorPtr communicator;
Ice::StatsPtr stats = new MyStats;
try
{
Ice::PropertiesPtr properties = Ice::createProperties();
properties->load("performance.cfg");
communicator = Ice::initializeWithProperties(argc, argv, properties);
communicator->setStats(stats);
status = run(argc, argv, communicator);
}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
status = EXIT_FAILURE;
}
Questions:
1)The most strange thing is when I test in datagram oneway mode,the total sent bytes is just 83 bytes(in other mode the number is 4900020) ,I don't know why?

2)In TCP batch oneway mode,the call count can not beyond 33825 before flush all requests.If beyonds it,the Ice::CloseConnectionException Raised. So why?



see attatchment for all test codes and test result.
Thanks
0
Comments
Regarding the number of batch oneways, that's a known bug. If the total number of bytes in the batch exceeds the configured maximum for the message size (property Ice.MessageSizeMax, default is 1 MB), then the connection is closed. In the next version of Ice you will get a MemoryLimitException.
I measure the communication with Ice::Stats interface.So do you mean I cann't get exact statistics with the Ice::Stats interface for datagram requests? I cann't understand your answer very well ,sorry:(
see the detail test ressult in attatch file.
Best regards.
Sorry for the late response. We've identified the problem and it will be fixed in the next release.
If you want to apply the fix, edit the file src/Ice/UdpTransceiver.cpp and add the code indicated below at line 295: Then you'll need to recompile the Ice library.
Thanks for the bug report!
Take care,
- Mark