summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-08-05 22:22:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:22 -0500
commitb2b89d654df22412c1a566780dc66e8bf3dc4d10 (patch)
tree3f8b3149d0260b18683b68f75e7e9f151be08dad /swat
parente9754b8de8ede5b4e70d27c9d84b0397c369353f (diff)
downloadsamba-b2b89d654df22412c1a566780dc66e8bf3dc4d10.tar.gz
samba-b2b89d654df22412c1a566780dc66e8bf3dc4d10.tar.bz2
samba-b2b89d654df22412c1a566780dc66e8bf3dc4d10.zip
r9143: print out the rate of rounttrips
metze (This used to be commit c0e055ac989a24c2b6ad14a0eb2b3f8509cb9bab)
Diffstat (limited to 'swat')
-rw-r--r--swat/esptest/qooxdoo.esp8
1 files changed, 7 insertions, 1 deletions
diff --git a/swat/esptest/qooxdoo.esp b/swat/esptest/qooxdoo.esp
index ed43fd41c6..f98fe01bd4 100644
--- a/swat/esptest/qooxdoo.esp
+++ b/swat/esptest/qooxdoo.esp
@@ -48,7 +48,6 @@
var stopit = 0;
var shared = new Object();
- shared.counter = 0;
function callback(o) {
shared = o;
@@ -57,6 +56,11 @@
r = r + "\\t" + i + " : " + shared[i] + "\\n";
}
ta.setText(r);
+ if (shared.start_time == 0) {
+ shared.start_time = shared.nttime;
+ }
+ shared.time_diff = shared.nttime - shared.start_time;
+ shared.rate = shared.counter / (shared.time_diff * 0.0000001);
shared.counter++;
if (stopit == 0) {
server_call('remote.esp', 'testfunc', callback, shared);
@@ -67,6 +71,8 @@
server_call('remote.esp', 'printf', null,
"Starting calls ... (stopit=%d)\\n", stopit);
stopit = 0;
+ shared.counter = 0;
+ shared.start_time = 0;
server_call('remote.esp', 'testfunc', callback, shared);
};