summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/PerformanceTests
diff options
context:
space:
mode:
authorhiroshige@chromium.org <hiroshige@chromium.org>2015-09-10 06:22:33 +0000
committerhiroshige@chromium.org <hiroshige@chromium.org>2015-09-10 06:22:33 +0000
commit5e3da089ef915c6870dc3db8c220841563567a82 (patch)
treee785eec490398738996ac72e41fdef6d1116ae38 /third_party/WebKit/PerformanceTests
parent4d22065e0e45c54257da5bfe22617dbc6f724795 (diff)
downloadchromium_src-5e3da089ef915c6870dc3db8c220841563567a82.zip
chromium_src-5e3da089ef915c6870dc3db8c220841563567a82.tar.gz
chromium_src-5e3da089ef915c6870dc3db8c220841563567a82.tar.bz2
[Pywebsocket PerformanceTests 1/2] Add PerformanceTests/Pywebsocket
This CL adds PerformanceTests test scripts that will be used by [2/2]. These tests measure execution time of sending/receiving data of 10MB each by XHR, WebSocket, and fetch. WebSocket send benchmarks are disabled because there is a performance bottleneck in pywebsocket side when running without native modules. [1/2] PerformanceTests scripts: This CL [2/2] Telemetry: https://codereview.chromium.org/736653002/ BUG=432408 Review URL: https://codereview.chromium.org/738753002 git-svn-id: svn://svn.chromium.org/blink/trunk@202031 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/PerformanceTests')
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html16
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py92
-rw-r--r--third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js64
37 files changed, 716 insertions, 0 deletions
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html
new file mode 100644
index 0000000..35879bc
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'WebSocket',
+ 'receiveBenchmark',
+ '',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html
new file mode 100644
index 0000000..532f56b
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'WebSocket',
+ 'receiveBenchmark',
+ '',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html
new file mode 100644
index 0000000..d13be99
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'arraybuffer',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html
new file mode 100644
index 0000000..6b263dc
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'arraybuffer',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html
new file mode 100644
index 0000000..b8bd5e3b
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'arraybuffer',
+ true,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html
new file mode 100644
index 0000000..4221473
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'blob',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html
new file mode 100644
index 0000000..0055878
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'blob',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html
new file mode 100644
index 0000000..0e7319c
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'blob',
+ true,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html
new file mode 100644
index 0000000..56a3987
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'text',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html
new file mode 100644
index 0000000..a2af594
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'text',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html
new file mode 100644
index 0000000..fe9ca9e
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'receiveBenchmark',
+ 'text',
+ true,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html
new file mode 100644
index 0000000..7f4a17d
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'arraybuffer',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html
new file mode 100644
index 0000000..b20d6f0
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'arraybuffer',
+ false,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html
new file mode 100644
index 0000000..42a81a2
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'arraybuffer',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html
new file mode 100644
index 0000000..aa1d315
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'arraybuffer',
+ true,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html
new file mode 100644
index 0000000..df1c4db
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'blob',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html
new file mode 100644
index 0000000..6f5b1ce
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'blob',
+ false,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html
new file mode 100644
index 0000000..10c2a6e
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'blob',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html
new file mode 100644
index 0000000..826e362
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'blob',
+ true,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html
new file mode 100644
index 0000000..da63e55
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'text',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html
new file mode 100644
index 0000000..94e8c9f
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'text',
+ false,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html
new file mode 100644
index 0000000..767a66e
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'text',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html
new file mode 100644
index 0000000..365782a
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/xhr_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'XHR',
+ 'sendBenchmark',
+ 'text',
+ true,
+ false,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html
new file mode 100644
index 0000000..b30352f
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'receiveBenchmark',
+ 'arraybuffer',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html
new file mode 100644
index 0000000..38e617c
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'receiveBenchmark',
+ 'arraybuffer',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html
new file mode 100644
index 0000000..022065a
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'receiveBenchmark',
+ 'blob',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html
new file mode 100644
index 0000000..9061267
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'receiveBenchmark',
+ 'blob',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html
new file mode 100644
index 0000000..9b3410c
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'receiveBenchmark',
+ 'text',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html
new file mode 100644
index 0000000..0b2196b
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'receiveBenchmark',
+ 'text',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html
new file mode 100644
index 0000000..b9339d7
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'sendBenchmark',
+ 'arraybuffer',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html
new file mode 100644
index 0000000..1428d60
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'sendBenchmark',
+ 'arraybuffer',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html
new file mode 100644
index 0000000..017b61a
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'sendBenchmark',
+ 'blob',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html
new file mode 100644
index 0000000..e739f39
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'sendBenchmark',
+ 'blob',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html
new file mode 100644
index 0000000..63b6f39
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'sendBenchmark',
+ 'text',
+ false,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html
new file mode 100644
index 0000000..0e43c53
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="http://localhost:8001/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="http://localhost:8001/fetch_benchmark.js"></script>
+</head>
+<body onload="startPerformanceTest(
+ 'fetch',
+ 'sendBenchmark',
+ 'text',
+ true,
+ true,
+ true)">
+</body>
+</html>
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py
new file mode 100644
index 0000000..0c04b6c
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py
@@ -0,0 +1,92 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+'''Generator script for PerformanceTests/Pywebsocket/. Run
+$ python resources/generate.py
+at PerformanceTests/Pywebsocket/, and commit the generated files.'''
+
+import sys
+import os
+
+
+def generate(connection_type,
+ benchmark_name,
+ data_type,
+ is_worker,
+ is_async,
+ does_verify):
+ pywebsocket_server = 'http://localhost:8001'
+
+ test_file_name = ('%s-%s%s-%s-%s-%s.html' %
+ (connection_type,
+ benchmark_name,
+ '' if data_type == '' else '-' + data_type,
+ 'worker' if is_worker else 'window',
+ 'async' if is_async else 'sync',
+ 'verify' if does_verify else 'noverify'))
+
+ test_file_content_template = '''<!DOCTYPE html>
+<head>
+<script src="../resources/runner.js"></script>
+<script src="{pywebsocket_server_root}/util.js"></script>
+<script src="resources/util_performance_test.js"></script>
+<script src="{pywebsocket_server_root}/{script_name}"></script>
+</head>
+<body onload="startPerformanceTest(
+ '{connection_type}',
+ '{benchmark_name}Benchmark',
+ '{data_type}',
+ {is_worker},
+ {is_async},
+ {does_verify})">
+</body>
+</html>
+'''
+
+ if connection_type == 'WebSocket':
+ script_name = 'benchmark.js'
+ elif connection_type == 'XHR':
+ script_name = 'xhr_benchmark.js'
+ else:
+ script_name = 'fetch_benchmark.js'
+
+ test_file_content = test_file_content_template.format(
+ pywebsocket_server_root=pywebsocket_server,
+ script_name=script_name,
+ connection_type=connection_type,
+ benchmark_name=benchmark_name,
+ data_type=data_type,
+ is_worker='true' if is_worker else 'false',
+ is_async='true' if is_async else 'false',
+ does_verify='true' if does_verify else 'false')
+
+ with open(test_file_name, 'w') as f:
+ f.write(test_file_content)
+
+
+def main():
+ for is_worker in [True, False]:
+ for benchmark_name in ['send', 'receive']:
+ if benchmark_name != 'send':
+ # Disable WebSocket-send tests because it is very slow
+ # without a native module in pywebsocket.
+ generate('WebSocket', benchmark_name, '',
+ is_worker, is_async=True, does_verify=True)
+
+ for data_type in ['arraybuffer', 'blob', 'text']:
+ generate('XHR', benchmark_name, data_type,
+ is_worker, is_async=True, does_verify=True)
+ generate('fetch', benchmark_name, data_type,
+ is_worker, is_async=True, does_verify=True)
+
+ if benchmark_name == 'receive' and not is_worker:
+ # Disable XHR-receive-*-window-sync tests.
+ continue
+
+ for data_type in ['arraybuffer', 'blob', 'text']:
+ generate('XHR', benchmark_name, data_type,
+ is_worker, is_async=False, does_verify=True)
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js
new file mode 100644
index 0000000..20021a4
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js
@@ -0,0 +1,64 @@
+function perfTestAddToLog(text) {
+ PerfTestRunner.log(text);
+}
+
+function perfTestAddToSummary(text) {
+}
+
+function perfTestMeasureValue(value) {
+ PerfTestRunner.measureValueAsync(value);
+ PerfTestRunner.gc();
+}
+
+function perfTestNotifyAbort() {
+ PerfTestRunner.logFatalError("benchmark aborted");
+}
+
+const numIterations = 10;
+const numWarmUpIterations = 5;
+
+function getConfigForPerformanceTest(connectionType, dataType, async,
+ verifyData) {
+ return {
+ prefixUrl:
+ connectionType === 'WebSocket' ? 'ws://localhost:8001/benchmark_helper' :
+ 'http://localhost:8001/073be001e10950692ccbf3a2ad21c245', // XHR or fetch
+ printSize: true,
+ numXHRs: 1,
+ numFetches: 1,
+ numSockets: 1,
+ // + 1 is for a warmup iteration by the Telemetry framework.
+ numIterations: numIterations + numWarmUpIterations + 1,
+ numWarmUpIterations: numWarmUpIterations,
+ minTotal: 10240000,
+ startSize: 10240000,
+ stopThreshold: 10240000,
+ multipliers: [2],
+ verifyData: verifyData,
+ dataType: dataType,
+ async: async,
+ addToLog: perfTestAddToLog,
+ addToSummary: perfTestAddToSummary,
+ measureValue: perfTestMeasureValue,
+ notifyAbort: perfTestNotifyAbort
+ };
+}
+
+function startPerformanceTest(connectionType, benchmarkName,
+ dataType, isWorker, async, verifyData){
+ initWorker(connectionType, 'http://localhost:8001');
+
+ PerfTestRunner.prepareToMeasureValuesAsync({
+ done: function() {
+ var config = getConfigForPerformanceTest(connectionType, dataType,
+ async, verifyData);
+ doAction(config, isWorker, 'stop');
+ },
+ unit: 'ms',
+ dromaeoIterationCount: numIterations
+ });
+
+ var config = getConfigForPerformanceTest(connectionType, dataType, async,
+ verifyData);
+ doAction(config, isWorker, benchmarkName);
+}