summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-01-27 12:04:15 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-01-27 12:04:15 +0000
commitd5eecb1f507b5fc1ed67ef42c94fa74245345cd8 (patch)
treecca307d6b6f9782eaa611fedd9bdad94cf3de858
parentfix for bug 836: deprecation warnings in generated code (diff)
downloadice-d5eecb1f507b5fc1ed67ef42c94fa74245345cd8.tar.bz2
ice-d5eecb1f507b5fc1ed67ef42c94fa74245345cd8.tar.xz
ice-d5eecb1f507b5fc1ed67ef42c94fa74245345cd8.zip
Fixed bug 808
-rw-r--r--cpp/demo/Ice/throughput/Client.cpp4
-rw-r--r--cppe/demo/IceE/throughput/Client.cpp2
-rwxr-xr-xcs/demo/Ice/throughput/Client.cs2
-rw-r--r--java/demo/Ice/throughput/Client.java2
-rw-r--r--javae/demo/IceE/jdk/throughput/Client.java2
-rw-r--r--py/demo/Ice/throughput/Client.py2
-rwxr-xr-xvb/demo/Ice/throughput/Client.vb2
7 files changed, 9 insertions, 7 deletions
diff --git a/cpp/demo/Ice/throughput/Client.cpp b/cpp/demo/Ice/throughput/Client.cpp
index e342ea31d3e..e61514e5a7e 100644
--- a/cpp/demo/Ice/throughput/Client.cpp
+++ b/cpp/demo/Ice/throughput/Client.cpp
@@ -10,6 +10,8 @@
#include <Ice/Ice.h>
#include <Throughput.h>
+#include <iomanip>
+
using namespace std;
using namespace Demo;
@@ -351,7 +353,7 @@ ThroughputClient::run(int argc, char* argv[])
{
mbit *= 2;
}
- cout << "throughput: " << mbit << " Mbps" << endl;
+ cout << "throughput: " << setprecision(5) << mbit << "Mbps" << endl;
}
else if(c == 's')
{
diff --git a/cppe/demo/IceE/throughput/Client.cpp b/cppe/demo/IceE/throughput/Client.cpp
index 60ad8aa56bf..9d17de76de5 100644
--- a/cppe/demo/IceE/throughput/Client.cpp
+++ b/cppe/demo/IceE/throughput/Client.cpp
@@ -375,7 +375,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
mbit *= 2;
}
- printf("throughput: %f Mbps\n", mbit);
+ printf("throughput: %.2fMbps\n", mbit);
}
else if(c == 's')
{
diff --git a/cs/demo/Ice/throughput/Client.cs b/cs/demo/Ice/throughput/Client.cs
index bda66f01e3e..100710eab56 100755
--- a/cs/demo/Ice/throughput/Client.cs
+++ b/cs/demo/Ice/throughput/Client.cs
@@ -359,7 +359,7 @@ public class Client : Ice.Application
{
mbit *= 2;
}
- Console.WriteLine("throughput: " + mbit.ToString("F") + "Mbps");
+ Console.WriteLine("throughput: " + mbit.ToString("#.##") + "Mbps");
}
else if(line.Equals("s"))
{
diff --git a/java/demo/Ice/throughput/Client.java b/java/demo/Ice/throughput/Client.java
index 33813e1fa74..a3b7cb652d2 100644
--- a/java/demo/Ice/throughput/Client.java
+++ b/java/demo/Ice/throughput/Client.java
@@ -371,7 +371,7 @@ public class Client extends Ice.Application
{
mbit *= 2;
}
- System.out.println("throughput: " + mbit + " Mbps");
+ System.out.println("throughput: " + new java.text.DecimalFormat("#.##").format(mbit) + "Mbps");
}
else if(line.equals("s"))
{
diff --git a/javae/demo/IceE/jdk/throughput/Client.java b/javae/demo/IceE/jdk/throughput/Client.java
index 14dbb370d60..cb163ddd71c 100644
--- a/javae/demo/IceE/jdk/throughput/Client.java
+++ b/javae/demo/IceE/jdk/throughput/Client.java
@@ -383,7 +383,7 @@ public class Client
{
mbit *= 2;
}
- System.out.println("throughput: " + mbit + " Mbps");
+ System.out.println("throughput: " + new java.text.DecimalFormat("#.##").format(mbit) + "Mbps");
}
else if(line.equals("s"))
{
diff --git a/py/demo/Ice/throughput/Client.py b/py/demo/Ice/throughput/Client.py
index 8f5d61c0989..a2eb006526f 100644
--- a/py/demo/Ice/throughput/Client.py
+++ b/py/demo/Ice/throughput/Client.py
@@ -182,7 +182,7 @@ class Client(Ice.Application):
mbit = repetitions * seqSize * wireSize * 8.0 / tsec / 1000000.0
if c == 'e':
mbit = mbit * 2
- print "throughput: %.3f Mbps" % mbit
+ print "throughput: %.3fMbps" % mbit
elif c == 's':
throughput.shutdown()
elif c == 'x':
diff --git a/vb/demo/Ice/throughput/Client.vb b/vb/demo/Ice/throughput/Client.vb
index 27bc2a2697b..5d6939de1b2 100755
--- a/vb/demo/Ice/throughput/Client.vb
+++ b/vb/demo/Ice/throughput/Client.vb
@@ -216,7 +216,7 @@ Module ThroughputC
If c = "e" Then
mbit *= 2
End If
- Console.Out.WriteLine("throughput: " & mbit.ToString("F") & "Mbps")
+ Console.Out.WriteLine("throughput: " & mbit.ToString("#.##") & "Mbps")
ElseIf line.Equals("s") Then
throughput.shutdown()
ElseIf line.Equals("x") Then