From c0e055ac989a24c2b6ad14a0eb2b3f8509cb9bab Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 5 Aug 2005 22:22:15 +0000 Subject: [PATCH] r9143: print out the rate of rounttrips metze --- swat/esptest/qooxdoo.esp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/swat/esptest/qooxdoo.esp b/swat/esptest/qooxdoo.esp index ed43fd41c..f98fe01bd 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); }; -- 2.34.1