Commit a894120e authored by adamk@chromium.org's avatar adamk@chromium.org

Add a performance test for sending a batch of XMLHttpRequests

R=tonyg@chromium.org
BUG=348655

Review URL: https://codereview.chromium.org/177983010

git-svn-id: svn://svn.chromium.org/blink/trunk@168337 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2d96dde7
<!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>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment