From d67d10528eb68753d19db1698b3688fa48fa44b3 Mon Sep 17 00:00:00 2001 From: "rtenneti@chromium.org" Date: Thu, 9 Jun 2011 05:11:41 +0000 Subject: Collect stats to investigate the viability of UDP connectivity from the browser (first cut). Collect stats for TCP connectivity also. - What percentage of users can get a message end-to-end to an TCP and UDP server. - What is the latency for TCP and UDP messages. Added TCP and UDP echo servers to testserver.py for unittests. BUG=82565 TEST=udp tests Review URL: http://codereview.chromium.org/7056031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88495 0039d316-1c4b-4281-b951-d872f2087c98 --- net/test/test_server.cc | 8 ++++++++ net/test/test_server.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'net/test') diff --git a/net/test/test_server.cc b/net/test/test_server.cc index b6d3286..b3821bb 100644 --- a/net/test/test_server.cc +++ b/net/test/test_server.cc @@ -182,6 +182,10 @@ std::string TestServer::GetScheme() const { return "http"; case TYPE_HTTPS: return "https"; + case TYPE_TCP_ECHO: + NOTREACHED(); + case TYPE_UDP_ECHO: + NOTREACHED(); default: NOTREACHED(); } @@ -357,6 +361,10 @@ bool TestServer::AddCommandLineArguments(CommandLine* command_line) const { command_line->AppendArg("-f"); } else if (type_ == TYPE_SYNC) { command_line->AppendArg("--sync"); + } else if (type_ == TYPE_TCP_ECHO) { + command_line->AppendArg("--tcp-echo"); + } else if (type_ == TYPE_UDP_ECHO) { + command_line->AppendArg("--udp-echo"); } else if (type_ == TYPE_HTTPS) { FilePath certificate_path(certificates_dir_); certificate_path = certificate_path.Append( diff --git a/net/test/test_server.h b/net/test/test_server.h index 03a4dfc..81b0ad3 100644 --- a/net/test/test_server.h +++ b/net/test/test_server.h @@ -42,6 +42,8 @@ class TestServer { TYPE_HTTP, TYPE_HTTPS, TYPE_SYNC, + TYPE_TCP_ECHO, + TYPE_UDP_ECHO, }; // Container for various options to control how the HTTPS server is -- cgit v1.1