Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: PerformanceTests/XMLHttpRequest/send.html

Issue 177983010: Add a performance test for sending a batch of XMLHttpRequests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PerformanceTests/XMLHttpRequest/send.html
diff --git a/PerformanceTests/XMLHttpRequest/send.html b/PerformanceTests/XMLHttpRequest/send.html
new file mode 100644
index 0000000000000000000000000000000000000000..4d2a2b8f65f3fa245d5fbd3ed82f24135b5ea152
--- /dev/null
+++ b/PerformanceTests/XMLHttpRequest/send.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<script src="../resources/runner.js"></script>
+<script>
+// Use measureTime instead of runsPerSecond to avoid a ridiculous number of requests in flight.
+// 100 is realistic, 1000 is plausible, but 10000 is crazy.
+PerfTestRunner.measureTime({
+ description: "Measure the time it takes to create, open, and send 1000 async XMLHttpRequests",
+ run: function() {
+ var xhrs = [];
+ for (var i = 0; i < 1000; ++i) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", "file" + i + ".txt", true);
+ xhr.send();
+ xhrs.push(xhr);
+ }
+ },
+});
+</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698