summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/throughput/Client.cpp
diff options
context:
space:
mode:
authorZeroC Staff <git@zeroc.com>2014-06-04 23:03:57 +0000
committerZeroC Staff <git@zeroc.com>2014-06-04 23:03:57 +0000
commit7aaf53c7ecb429a8e3b6abab3f7b9dbdc387b171 (patch)
tree78bde514408b4d02488e5efffd325faaa1c9a287 /cpp/demo/Ice/throughput/Client.cpp
parentfix for Java metrics test (diff)
downloadice-7aaf53c7ecb429a8e3b6abab3f7b9dbdc387b171.tar.bz2
ice-7aaf53c7ecb429a8e3b6abab3f7b9dbdc387b171.tar.xz
ice-7aaf53c7ecb429a8e3b6abab3f7b9dbdc387b171.zip
New cpp:view-type metadata for strings, sequences and dictionaries, plus updates
to throughput demo. Fixes ICE-5382.
Diffstat (limited to 'cpp/demo/Ice/throughput/Client.cpp')
-rw-r--r--cpp/demo/Ice/throughput/Client.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/cpp/demo/Ice/throughput/Client.cpp b/cpp/demo/Ice/throughput/Client.cpp
index 2459a9468e8..8f4fd33c70a 100644
--- a/cpp/demo/Ice/throughput/Client.cpp
+++ b/cpp/demo/Ice/throughput/Client.cpp
@@ -67,6 +67,7 @@ ThroughputClient::run(int argc, char* argv[])
byteArr.second = byteArr.first + byteSeq.size();
StringSeq stringSeq(StringSeqSize, "hello");
+ vector<Util::string_view> stringViewSeq(StringSeqSize, "hello");
StringDoubleSeq structSeq(StringDoubleSeqSize);
int i;
@@ -104,6 +105,9 @@ ThroughputClient::run(int argc, char* argv[])
StringSeq emptyStrings(1);
emptyStrings.resize(1);
+ vector<Util::string_view> emptyStringViews(1);
+ emptyStringViews.resize(1);
+
StringDoubleSeq emptyStructs(1);
emptyStructs.resize(1);
@@ -114,7 +118,7 @@ ThroughputClient::run(int argc, char* argv[])
for(int i = 0; i < 10000; i++)
{
throughput->sendByteSeq(emptyBytes);
- throughput->sendStringSeq(emptyStrings);
+ throughput->sendStringSeq(emptyStringViews);
throughput->sendStructSeq(emptyStructs);
throughput->sendFixedSeq(emptyFixed);
@@ -124,7 +128,7 @@ ThroughputClient::run(int argc, char* argv[])
throughput->recvFixedSeq();
throughput->echoByteSeq(emptyBytes);
- throughput->echoStringSeq(emptyStrings);
+ throughput->echoStringSeq(emptyStringViews);
throughput->echoStructSeq(emptyStructs);
throughput->echoFixedSeq(emptyFixed);
}
@@ -292,13 +296,13 @@ ThroughputClient::run(int argc, char* argv[])
{
case 't':
{
- throughput->sendStringSeq(stringSeq);
+ throughput->sendStringSeq(stringViewSeq);
break;
}
case 'o':
{
- throughputOneway->sendStringSeq(stringSeq);
+ throughputOneway->sendStringSeq(stringViewSeq);
break;
}
@@ -310,7 +314,7 @@ ThroughputClient::run(int argc, char* argv[])
case 'e':
{
- throughput->echoStringSeq(stringSeq);
+ throughput->echoStringSeq(stringViewSeq);
break;
}
}